2020-01-23 02:23 AM
I am a student and am trying to get the sample program working for the x-nucleo-nfc03a1 working. I am using the Truestudio IDE and the board is docked to the stm32-nucleo-401re.
it compiles but when I try to run the sample program it gets stuck failing the initialize the rfal.
any help would be appreciated
Solved! Go to Solution.
2020-01-24 01:35 AM
Hi,
STM32F401RE_NUCLEO_PollingTagDetectNdef.bin contains the NDEF demo supporting NDEF read / write for T2T, T3T, T4T and T5T tags. The T2T NDEF formated tag you are using is supported and has been tested. Example of NDEF read of a formated T2T tag:
ISO14443A/NFC-A card found. UID: 04BCE8B2551D80
INITIALIZED NDEF detected.
NDEF Capability Container
* Magic: E1h Version: 1.0 Size: 6 (48 bytes)
* readAccess: 00h writeAccess: 00h
CC Raw Data (length 4)
[0000] E1 10 06 00 | . . . . |
NDEF Len: 0, Offset=18
Operation completed
Make sure to have the tag being really NDEF formatted i.e Capability Container present with proper values + NDEF TLV present.
Example:
[003] E1 10 06 00
E1 CC0: Magic Number E1h
10 CC1: version 1.0
06 CC2: MLEN = 06h (48 bytes)
00 CC3: readAccess: 00h writeAccess: 00h
[004] 03 00 FE 00
03 T-field: 03h (NDEF Message TLV)
00 L-field: 00h No V-Field
FE T-fielf: FEh (Terminator TLV)
You can use some Android applications from the manufacturer of this tag to properly format the tag for NDEF.
Rgds
BT
P.-S. : I believe P2P is not used in your case. Just standard communication with T2T tag.
2020-01-23 07:18 AM
Hi,
would you please confirm that you have the following setup:
Please make sure to have the X-NUCLEO-NFC03A1 expansion board being properly plugged into the Nucleo board (check that all pins are correctly inserted)
X-CUBE-NFC3 2.1.0 supports:
I would suggest to use STM32CubeIDE instead of Truestudio IDE.
X-CUBE-NFC3 2.1.0 includes binary files for the demos provided in the package (see STM32CubeExpansion_NFC3_V2.1.0\Projects\STM32F401RE-Nucleo\Applications\PollingTagDetect\Binary). Would you please download the binary file for the poller demo and check that system is operational ("Initialization succeeded.." message on the serial display)? You just need to drag & drop the STM32F401RE_NUCLEO_PollingTagDetect.bin binary to the NODE_F401RE drive to download it into the Nucleo board.
Rgds
BT
2020-01-23 09:41 AM
Thanks for the response. I am now downloading the STM32CubeIDE. Also upon using a different nfc expansion board it works sort of. It now initializes and detects my tags but cant open the p2p to write to my tags. The tag i have is mifareultralight/NFCA ndef formatted.
again thanks for the help
2020-01-24 01:35 AM
Hi,
STM32F401RE_NUCLEO_PollingTagDetectNdef.bin contains the NDEF demo supporting NDEF read / write for T2T, T3T, T4T and T5T tags. The T2T NDEF formated tag you are using is supported and has been tested. Example of NDEF read of a formated T2T tag:
ISO14443A/NFC-A card found. UID: 04BCE8B2551D80
INITIALIZED NDEF detected.
NDEF Capability Container
* Magic: E1h Version: 1.0 Size: 6 (48 bytes)
* readAccess: 00h writeAccess: 00h
CC Raw Data (length 4)
[0000] E1 10 06 00 | . . . . |
NDEF Len: 0, Offset=18
Operation completed
Make sure to have the tag being really NDEF formatted i.e Capability Container present with proper values + NDEF TLV present.
Example:
[003] E1 10 06 00
E1 CC0: Magic Number E1h
10 CC1: version 1.0
06 CC2: MLEN = 06h (48 bytes)
00 CC3: readAccess: 00h writeAccess: 00h
[004] 03 00 FE 00
03 T-field: 03h (NDEF Message TLV)
00 L-field: 00h No V-Field
FE T-fielf: FEh (Terminator TLV)
You can use some Android applications from the manufacturer of this tag to properly format the tag for NDEF.
Rgds
BT
P.-S. : I believe P2P is not used in your case. Just standard communication with T2T tag.
2020-01-30 08:22 AM
Thanks for all your help. I have gotten it working now. Can I ask a question is there a resource to explain the nfc functions in the libraries? my ultimate goal is to read a plain text message stored on my TAG and transmit that message to a phone via bluetooth.
2020-02-03 01:03 AM
Hi,
For the documentation:
NDEF API examples can be found in : STM32CubeExpansion_NFC3_V2.1.0\Middlewares\ST\ndef\doc\examples.
The PollingTagDetectNdef demo code can also be used for your needs
Rgds
BT