Retrieve the variant name associated with the tag.
Synopsis:
#include <nfc/nfc.h>
NFC_API nfc_result_t nfc_get_tag_name(const nfc_target_t *target, char *name, size_t max_name_length, size_t *name_length)
Arguments:
- target
-
The NFC target returned from the nfc_get_target() function.
- name
-
A pointer to a preallocated buffer to return the name.
- max_name_length
-
The length of the preallocated buffer.
- name_length
-
The length of the returned name copied into the name
buffer.
Library:
libnfc (For the qcc command, use the -l nfc
option to link against this library)
Description:
This function returns the name associated with the tag.
Whether a tag name is returned depends on the following three factors:
- the connection type (ISO14443-3, ISO14443-4, NDEF, ISO15693-3, or ISO18092)
- the tag variant (Topaz, MIFARE UL, MIFARE UL C, Jewel, etc.)
- the feature set (feature set 1 or feature set 2)
If the tag name is not provided in the combination of the factors, the function returns
NFC_RESULT_SUCCESS and sets
name_length to zero.
The following tag names are supported:
- "Desfire D40"
- "Desfire EV1 2K"
- "Desfire EV1 4K"
- "Desfire EV1 8K"
- "Jewel"
- "Mifare UL"
- "Mifare UL C"
- "Topaz"
- "Topaz 512"
- "TI TAGIT"
- "ST LRI 512"
- "ST LRI 1K",
- "ST_LRI_2K"
- "ST LRI S2K",
- "ST LRI S64K",
- "NXP ICODE"
- "Kovio"
- "Mifare 1K"
- "Mifare 4K"
- "Mifare MINI"
- "FeliCa",
- "Unknown"