2021-03-18 08:15 AM
Hello to all!
I have boards - NUCLEOL476RG and X-NUCLEO-NFC06A1 with project "STM32L476RG-Nucleo_PollingTagDetectNdef" running on it.
And got an error when trying to read any tag:
When debugging program i found that error, its here in the code, doesn't match
apduParam->statusWord == RFAL_T4T_ISO7816_STATUS_COMPLETE
The walue of statusWord is 27266 instead of 36864 (0x9000)
Appreciate for help and sorry for my english))
Solved! Go to Solution.
2021-03-24 04:48 AM
Hi, Ulysses!
T3T (NFC) is not necessarily the final option, just T4T (NFC-A) in tag emulation mode does not work at all, but is partially defined as NFC-F. I need the technology that will work better with the phone.
NFC Tools app is currently all that I have on android, there is also an NFC TagWriter app with less functionality. At the moment, I do not have the ability to write for android. Now I want to make the data exchange between the phone and the X-NUCLEO-NFC06A1 board in such a way that the phone and the board change roles as NFC tag and reader/writer. Having only the NFC Tools app on Android, I do not know how to exchange data in another way.
Best regards.
2021-03-24 05:43 AM
Hi VIVAN.1,
in my experiments both T3T and T4T worked for reading NDEF: Define ST25R3916 and change the line discParam.techs2Find |= RFAL_NFC_LISTEN_TECH_F; -> discParam.techs2Find = RFAL_NFC_LISTEN_TECH_A;
This is for v1.1.0 of X-CUBE-NFC6.
Similar for v1.0.0: Set discParam.techs2Find = (RFAL_NFC_LISTEN_TECH_A );
What you describe above with changing roles sounds like a mixture of NFC Forum ACM (Active Communication Mode aka Actiive P2P) and TNEP. Not sure if I would go such road.
IMO as described above on top of ISODEP you can do any kind of bi-directional communication (using APDUs or not) and would be less likely to run into any limitations due to the field switches or specific phone behaviors. Just rely on a well-understood communication channel.
Best Regards, Ulysses
2021-03-24 06:34 AM
Hi,
I set it up this way in demo.h file:
and RFAL_FEATURE_LISTEN_MODE set to true,
which gave the same result, i checked discParam.techs2Find value in debug mode:
0x5000 means that RFAL_NFC_LISTEN_TECH_A and RFAL_NFC_LISTEN_TECH_F are enabled.
You said that T4T working, how you recognize it? Phone polling both NFC-A and NFC-F simultaneously (and maybe more tech's) and if both technologies are enabled on the board, then only NFC-F is recognized by the phone, so I disable NFC-A here:
But if I only enable NFC-A, it is also recognized as NFC-F, but the label content (payload) cannot be read, that's all avaible info:
2021-03-24 06:39 AM
Yes, I read above about ISODEP and APDU, but can I implement something in this direction, having only NFC Tools or do I need my own application on Android?
Best regards
2021-03-24 06:57 AM
Just checked,
i uncomment
case RFAL_NFC_POLL_TYPE_NFCA:
in demoCycle() function, i.e. i enabled NFC-A tag mode, and run debug, and find out that program doen't entering in demoCeT4TRead() function and even in demoCeT4T(), so NFC-A mode doesn't working for some reason.
2021-03-24 07:04 AM
Do you try writing tag?
2021-03-24 07:16 AM
Hi,
the trick should not be playing with the state machine but just change techs2Find.
Please try the attached hex, it was compiled according to my above instructions.
Yes, with my proposal you need to have your own Android app.
Not sure what you want exactly you want to achieve. Just reading/writing some messages to trigger an action?
Regards, Ulysses
2021-03-24 08:13 AM
Hi,
writing didn't work. But it cannot be much effort to fix it.
Regards, Ulysses
2021-03-24 08:26 AM
Hi,
I used your hex and the result of reading the label is the same as yours. I did as you said, changed tech2find and I recognized the NFC-A tag, okay. The writing is more difficult, the text or URL is written in ndefFile, I looked in debugging, but the problem is that when reading the label in ndefFile, the default entry is written again - the address of the page st25demo.
Writing to NFC-F problems doesn't change.
Regards
2021-03-24 08:28 AM
At this stage, I need to implement data exchange between the board and the phone without an android application.
So right now, only the map emulation mode is suitable for me. Later, I'll look in the direction of ISODEP. We will assume that I will need both options.