uFCoder 2.62
Loading...
Searching...
No Matches
General purpose card related commands

Functions for getting common card data, not specific to card type. More...

Functions

UFR_STATUS DL_API COMTransceiveM (UFR_HANDLE hndUFR, IN uint8_t *cmd, uint32_t cmd_length, IN uint8_t *cmd_ext, uint32_t cmd_ext_length, OUT uint8_t *rsp, VAR uint32_t *rsp_length, OUT uint8_t *rsp_ext, VAR uint32_t *rsp_ext_length)
 Multi reader support. As of uFCoder library v5.0.71 users can use COM protocol via uFCoder library by calling this method. It handles transmission of CMD and CMD_EXT commands and it handles RSP and RSP_EXT packets that are a response to the COM protocol commands.
 
UFR_STATUS DL_API GetCardIdExM (UFR_HANDLE hndUFR, VAR uint8_t *lpucSak, OUT uint8_t *aucUid, VAR uint8_t *lpucUidSize)
 Multi reader support. This function returns UID of card actually present in RF field of reader.
 
UFR_STATUS DL_API GetCardSizeM (UFR_HANDLE hndUFR, VAR uint32_t *lpulLinearSize, VAR uint32_t *lpulRawSize)
 Multi reader support. Function returns size of user data space on the card (LinearSize), and size of total data space on the card (RawSize). The user data space is accessed via functions LinearWrite and LinearRead. Total data space is accessed via functions LinRowWrite and LinRowRead. For example Mifare Classic 1K card have 752 bytes of user data space (sector trailers and block 0 are not included), and 1024 bytes of total data space.
 
UFR_STATUS DL_API GetDlogicCardTypeM (UFR_HANDLE hndUFR, VAR uint8_t *lpucCardType)
 Multi reader support. This function returns card type according to DlogicCardType enumeration. For details, please refer to Appendix: DLogic CardType enumeration. If the card type is not supported, function return the lpucCardType value equal to zero : TAG_UNKNOWN = 0x00.
 
UFR_STATUS DL_API GetLastCardIdExM (UFR_HANDLE hndUFR, VAR uint8_t *lpucSak, OUT uint8_t *aucUid, VAR uint8_t *lpucUidSize)
 Multi reader support. This function returns UID of last card which was present in RF field of reader.

 

Detailed Description

Functions for getting common card data, not specific to card type.

Function Documentation

◆ COMTransceiveM()

UFR_STATUS DL_API COMTransceiveM ( UFR_HANDLE hndUFR,
IN uint8_t * cmd,
uint32_t cmd_length,
IN uint8_t * cmd_ext,
uint32_t cmd_ext_length,
OUT uint8_t * rsp,
VAR uint32_t * rsp_length,
OUT uint8_t * rsp_ext,
VAR uint32_t * rsp_ext_length )

Multi reader support. As of uFCoder library v5.0.71 users can use COM protocol via uFCoder library by calling this method. It handles transmission of CMD and CMD_EXT commands and it handles RSP and RSP_EXT packets that are a response to the COM protocol commands.

Parameters
hndUFRhandle of the uFR device
cmdPointer to array of CMD bytes for transmission. Last byte is the checksum.
cmd_lengthLength of the CMD array, always set it to 7.
cmd_extPointer to array of CMD_EXT bytes for transmission. Last byte is the checksum.
cmd_ext_lengthIf the length is greater than 0, CMD_EXT bytes will be transmitted. Otherwise they will not. This is the size of CMD_EXT array that will be sent to the reader.
rspPointer to array of bytes containing RSP bytes.
rsp_lengthPointer to a variable holding how many RSP bytes have been received.
rsp_extPointer to array of bytes containing RSP bytes. If greater than zero, RSP_EXT exists.
rsp_ext_lengthPointer to a variable holding how many RSP_EXT byte have been received.
Returns
Operation status

◆ GetCardIdExM()

UFR_STATUS DL_API GetCardIdExM ( UFR_HANDLE hndUFR,
VAR uint8_t * lpucSak,
OUT uint8_t * aucUid,
VAR uint8_t * lpucUidSize )

Multi reader support. This function returns UID of card actually present in RF field of reader.

It can handle all three known types : 4, 7 and 10 byte long UIDs. This function is recommended for use instead of GetCardId.

Parameters
hndUFRhandle of the uFR device
lpucSakreturns pointer to variable which holds card type according to SAK
aucUidreturns pointer to array of card UID bytes, variable length
lpucUidSizereturns pointer to variable holding information about UID length
Returns
Operation status

◆ GetCardSizeM()

UFR_STATUS DL_API GetCardSizeM ( UFR_HANDLE hndUFR,
VAR uint32_t * lpulLinearSize,
VAR uint32_t * lpulRawSize )

Multi reader support. Function returns size of user data space on the card (LinearSize), and size of total data space on the card (RawSize). The user data space is accessed via functions LinearWrite and LinearRead. Total data space is accessed via functions LinRowWrite and LinRowRead. For example Mifare Classic 1K card have 752 bytes of user data space (sector trailers and block 0 are not included), and 1024 bytes of total data space.

Parameters
hndUFRhandle of the uFR device
lpulLinearSizepointer to variable which contain size of user data space
lpulRawSizepointer to variable which contain size of total data space
Returns
Operation status

◆ GetDlogicCardTypeM()

UFR_STATUS DL_API GetDlogicCardTypeM ( UFR_HANDLE hndUFR,
VAR uint8_t * lpucCardType )

Multi reader support. This function returns card type according to DlogicCardType enumeration. For details, please refer to Appendix: DLogic CardType enumeration. If the card type is not supported, function return the lpucCardType value equal to zero : TAG_UNKNOWN = 0x00.

Parameters
hndUFRhandle of the uFR device
lpucCardTypepointer to lpucCardType variable. Variable lpucCardType holds returned value of actual card type present in RF field.
Returns
Operation status

◆ GetLastCardIdExM()

UFR_STATUS DL_API GetLastCardIdExM ( UFR_HANDLE hndUFR,
VAR uint8_t * lpucSak,
OUT uint8_t * aucUid,
VAR uint8_t * lpucUidSize )

Multi reader support. This function returns UID of last card which was present in RF field of reader.

It can handle all three known types : 4, 7 and 10 byte long UIDs. Difference with GetCardIdEx is that card does not be in RF field mandatory, UID value is stored in temporary memory area.

Parameters
hndUFRhandle of the uFR device
lpucSakreturns pointer to variable which holds card type according to SAK
aucUidreturns pointer to array of card UID bytes, variable length
lpucUidSizereturns pointer to variable holding information about UID length
Returns
Operation status