Problem with NTAG protected in NFC side

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with NTAG protected in NFC side

697 Views
NSF
Contributor I

Hello,

I am using the NXP tag NTP5332 and actually I has problems with commands that are sent via NFC using customized mobile app. On the NFC side, I am having problems writing to a password-protected memory region. 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.

Can anyone help me with these issues? Am I sending the wrong command?
Thanks for your help!

0 Kudos
Reply
7 Replies

500 Views
BPrada
Contributor I

Hi,

Any progress, am having the same problem writing to a password-protected memory region. 

Best Regards

0 Kudos
Reply

634 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @NSF

Hope you are doing well.

Could you please confirm that is the memory region you are trying to write to (User memory or Configuration memory)?

What is the configuration of your Protection Pointer and related conditions?

Is there any chance you have perform a Lock operation to the region you are trying to write? What is the value of your NFC Lock Block Configuration blocks?

Please consider that we recommend using TapLinx SDK. This SDK provides some tools for contactless applications development in smartphones. The open API allows developers open access to all hardware features of NXP‘s NFC product portfolio. It provides a subset of features for quick and easy development of lightweight applications.

Regards,
Eduardo.

0 Kudos
Reply

577 Views
NSF
Contributor I
 
Thanks for your reply!
 
These are the configurations that the NFC tag has:
 
Reg. 0x1037 (Configuration Bytes): [0]: 0x09; [1]: 0x00; [2]: 0x5f; [3]: 0x00
Reg. 0x103F (Device Security Configuration): [0]: 0x45; [1]: 0x00; [2]: 0xff; [3]: 0xff
- NFC security: plain password
- Configuration area is not read and write protected from NFC perspective
- PP_AREA_1: 0xFFFF (is pointing outside the user memory)
Reg. 0x1020 (Read Password): [0]: 0x00; [1]: 0x00; [2]: 0x00; [3]: 0x00
- Read Password is 0x00000000
Reg. 0x1021 (Write Password): [0]: 0x00; [1]: 0x00; [2]: 0x00; [3]: 0x00
- Write Password is 0x00000000
Reg. 0x1058 (NFC Protection Pointer): [0]: 0x08; [1]: 0x30; [2]: 0x00; [3]: 0x00
- NFC_PP_AREA_0H: 0x08
- NFC_PPC: 0x30 (AREA_0-H is write and read protected; AREA_0-L is not read and write protected)
Reg. 0x100C: [0]: 0x00; [1]: 0x81; [2]: 0x00; [3]: 0x00
- NFC_GCH: 0x81 (The NFC passwords can be read and written with the READ CONFIG
          and WRITE CONFIG commands)
 
Memory organization:
0x00 - 0x08 --> NFC_AREA_0_L (is not read and write protected)
0x08 - end of memory --> NFC_AREA_0_H (read and write protected)
 
Regards,
NSF
0 Kudos
Reply

553 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Please, try performing SET PASSWORD for both Read and Write, and then try writing to the block.

Regards,
Eduardo.

0 Kudos
Reply

505 Views
NSF
Contributor I

Hi @EduardoZamora 

Thank you for your reply.
In the screenshots I sent in the ticket, you can see that in the SET PASSWORD command I used 0x01 for reading and 0x02 for writing. From the tests I ran, only the read command in a read-protected memory region worked. For writing in a write-protected memory region, I used the following commands:
- SET PASSWORD with password identifier 0x02; this command worked;
- WRITE in register 0x14, for example; this command returns 0x01 0x0F.

Based on these tests I performed and the register values I sent in my previous reply, can you replicate the same scenario on your end?
Is there any configuration error in either the register values or the commands?
Thank you for your help.

Regards,
NSF

0 Kudos
Reply

490 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Try the following sequence:

- SELECT NTAG
- Get Random Number
- SET PASSWORD for PID 01
- SET PASSWORD for PID 02
- Write to register 0x14

Regards,
Eduardo.

