pn5180-icode xli x2 read password err

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

pn5180-icode xli x2 read password err

2,360 次查看
guangshi
Contributor I

first get random

guangshi_1-1607675859238.png

detal:

send 09 00 22 b2 04 + UID

rev 00 xx xx(randdom number)

xx Rand[0] Rand[2]

xx Rand[1] Rand[3]

then XOR_password

guangshi_2-1607675941143.png

detal:password 0000 0000(original password)

In the end! Set read password

send 09 00 22 b3 04 +UID +01(read type) +XOR_password

rev 01 0f 

Final reply error.

Are my steps correct?

标记 (1)
0 项奖励
回复
4 回复数

2,325 次查看
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Hi @guangshi ,

Hope you are doing great the process for this should be :

  1. activate the ICODE by sending the inventory command
  2. select the ICODE you want with the select command
  3. get random number 
  4. set password, for the PWD ID you want to use:
    • 01- Read
    • 02 - Write
    • 04 - privacy
    • 08 - Destroy
    • 10 EAS/AFI

you can find a script I just did for you doing the above process for the ICODE SLIX2 and Read PWD.

Hope this information helps.

Have a great day!

 

BR

 

Jonathan

0 项奖励
回复

2,333 次查看
AlanSbor
Contributor II

/*
* The SET PASSWORD command enables the different passwords to be transmitted to the label
* to access the different protected functionalities of the following commands.
* The SET PASSWORD command has to be executed just once for the related passwords if the label is powered
*/
ISO15693ErrorCode PN5180ISO15693::setPassword(uint8_t *password, uint8_t *random) {
uint8_t setPassword[] = {0x02, 0xB3, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00};
uint8_t *readBuffer;
setPassword[4] = password[0] ^ random[0];
setPassword[5] = password[1] ^ random[1];
setPassword[6] = password[2] ^ random[0];
setPassword[7] = password[3] ^ random[1];
ISO15693ErrorCode rc = issueISO15693Command(setPassword, sizeof(setPassword), &readBuffer);
return rc;
}

ISO15693ErrorCode PN5180ISO15693::enablePrivacy(uint8_t *password, uint8_t *random) {
uint8_t setPrivacy[] = {0x02, 0xBA, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
uint8_t *readBuffer;
setPrivacy[3] = password[0] ^ random[0];
setPrivacy[4] = password[1] ^ random[1];
setPrivacy[5] = password[2] ^ random[0];
setPrivacy[6] = password[3] ^ random[1];
ISO15693ErrorCode rc = issueISO15693Command(setPrivacy, sizeof(setPrivacy), &readBuffer);
return rc;
}

0 项奖励
回复

2,334 次查看
AlanSbor
Contributor II

// ICODE SLIX specific commands

/*
* The GET RANDOM NUMBER command is required to receive a random number from the label IC.
* The passwords that will be transmitted with the SET PASSWORD,ENABLEPRIVACY and DESTROY commands
* have to be calculated with the password and therandom number (see Section 9.5.3.2 "SET PASSWORD")
*/
ISO15693ErrorCode PN5180ISO15693::getRandomNumber(uint8_t *randomData) {
uint8_t getrandom[] = {0x02, 0xB2, 0x04};
uint8_t *readBuffer;
ISO15693ErrorCode rc = issueISO15693Command(getrandom, sizeof(getrandom), &readBuffer);
if (rc == ISO15693_EC_OK) {
randomData[0] = readBuffer[1];
randomData[1] = readBuffer[2];
}
return rc;
}

0 项奖励
回复

2,359 次查看
guangshi
Contributor I

guangshi_0-1607676706955.png

 

0 项奖励
回复