YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0
Page 16 of 28
Apr 2010
Parameter: icdev: [IN] Device ID
bcnt: [IN] must be 4
pSnr: [OUT] response data from card, unique serial number
pLen: [OUT] length of response data
Return: return 0 if successful
6.2.2.3 INT WINAPI RF_SELECT
Function: Mifare card Selectting
Prototype: int WINAPI rf_select (unsigned short icdev,
unsigned char *pSnr,
unsigned char snrLen,
unsigned char *pSize)
Parameter: icdev: [IN] Device ID
pSnr: [IN] card unique serial number
snrLen: [IN] length of pSnr
pSize: [OUT] response data from card, capacity code
Return: return 0 if successful
Explanation: card will be on active estate after received this command, only one TYPE_A card
on active estate at the same influence range at same time.
6.2.2.4 INT WINAPI RF_M1_AUTHENTICATION2
Function: Mifare_Std Authentify
Prototype: int WINAPI rf_M1_authentication2 ( unsigned short icdev,
unsigned char model,
unsigned char block,
unsigned char *pKey)
Parameter: icdev: [IN] Device ID
model: [IN] key validate mode
block: [IN] block absolute address
pKey: [IN]
6 bytes password
Return: return 0 if successful
Explanation:model = 0x60: via KeyA
model = 0x61: via KeyB
6.2.2.5 INT WINAPI RF_M1_READ
Function: MifareOne Read
Prototype: int WINAPI rf_M1_read ( unsigned short icdev,
unsigned char block,
unsigned char *pData,
unsigned char *pLen)
Parameter: icdev: [IN] Device ID
block: [IN] block absolute address
pData: [OUT] response data from card
pLen: [OUT] length of response data
Return: return 0 if successful
6.2.2.6 INT WINAPI RF_M1_WRITE
Function: Mifare_Std Write