cancel
Showing results for 
Search instead for 
Did you mean: 

X-nucleo-nfc05a1 + NucleoL476RG: NTAG read/write issue

Tomoki Prugger
Associate

During the first tests, using the suggested combo x-nucleo-nfc05a1 + NucleoL476RG, we noticed something strange: swiping an example NFC tag (see attachment) resulted in a failure, when it seemed to be a classic NTAG213.

Digging into the code (X-CUBE-NFC5 library) we found that in the file ndef_t2t.c, line 360-364, if the TLV type field has Lock Control TLV or Memory Control TLV, any NDEF operation for the badge fails. Returning ERR_REQUEST(5).

As you can see in the source code, it is explicitly stated that “ /* No support of Lock control or Memory control in this version */ ”.  Then, if we comment out that portion of the code, we can read and write the TAG without problems.

Is this a known problem? It looks strange to us that the driver can’t handle this case, while other systems (e.g., ST25 mobile app) have no issues with the same NFC tag.  

Maybe the X-CUBE-NFC5 library is not updated?

Thank you for your support.

Best regards,

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi @Tomoki Prugger 

this known limitation of X-CUBE-NFC5 is fixed in STSW-ST25R-LIB ST25 embedded NFC library (STSW-ST25R015): Lock Control TLV and Memory ControlTLV are now managed inside the NDEF Lib of STSW-ST25R015.

"Then, if we comment out that portion of the code, we can read and write the TAG without problems." This will work as long as the NDEF does not collide with Reserved Areas or Dynamic Lock Area.  As NTAG213 has no Reserved Area and has a Dyn Lock Area located at the end of the 144 bytes T2T_Area, it should not cause any issue to  ignore the Lock Control TLV.

 

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Brian TIDAL
ST Employee

Hi @Tomoki Prugger 

this known limitation of X-CUBE-NFC5 is fixed in STSW-ST25R-LIB ST25 embedded NFC library (STSW-ST25R015): Lock Control TLV and Memory ControlTLV are now managed inside the NDEF Lib of STSW-ST25R015.

"Then, if we comment out that portion of the code, we can read and write the TAG without problems." This will work as long as the NDEF does not collide with Reserved Areas or Dynamic Lock Area.  As NTAG213 has no Reserved Area and has a Dyn Lock Area located at the end of the 144 bytes T2T_Area, it should not cause any issue to  ignore the Lock Control TLV.

 

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.