cancel
Showing results for 
Search instead for 
Did you mean: 

enSTSW_ST25RFAL001_v2.4.zip newer rfal code than nfc5_v2.0.0 zip - compile problems

EKrie.1
Associate II

I found the file enSTSW_ST25RFAL001_v2.4.zip, it appears newer than the rfal code from the main project zip file en.x-cube-nfc5_v2.0.0 zip file. I tried to merge it in to see if it gets me past trouble reading ST25TV tags, but there are a lot of compile

 I tried to merge it in to see if it gets me past trouble reading ST25TV tags, but there are a lot of compile problems. The file names are different and I'm having trouble merging into my STM32L476-Nucleo-PollingTagDetect project. Is this worth trying to do? Might I be able to read ST25TV tags if I upgrade to the latest rfal directories?

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

I would suggest to use the latest ST25 Embedded NFC library rather than the standalone version of the RFAL.

Can you detail the trouble you have when reading ST25TV tags?

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

7 REPLIES 7
Brian TIDAL
ST Employee

Hi,

I would suggest to use the latest ST25 Embedded NFC library rather than the standalone version of the RFAL.

Can you detail the trouble you have when reading ST25TV tags?

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.
I used the example code and it would sometimes read tagstand tags, but was not particularly reliable. I tried to modify the code to be able to write data, but kept running into different errors. I tried to turn on more debugging information, but that didn't help. I started trying to merge in the newer rfal source code - but that was difficult and you sound like that is not recommended. Here are some of the error messages I got while trying to read a tag and just rewrite a token data byte on a tag to prove that writing works:
ISO15693/NFC-V Infrascanner card found. UID: E002230082770692
System Information
* 1 byte(s) memory addressing
* DFSID=00h
* AFI=00h
* 64 blocks, 4 bytes per block
* ICRef=23h
NDEF NOT DETECTED (ndefPollerNdefDetect returns 5)
Operation completed
Tag can be removed from the field Infrascanner Firmware
1. Tap a tag to read its content
ISO15693/NFC-V Infrascanner card found. UID: E002230082770692
System Information
* 1 byte(s) memory addressing
* DFSID=00h
* AFI=00h
* 64 blocks, 4 bytes per block
* ICRef=23h
NDEF NOT DETECTED (ndefPollerNdefDetect returns 5)
Operation completed
Tag can be removed from the field Infrascanner Firmware
1. Tap a tag to read its content
ISO15693/NFC-V Infrascanner card found. UID: E00223019F6B3100
System Information
* 1 byte(s) memory addressing
* DFSID=00h
* AFI=00h
* 64 blocks, 4 bytes per block
* ICRef=23h
INITIALIZED NDEF detected.
NDEF Capability Container
* Block Length: 4
* 4 bytes CC
* Magic: E1h Version: 1.0 MLEN: 31 (248 bytes)
* readAccess: 00h writeAccess: 00h
* [ ] Special Frame
* [X] Multiple block Read
* [ ] Lock Block
CC Raw Data (length 4)
[0000] E1 40 20 01 | . @ . |
NDEF Len: 0, Offset=6
entered NDEF_DEMO_READ EXITTING because not inited Operation completed
Tag can be removed from the field Infrascanner Firmware
1. Tap a tag to read its content
ISO15693/NFC-V Infrascanner card found. UID: E00223019F6B3100
Brian TIDAL
ST Employee

Hi,

Can you confirm you are using ST25TV02K tags?

NDEF NOT DETECTED (ndefPollerNdefDetect returns 5) means that the tag has not been NDEF formatted (i.e. Capability Container missing or NDEF TLV missing). Can you dump the memory content of tag E002230082770692 and provide this dump to me so that I can analyze it?

