User Manual

61
Example
unsigned char keybuffer[3]={0xff,0xff,0xff};
if(fw_authentikey_4442(icdev,0,3,keybuffer)!=0)
{
printf(“Authentication error”);
}
Remark
Card will be locked if this function returns failure for three times continuously.
int fw_changkey_4442(int icdev,unsigned char _Adr,int rlen,unsigned char *key);
Description
Update Key of card.
Parameters
icdev: Value of Device Handle.
_Adr: Starting address of key-data (must set 0).
rlen:Length of key-data for updating(must set 3).
key: key-data for updating(3 bytes).
Return Value
0 if successful; otherwise, Nonzero.
Example
unsigned char keybuffer[3]={0x00,0x00,0x00};
if(fw_changkey_4442(icdev,0,3,keybuffer)!=0)
{
printf(“Change key error”);
}
int fw_cntReadError_4442(int icdev,unsigned char *cntReadError);
Description
Read counts of Error-Code
Parameters
icdev: Value of Device Handle.
cntReadError: Times of Read-Error
Return Value
0 if successful; otherwise, Nonzero.
Example
int st;
unsigned char nerror;
st= fw_cntReadError_4442(icdev,&nerror);
2.14 SLE4428 special Functions
int fw_read_4428(int icdev,unsigned int _Adr,unsigned char *_Data,int length);
Description
Read data from 4428 card
Parameters