uFCoder 2.58
Loading...
Searching...
No Matches

Functions

UFR_STATUS DL_API WriteEmulationNdef (uint8_t tnf, IN uint8_t *type_record, uint8_t type_length, IN uint8_t *id, uint8_t id_length, IN uint8_t *payload, uint8_t payload_length)
 
UFR_STATUS DL_API WriteEmulationNdefWithAAR (uint8_t tnf, IN uint8_t *type_record, uint8_t type_length, IN uint8_t *id, uint8_t id_length, IN uint8_t *payload, uint8_t payload_length, IN uint8_t *aar, uint8_t aar_length)
 
UFR_STATUS DL_API TagEmulationStart (void)
 
UFR_STATUS DL_API TagEmulationStop (void)
 
UFR_STATUS DL_API WriteEmulationNdefRam (uint8_t tnf, IN uint8_t *type_record, uint8_t type_length, IN uint8_t *id, uint8_t id_length, IN uint8_t *payload, uint32_t payload_length)
 
UFR_STATUS DL_API TagEmulationStartRam (void)
 
UFR_STATUS DL_API TagEmulationStopRam (void)
 
UFR_STATUS DL_API TagEmulationMirrorCounterNonResetEnabled (uint16_t mirror_pos)
 
UFR_STATUS DL_API TagEmulationMirrorCounterDisabled (void)
 

Detailed Description

Function Documentation

◆ WriteEmulationNdef()

UFR_STATUS DL_API WriteEmulationNdef ( uint8_t tnf,
IN uint8_t * type_record,
uint8_t type_length,
IN uint8_t * id,
uint8_t id_length,
IN uint8_t * payload,
uint8_t payload_length )

Function stores a message record for NTAG emulation mode into the reader. Parameters of the function are: TNF, type of record, ID, payload. Maximum total size for emulated NDEF message is 144 bytes.

Parameters
tnfTNF of the record
type_recordpointer to the array containing record type
type_lengthlength of the record type
idpointer to the array containing record ID
id_lengthlength of the record ID
payloadpointer to the array containing record payload
payload_lengthlength of the record payload
Returns
Operation status

◆ WriteEmulationNdefWithAAR()

UFR_STATUS DL_API WriteEmulationNdefWithAAR ( uint8_t tnf,
IN uint8_t * type_record,
uint8_t type_length,
IN uint8_t * id,
uint8_t id_length,
IN uint8_t * payload,
uint8_t payload_length,
IN uint8_t * aar,
uint8_t aar_length )

This function do the same as WriteEmulationNdef() function with the addition of an AAR embedded in to the NDEF message. AAR stands for “Android Application Record”. AAR is a special type of NDEF record that is used by Google’s Android operating system to signify to an NFC phone that an explicitly defined Android Application which should be used to handle an emulated NFC tag. Android App record will be added as the 2nd NDEF record in the NDEF message.

Parameters
tnfTNF of the record type_record pointer to the array containing record type type_length length of the record type id pointer to the array containing record ID id_length length of the record ID payload pointer to the array containing record payload payload_length length of the record payload aar pointer to the array containing AAR record aar_length length of the AAR record TagEmulationStart Function description Put the reader permanently in a NDEF tag emulation mode. Only way for a reader to exit from this mode is to receive the TAG_EMULATION_STOP command (issued by calling TagEmulationStop() function). In this mode, the reader can only answer to the commands issued by a following library functions: TagEmulationStart(), WriteEmulationNdef(), TagEmulationStop(), GetReaderSerialNumber(), GetReaderSerialDescription(), GetReaderHardwareVersion(), GetReaderFirmwareVersion(), GetBuildNumber() Calls to the other functions in this mode returns following error code: FORBIDDEN_IN_TAG_EMULATION_MODE = 0x90
type_recordpointer to the array containing record type
type_lengthlength of the record type id pointer to the array containing record ID id_length length of the record ID payload pointer to the array containing record payload payload_length length of the record payload aar pointer to the array containing AAR record aar_length length of the AAR record TagEmulationStart Function description Put the reader permanently in a NDEF tag emulation mode. Only way for a reader to exit from this mode is to receive the TAG_EMULATION_STOP command (issued by calling TagEmulationStop() function). In this mode, the reader can only answer to the commands issued by a following library functions: TagEmulationStart(), WriteEmulationNdef(), TagEmulationStop(), GetReaderSerialNumber(), GetReaderSerialDescription(), GetReaderHardwareVersion(), GetReaderFirmwareVersion(), GetBuildNumber() Calls to the other functions in this mode returns following error code: FORBIDDEN_IN_TAG_EMULATION_MODE = 0x90
idpointer to the array containing record ID
id_lengthlength of the record ID payload pointer to the array containing record payload payload_length length of the record payload aar pointer to the array containing AAR record aar_length length of the AAR record TagEmulationStart Function description Put the reader permanently in a NDEF tag emulation mode. Only way for a reader to exit from this mode is to receive the TAG_EMULATION_STOP command (issued by calling TagEmulationStop() function). In this mode, the reader can only answer to the commands issued by a following library functions: TagEmulationStart(), WriteEmulationNdef(), TagEmulationStop(), GetReaderSerialNumber(), GetReaderSerialDescription(), GetReaderHardwareVersion(), GetReaderFirmwareVersion(), GetBuildNumber() Calls to the other functions in this mode returns following error code: FORBIDDEN_IN_TAG_EMULATION_MODE = 0x90
payloadpointer to the array containing record payload
payload_lengthlength of the record payload aar pointer to the array containing AAR record aar_length length of the AAR record TagEmulationStart Function description Put the reader permanently in a NDEF tag emulation mode. Only way for a reader to exit from this mode is to receive the TAG_EMULATION_STOP command (issued by calling TagEmulationStop() function). In this mode, the reader can only answer to the commands issued by a following library functions: TagEmulationStart(), WriteEmulationNdef(), TagEmulationStop(), GetReaderSerialNumber(), GetReaderSerialDescription(), GetReaderHardwareVersion(), GetReaderFirmwareVersion(), GetBuildNumber() Calls to the other functions in this mode returns following error code: FORBIDDEN_IN_TAG_EMULATION_MODE = 0x90
aarpointer to the array containing AAR record
aar_lengthlength of the AAR record TagEmulationStart Function description Put the reader permanently in a NDEF tag emulation mode. Only way for a reader to exit from this mode is to receive the TAG_EMULATION_STOP command (issued by calling TagEmulationStop() function). In this mode, the reader can only answer to the commands issued by a following library functions: TagEmulationStart(), WriteEmulationNdef(), TagEmulationStop(), GetReaderSerialNumber(), GetReaderSerialDescription(), GetReaderHardwareVersion(), GetReaderFirmwareVersion(), GetBuildNumber() Calls to the other functions in this mode returns following error code: FORBIDDEN_IN_TAG_EMULATION_MODE = 0x90
Returns
Operation status

