User Manual

26
(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
Addr:The section number to verify.
passbuff: The key to authentication(6 bytes)
Return Value
0 if successful; otherwise, Nonzero.
Example
//Verify section 4 key with 0 model
unsigned char password[7]={0xa0,0xa1,0xa2,0xa3,0xa4,0xa5};
if((fw_authentication_pass(icdev,0,4,password))!=0)
{
printf("Authentication error!");
}
int fw_read(int icdev,unsigned char _Adr,unsigned char *_Data);
Description
Read content of card.
For M1 card :Read one block data(16 bytes) once.
For ML card:Read two pages with same property once (0 and 1,2 and 3 ,...), 8
bytes.
Parameters
icdev:Value of Device Handle.
_Adr:M1 Card——Address of block M1(0~63),MS70(0-255);
_Data:[out] data of card.
Return Value
0 if successful; otherwise, Nonzero.
Example
int st;
unsigned char data[16];
st=fw_read(icdev,4,data); //Read block 4 of M1 card
Related HEX function:
int fw_read_hex(int icdev,unsigned char _Adr,char *_Data)
Remark
the difference between HEX function and normal function is, the string of HEX
function is in the form of hex, while the string of the corresponding normal function
is in the form of ASC codes. For example, if the actual data of second block is:
"1234567890abcedf", then called function fw_read_hex will return the string: