Hello,
I am using the NXP tag NTP5332 and actually I has problems with commands that are sent via NFC using customized mobile app.
Using a microcontroller, I configured the tag with plain password for NFC side. Bellow is possible to see the values of the configuration registers:
- Device security configuration
0x103F: [0]: 0x45; [1]: 0x00; [2]: 0xff; [3]: 0xff
PP_AREA_1 = 0xFFFF
- Plain Password location
0x1020: [0]: 0x00; [1]: 0x00; [2]: 0x00; [3]: 0x00
Read Password: 0x00 0x00 0x00 0x00
0x1021: [0]: 0x00; [1]: 0x00; [2]: 0x00; [3]: 0x00
Write Password: 0x00 0x00 0x00 0x00
- NFC Protection Pointer
0x1058: [0]: 0x08; [1]: 0x30; [2]: 0x00; [3]: 0x00
NFC_PP_AREA_0H = 0x08
NFC_PPC = 0x30 (AREA_0-H is read and write protected)
On the NFC side, I am having problems writing to a password-protected memory region. Below is the sequence of commands used to authenticate the device in order to write to a specific memory region.
-Get random number
0x02 | 0xB2 | 0x04
RESPONSE = 0x00 | RANDOM NUMBER (2 Bytes)
-Set Password
0x22 | 0xB3 | 0x04 | TAG UID (8 Bytes) | 0x02 (Password Identifier for Write) | XOR PWD (4 Bytes)
RESPONSE = 0x00
- Write block data
0x22 | 0x21 | TAG UID (8 Bytes) | Block Number (1 Byte) | Data (4 Bytes)
RESPONSE = 0x01 | 0x0F
To read a memory region protected against reading, I follow the sequence of commands described above, changing only the Password Identifier to 0x01 and the operation to read; in this case, the read operation is successful.
If the password protection against reading and writing is removed, the read and write commands work without any problems.
In addition, I also tried sending the GET NXP SYSTEM INFORMATION command, but I got the response: 01 (Error) | 0F (Unknown error).
Get NXP info: 0x22 (Flags) | 0xAB (Cmd code) | 0x04 (Manuf. code) | UID
Can anyone help me with these issues? Am I sending the wrong command?
Thanks for your help!