cancel
Showing results for 
Search instead for 
Did you mean: 

How read multiple rfid tags simultaneously using X-CUBE-NFC6 example

Mihaita Ivascu
Associate III

Hello,

 

     I am working with X-CUBE-NFC6 example and I am able to read and write data to a rfid tag successfully.

     Just as a note, hw configuration is nucleo U083RC boards with NFC08A1 expander board for rfid reader.

     I would like to be able to read 2 or 3 tags at the same time but checking the demoCycle() function  code in the app_x-cube-nfcx.c I am not sure it's possible , I would have to discard a tag once it's read so it's not detected again and others tags are read ?

 

Thanks,

     Mihai

     

4 REPLIES 4
Ulysses HERNIOSUS
ST Employee

Hi,

you will need to use rfalNfcDeactivate() with RFAL_NFC_DEACTIVATE_SLEEP. Then you can use rfalNfcSelect() on one of the other discovered tags.

Which tags are you addressing?

BR, Ulysses

Hello,

 

    Thanks for the quick reply.

    Will use these parts:

https://www.digikey.com/en/products/detail/sag/440170527-0802801/22081501

https://www.digikey.com/en/products/detail/texas-instruments/RF-HDT-DVBB-N2/2095793

https://www.digikey.com/en/products/detail/sag/420970545-0230401/22081500

 

all are  ISO15693

 

    is there any example available for RFAL_NFC_DEACTIVATE_SLEEP ?

 

Thanks,

      Mihai

 

Grégoire Poulain
ST Employee

Hi Mihai,

ISO15693 tags, also known as T5T, use no protocol (ISO-DEP / NFC-DEP), and have no particular deactivation activity/sequence.
Therefore the rfalNfcDeactivate(RFAL_NFC_DEACTIVATE_SLEEP) does not apply.


In order to support multiple tags and handle them unequivocally, one should make use of their UIDs (Unique Identifiers) also referred as NFCID.
In short, one shall proceed as follows:

 

  1. Start Discovery with multiple devices enabled
    rfalNfcDiscover()
    devLimit = n          where n shall indicate the number of multiple tags aimed to support

  2. When several tags are detected, the application layer is notified and the tag details, including their UID/NFCID can be retrieved via
    rfalNfcGetDevicesFound()

    The tag UID is available on nfcDevice.nfcid with a length of nfcDevice.nfcidLen. 
    It is associated to the device discovery ID


  3. Activate/Select a specific tag based on its ID
    rfalNfcSelect( ID )

  4. Perform the actions required via normal data exchange, and on your application layer mark this Tag (identifiable via UID) as done

  5. Deactivate and restart Discovery again
    rfalNfcDeactivate(RFAL_NFC_DEACTIVATE_DISCOVERY)

  6. Repeat from step 2 iterating through the tags that are not marked as done (step 4), until all have been handled



Kind regards
GP

 

Hello GP,

 

     Thanks a lot for the detailed explanation. Will give it a try and let you know what I was able to do.

 

Thanks,

     Mihai