◆ TagEmulationStart()

UFR_STATUS DL_API TagEmulationStart ( void )

Put the reader permanently in a NDEF tag emulation mode. Only way for a reader to exit from this mode is to receive the TAG_EMULATION_STOP command (issued by calling TagEmulationStop() function). In this mode, the reader can only answer to the commands issued by a following library functions: TagEmulationStart(), WriteEmulationNdef(), TagEmulationStop(), GetReaderSerialNumber(), GetReaderSerialDescription(), GetReaderHardwareVersion(), GetReaderFirmwareVersion(), GetBuildNumber() Calls to the other functions in this mode returns following error code: FORBIDDEN_IN_TAG_EMULATION_MODE = 0x90

Returns
Operation status

◆ TagEmulationStop()

UFR_STATUS DL_API TagEmulationStop ( void )

Allows the reader permanent exit from a NDEF tag emulation mode.

Returns
Operation status

◆ WriteEmulationNdefRam()

UFR_STATUS DL_API WriteEmulationNdefRam ( uint8_t tnf,
IN uint8_t * type_record,
uint8_t type_length,
IN uint8_t * id,
uint8_t id_length,
IN uint8_t * payload,
uint32_t payload_length )

From library version 5.0.31, and firmware version 5.0.33 Function stores a message record for NTAG emulation mode into the reader in the RAM. Parameters of the function are: TNF, type of record, ID, payload. Maximum total size for emulated NDEF message is 1008 bytes. Unlike the function WriteEmulationNdef, the data is not written to the EEPROM of the reader, so they cannot be loaded after the reader is reset. This function must be called after reader reset to use the NTAG emulation.

Parameters
tnfTNF of the record
type_recordpointer to the array containing record type
type_lengthlength of the record type
idpointer to the array containing record ID
id_lengthlength of the record ID
payloadpointer to the array containing record payload
payload_lengthlength of the record payload
Returns
Operation status

◆ TagEmulationStartRam()

UFR_STATUS DL_API TagEmulationStartRam ( void )

From library version 5.0.31, and firmware version 5.0.31 Put the reader permanently in a NDEF tag in RAM emulation mode. Only way for a reader to exit from this mode is to receive the TAG_EMULATION_STOP command (issued by calling TagEmulationStopRam() function), or by reader reset. Use the function GetReaderStatus to check if the reader is still in emulation mode (maybe the reader was reset for some reason).

Returns
Operation status

◆ TagEmulationStopRam()

UFR_STATUS DL_API TagEmulationStopRam ( void )

From library version 5.0.31, and firmware version 5.0.33 Allows the reader permanent exit from a NDEF tag emulation mode.

Returns
Operation status

◆ TagEmulationMirrorCounterNonResetEnabled()

UFR_STATUS DL_API TagEmulationMirrorCounterNonResetEnabled ( uint16_t mirror_pos)

Function enables the 24 bit NFC counter. Counter increased by the first valid READ command in the NTAG emulation mode, after the external RF field detected. Counter is represented in 6 bytes of ASCII code, when the NDEF message is read. For example if the counter value is 0x56, it will be represented as 000056, at the end of the NDEF message. Position of the counter mirror start byte must be entered as a function parameter. This is the absolute position in the card emulation data array. Counter value stays unchangeable.

Parameters
mirror_posPosition in the card emulation data array
Returns
Operation status

◆ TagEmulationMirrorCounterDisabled()

UFR_STATUS DL_API TagEmulationMirrorCounterDisabled ( void )

Function disables the NFC counter in the card emulation mode.

Returns
Operation status