Regarding tag E00223019F6B3100, can you elaborate on EXITTING because not inited Operation completed ? This log is not in the original demo. On tag E00223019F6B3100, the NDEF L-field equals to 0 so the NDEF is empty (aka "INITIALIZED NDEF" state)

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.
Yes, I have tried more than 1 tagstand ST25TV02K tag. I did go through the tag format operation, but that did not seem to help. My current code shows the following output:
1. Tap a tag to read its content
2. Present a tag to write a Text record
3. Present a tag to write a URI record and an Android Application record
4. Present an ST tag to format
ISO15693/NFC-V Infrascanner card found. UID: E00223019F6B3100
System Information
* 1 byte(s) memory addressing
* DFSID=00h
* AFI=00h
* 64 blocks, 4 bytes per block
* ICRef=23h
INITIALIZED NDEF detected.
NDEF Capability Container
* Block Length: 4
* 4 bytes CC
* Magic: E1h Version: 1.0 MLEN: 31 (248 bytes)
* readAccess: 00h writeAccess: 00h
* [ ] Special Frame
* [X] Multiple block Read
* [ ] Lock Block
CC Raw Data (length 4)
[0000] E1 40 20 01 | . @ . |
NDEF Len: 0, Offset=6
Formatting Tag...
Tag formatted
Operation completed
Tag can be removed from the field Infrascanner Firmware
1. Tap a tag to read its content
ISO15693/NFC-V Infrascanner card found. UID: E00223019F6B3100
NDEF NOT DETECTED (ndefPollerContextInitialization returns 4)
Operation completed
Tag can be removed from the field Infrascanner Firmware
1. Tap a tag to read its content
ISO15693/NFC-V Infrascanner card found. UID: E00223019F6B3100
System Information
* 1 byte(s) memory addressing
* DFSID=00h
* AFI=00h
* 64 blocks, 4 bytes per block
* ICRef=23h
INITIALIZED NDEF detected.
NDEF Capability Container
* Block Length: 4
* 4 bytes CC
* Magic: E1h Version: 1.0 MLEN: 31 (248 bytes)
* readAccess: 00h writeAccess: 00h
* [ ] Special Frame
* [X] Multiple block Read
* [ ] Lock Block
CC Raw Data (length 4)
[0000] E1 40 20 01 | . @ . |
NDEF Len: 0, Offset=6
entered NDEF_DEMO_READ EXITTING because not inited Operation completed
Tag can be removed from the field Infrascanner Firmware
1. Tap a tag to read its content
Yes, my current code running on the board is modified. I deleted that whole set of code and the project, but at the moment for some reason I'm having trouble creating a new buildable project with the original nfc-v2.0.0 directory I downloaded. What i the trick to create a STMCUBEIDE project file from that directory so I can start fresh?
thanks so much, Eric
Brian TIDAL
ST Employee

Hi Eric,

as the default memory factory setting is 00h, unless you format the tag, the NDEF Detect will return NDEF NOT DETECTED (ndefPollerNdefDetect returns 5). So make sure to have the tag being NDEF initialized. Once the tag is formatted, it contains an empty NDEF (e.g an NDEF TLV with L-field=0). In that case, NDEF Detect returns state=INITIALIZED NDEF and NDEF Read returns an error as the NDEF is empty.

Do you use the X-NUCLEO-NFC05A1 or your own HW?

If you want to restart from fresh in STM32CubeIDE, you have first to remove the 'old' project from the workspace. If you restart from fresh, I would recommend to use the latest ST25 Embedded NFC library for ST25R3911B.

Can you provide more details about your application?

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.
BT,
I downloaded and installed the library you mentioned. I found a projects/STM32L476RF-Nucleo/Applications/X-Nucleo-nfc5a1/polling/stm32cubeIDE and it had a .cproject file so I was able to bulid, run / debug that project. It would show some data from a tag. But I need to be able to write data on tags - and it sounds like I need to format them to do that. But then, I found built and debuged the ndef_rw project and it allows me to format, read and write a string to a tag. I need to demonstrate maintaining a count of the number of times a tag has been presented. So I will plan on making a 5th button press option that reads the string left in the #2 option and then rewrites it with an incremented count field. I assume that wouldn't be too hard to write by just using pieces of existing code?
thanks, Eric
Brian TIDAL
ST Employee

Hi Eric

NDEF is a structured message that requires to have the tag having a specific header (called Capability Container) in block #0 and a specific TLV after block #0. This is why you need to format a tag when you want to use NDEF.

But a tag can be used without NDEF and each block of memory can be written thanks to the WRITE SINGLE BLOCK command. In that case, no need to format the tag. The WRITE SINGLE BLOCK command is demonstrated in the demoNfcv() function of demo_polling.c file of the polling demo. You just need to enable DEMO_NFCV_WRITE_TAG to true in the global defines. Regarding the counter, I would suggest you use the counter feature of the ST25TV (see §5.7 in the datasheet). You can use rfalST25xVPollerReadConfiguration and rfalST25xVPollerWriteConfiguration from rfal_st25xv.c to read and write the counter registers.

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.