2023-08-17 09:40 AM
Hi!
I have a case where I want to read all tags in area one by one. Issue is that if I call `HLTA` command, even after selecting a tag, all tags in area go to sleep. Is this intended behavior in ISO 14443A protocol or I am doing something wrong?
Hlta -> https://github.com/jspngh/st25r3911b/blob/master/src/lib.rs#L275
Select -> https://github.com/xpresshd/st25r3911b/blob/master/src/lib.rs#L575
Thanks!
Solved! Go to Solution.
2023-08-22 01:50 AM
Hi,
Thanks for the trace. If I understand properly,
In that case, the Field has to be set to the off condition for a duration of tFIELD_OFF (5.1ms) before repeating the UID retrieval.
If you repeat twice the collision resolution activity without a field reset between the 2 collision resolution, the first time all tags will be found (because all tags are initially in Idle state), the second time only one tag will be found (because all tags are in SLEEP_A, then move to READY_A* when the ALL_REQ/WUPA is issued and as soon as a SEL_REQ is sent to a given tag, the other tags returns to SLEEP_A).
Rgds
BT
2023-08-18 01:12 AM - edited 2023-08-18 01:36 AM
Hi,
tags enter in SLEEP_A or SLEEP_AF state only
Can you elaborate on " if I call `HLTA` command, even after selecting a tag, all tags in area go to sleep"?
If you want to "read" all tags in the operating field, I would suggest
The Collision Resolution Activity is a loop that selects one device after the other. Multiple devices can be identified by selecting all cascade levels of one device before restarting the algorithm to select the next device. Before restarting the algorithm, the device identified is sent to SLEEP_A State to exclude it from the remaining collision resolution process.
The Device Activation Activity activates one device out of the set of devices identified during the Collision Resolution Activity. Other identified NFC-A devices stay in SLEEP_A.
Rgds
BT
2023-08-18 02:10 AM
Thanks for a response!
> Can you elaborate on " if I call `HLTA` command, even after selecting a tag, all tags in area go to sleep"?
I want to read all tags in area. If I don't use `HLTA` call then there is a chance that I will be stuck in loop reading just few tags. Now if I send `HLTA` then all of tags in area don't respond to my `REQA` request anymore.
- to perform the NFC Forum Collision Resolution Activity to detects the presence of multiple devices and enumerates the different identifiers
- then to perform the NFC Forum Device Activation Activity to activate a particular device and read its content
- then to perform the NFC Forum Device Deactivation Activity to deactivate this device to end communication and to enable possible activation of another device
So I do 1. step and using anticollision find 1 tag identifier. What do you mean by "NFC Forum Device Activation Activity"? Do I need to read its content for it to be selected?
From what I understand I miss a step between running my anticollision loop and calling a hlta instruction. But what is this step?
2023-08-18 05:40 AM
Hi,
You can find a C implementation of those activities inside X-CUBE-NFC5 Firmware package (functions rfalNfcaPollerStartFullCollisionResolution/rfalNfcaPollerGetFullCollisionResolutionStatus and rfalNfcaPollerStartSelect/rfalNfcaPollerGetSelectStatus). This can be a basis for your own implementation in Rust Programming Language.
Basically, for the Collision Resolution:
At the end of the collision resolution, you will have a list of tag with their UID/NFCID1. All those tags will be in SLEEP state (except maybe the last one if you skip the step #5 for the last tag). So, none of those tags will reply to REQA/SENS_REQ.
For the activation of a given tag from the list of sleeping tags:
Then you can send your commands to read the tag.
To deactivate a tag:
Rgds
BT
2023-08-18 06:22 AM
6 steps listed is what I do now in Rust library.
Issue is that if I have 2+ tags in field and I do WUPA -> select with anti collision -> get UID -> HLTA -> REQA -> select with anti collision -> no response ( Here I would expect to get next tag UID)
So it seems to me that HLTA put all tags in sleep state.
2023-08-18 07:23 AM
Hi,
in the step #6 (REQA), do you receive an answer from the second tag?
Can you describe your HW setup:
"So it seems to me that HLTA put all tags in sleep state." this would be none compliant tags...
Rgds
BT
2023-08-21 01:55 AM
I tried with disco board and windows gui software and it seems to run fine.
2023-08-21 06:21 AM
Hi,
if you toggle the field On/Off/On, all tags will return to Idle state and it is likely that you will detect the same tag again and again.
Can you connect a logic analyzer on SPI (CLK/MOSI/MISO/CS) and ST25R3911B_IRQ pins and send me the trace file from initialization up to tag reading/ Sleep/ 2nd tag select?
Thanks
Rgds
BT
2023-08-21 06:41 AM
Actually if I replace wupa with field restart it solves my issue.
Here is capture where I keep field on. My tags are already on antenna from the start. First it reads both tags and then just one even after WUPA call
Capture
https://drive.google.com/file/d/1o9rzkzOWnQP6sZISLM1s_lf89QjXph5u/view?usp=sharing
2023-08-22 01:50 AM
Hi,
Thanks for the trace. If I understand properly,
In that case, the Field has to be set to the off condition for a duration of tFIELD_OFF (5.1ms) before repeating the UID retrieval.
If you repeat twice the collision resolution activity without a field reset between the 2 collision resolution, the first time all tags will be found (because all tags are initially in Idle state), the second time only one tag will be found (because all tags are in SLEEP_A, then move to READY_A* when the ALL_REQ/WUPA is issued and as soon as a SEL_REQ is sent to a given tag, the other tags returns to SLEEP_A).
Rgds
BT