24
Example
int st;
unsigned long snr;
st=fw_anticoll(icdev,0,&snr);
Remark
This function shoud be called immediately after the function fw_request unless
we have know the card serial number.
int fw_select(int icdev,unsigned long _Snr,unsigned char *_Size);
Description
Select one card with specified serial number from several cards
Parameters
icdev:Value of Device Handle.
_Snr:Card serial number.
_Size:[out] The size of card capacity.
Return Value
0 if successful; otherwise, Nonzero.
Example
int st,type;
unsigned char size;
unsigned long snr;
fw_request(icdev,0,&type);
fw_anticoll(icdev,0,&snr);
st=fw_select(icdev,snr,&size);
int fw_load_key(int icdev,unsigned char _Mode,unsigned char _SecNr,unsigned char
*_NKey);
Description
Load keys to RAM of Reader.
Parameters
icdev:Value of Device Handle.
_Mode:The model of loading key.
Value are as follows:
For each sector of M1 card,
there are
three sets of corresponding password
(KEYSET0, KEYSET1, KEYSET2) in the reader, each password include A password (KEYA)
and B password (KEYB), a total of six passwords, use 0~2,4 ~ 6 to represent the six
Password:
0 - KEYSET0 of KEYA `
1 - KEYSET1 of KEYA
2 - KEYSET2 of KEYA
4 - KEYSET0 of KEYB
5 - KEYSET1 of KEYB
6 - KEYSET2 of KEYB
_SecNr:Section number(M1 Card:0~15;
ML Card:0)
_Nkey:.Card key written to the reader
Return Value
0 if successful; otherwise, Nonzero.