407 Views
NSF
Contributor I
Good morning,
Yes, we already tested it and it was resolved. Thank you very much,
NSF
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2259945%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EProblem%20with%20NTAG%20protected%20in%20NFC%20side%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2259945%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20am%20using%20the%20NXP%20tag%20NTP5332%20and%20actually%20I%20has%20problems%20with%20commands%20that%20are%20sent%20via%20NFC%20using%20customized%20mobile%20app.%20On%20the%20NFC%20side%2C%20I%20am%20having%20problems%20writing%20to%20a%20password-protected%20memory%20region.%20To%20read%20a%20memory%20region%20protected%20against%20reading%2C%20I%20follow%20the%20sequence%20of%20commands%20described%20above%2C%20changing%20only%20the%20Password%20Identifier%20to%200x01%20and%20the%20operation%20to%20read%3B%20in%20this%20case%2C%20the%20read%20operation%20is%20successful.%20If%20the%20password%20protection%20against%20reading%20and%20writing%20is%20removed%2C%20the%20read%20and%20write%20commands%20work%20without%20any%20problems.%3C%2FP%3E%3CP%3ECan%20anyone%20help%20me%20with%20these%20issues%3F%20Am%20I%20sending%20the%20wrong%20command%3F%3CBR%20%2F%3EThanks%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2263097%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Problem%20with%20NTAG%20protected%20in%20NFC%20side%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263097%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257913%22%20target%3D%22_blank%22%3E%40NSF%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EHope%20you%20are%20doing%20well.%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20confirm%20that%20is%20the%20memory%20region%20you%20are%20trying%20to%20write%20to%20(User%20memory%20or%20Configuration%20memory)%3F%3C%2FP%3E%0A%3CP%3EWhat%20is%20the%20configuration%20of%20your%20Protection%20Pointer%20and%20related%20conditions%3F%3C%2FP%3E%0A%3CP%3EIs%20there%20any%20chance%20you%20have%20perform%20a%20Lock%20operation%20to%20the%20region%20you%20are%20trying%20to%20write%3F%20What%20is%20the%20value%20of%20your%20NFC%20Lock%20Block%20Configuration%20blocks%3F%3C%2FP%3E%0A%3CP%3EPlease%20consider%20that%20we%20recommend%20using%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fsoftware%2Frfid-developer-resources%2Ftaplinx-software-development-kit-sdk%3ATAPLINX%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ETapLinx%20SDK%3C%2FA%3E.%20This%20SDK%20provides%20some%20tools%20for%20contactless%20applications%20development%20in%20smartphones.%20The%20open%20API%20allows%20developers%20open%20access%20to%20all%20hardware%20features%20of%20NXP%E2%80%98s%20NFC%20product%20portfolio.%20It%20provides%20a%20subset%20of%20features%20for%20quick%20and%20easy%20development%20of%20lightweight%20applications.%3C%2FP%3E%0A%3CP%3ERegards%2C%3CBR%20%2F%3EEduardo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2263747%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Problem%20with%20NTAG%20protected%20in%20NFC%20side%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263747%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F200888%22%20target%3D%22_blank%22%3E%40EduardoZamora%3C%2FA%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EThanks%20for%20your%20reply!%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EThese%20are%20the%20configurations%20that%20the%20NFC%20tag%20has%3A%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EReg.%200x1037%20(Configuration%20Bytes)%3A%20%5B0%5D%3A%200x09%3B%20%5B1%5D%3A%200x00%3B%20%5B2%5D%3A%200x5f%3B%20%5B3%5D%3A%200x00%3C%2FDIV%3E%3CDIV%3EReg.%200x103F%20(Device%20Security%20Configuration)%3A%20%5B0%5D%3A%200x45%3B%20%5B1%5D%3A%200x00%3B%20%5B2%5D%3A%200xff%3B%20%5B3%5D%3A%200xff%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%20NFC%20security%3A%20plain%20password%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%20Configuration%20area%20is%20not%20read%20and%20write%20protected%20from%20NFC%20perspective%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%20PP_AREA_1%3A%200xFFFF%20(is%20pointing%20outside%20the%20user%20memory)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3EReg.%200x1020%20(Read%20Password)%3A%20%5B0%5D%3A%200x00%3B%20%5B1%5D%3A%200x00%3B%20%5B2%5D%3A%200x00%3B%20%5B3%5D%3A%200x00%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%20Read%20Password%20is%200x00000000%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3EReg.%200x1021%20(Write%20Password)%3A%20%5B0%5D%3A%200x00%3B%20%5B1%5D%3A%200x00%3B%20%5B2%5D%3A%200x00%3B%20%5B3%5D%3A%200x00%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%20Write%20Password%20is%200x00000000%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3EReg.%200x1058%20(NFC%20Protection%20Pointer)%3A%20%5B0%5D%3A%200x08%3B%20%5B1%5D%3A%200x30%3B%20%5B2%5D%3A%200x00%3B%20%5B3%5D%3A%200x00%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%20NFC_PP_AREA_0H%3A%200x08%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%20NFC_PPC%3A%200x30%20(AREA_0-H%20is%20write%20and%20read%20protected%3B%20AREA_0-L%20is%20not%20read%20and%20write%20protected)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3EReg.%200x100C%3A%20%5B0%5D%3A%200x00%3B%20%5B1%5D%3A%200x81%3B%20%5B2%5D%3A%200x00%3B%20%5B3%5D%3A%200x00%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E-%20NFC_GCH%3A%200x81%20(The%20NFC%20passwords%20can%20be%20read%20and%20written%20with%20the%20READ%20CONFIG%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20and%20WRITE%20CONFIG%20commands)%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EMemory%20organization%3A%3C%2FDIV%3E%3CDIV%3E0x00%20-%200x08%20--%26gt%3B%20NFC_AREA_0_L%20(is%20not%20read%20and%20write%20protected)%3C%2FDIV%3E%3CDIV%3E0x08%20-%20end%20of%20memory%20--%26gt%3B%20NFC_AREA_0_H%20(read%20and%20write%20protected)%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3ERegards%2C%3C%2FDIV%3E%3CDIV%3ENSF%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2264196%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Problem%20with%20NTAG%20protected%20in%20NFC%20side%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264196%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EPlease%2C%20try%20performing%20SET%20PASSWORD%20for%20both%20Read%20and%20Write%2C%20and%20then%20try%20writing%20to%20the%20block.%3C%2FP%3E%0A%3CP%3ERegards%2C%3CBR%20%2F%3EEduardo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2264738%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Problem%20with%20NTAG%20protected%20in%20NFC%20side%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264738%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EAny%20progress%2C%26nbsp%3B%3CSPAN%3Eam%20having%20the%20same%20problem%20writing%20to%20a%20password-protected%20memory%20region.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBest%20Regards%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265252%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Problem%20with%20NTAG%20protected%20in%20NFC%20side%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265252%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3ETry%20the%20following%20sequence%3A%3C%2FP%3E%0A%3CP%3E-%20SELECT%20NTAG%3CBR%20%2F%3E-%20Get%20Random%20Number%3CBR%20%2F%3E-%20SET%20PASSWORD%20for%20PID%2001%3CBR%20%2F%3E-%20SET%20PASSWORD%20for%20PID%2002%3CBR%20%2F%3E-%20Write%20to%20register%200x14%3C%2FP%3E%0A%3CP%3ERegards%2C%3CBR%20%2F%3EEduardo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2264729%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Problem%20with%20NTAG%20protected%20in%20NFC%20side%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264729%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F200888%22%20target%3D%22_blank%22%3E%40EduardoZamora%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20reply.%3CBR%20%2F%3EIn%20the%20screenshots%20I%20sent%20in%20the%20ticket%2C%20you%20can%20see%20that%20in%20the%20SET%20PASSWORD%20command%20I%20used%200x01%20for%20reading%20and%200x02%20for%20writing.%20From%20the%20tests%20I%20ran%2C%20only%20the%20read%20command%20in%20a%20read-protected%20memory%20region%20worked.%20For%20writing%20in%20a%20write-protected%20memory%20region%2C%20I%20used%20the%20following%20commands%3A%3CBR%20%2F%3E-%20SET%20PASSWORD%20with%20password%20identifier%200x02%3B%20this%20command%20worked%3B%3CBR%20%2F%3E-%20WRITE%20in%20register%200x14%2C%20for%20example%3B%20this%20command%20returns%200x01%200x0F.%3C%2FP%3E%3CP%3EBased%20on%20these%20tests%20I%20performed%20and%20the%20register%20values%20I%20sent%20in%20my%20previous%20reply%2C%20can%20you%20replicate%20the%20same%20scenario%20on%20your%20end%3F%3CBR%20%2F%3EIs%20there%20any%20configuration%20error%20in%20either%20the%20register%20values%20or%20the%20commands%3F%3CBR%20%2F%3EThank%20you%20for%20your%20help.%3C%2FP%3E%3CP%3ERegards%2C%3CBR%20%2F%3ENSF%3C%2FP%3E%3C%2FLINGO-BODY%3E