cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read multiple NFC tags with library STSW-ST25R016?

NKarl.1
Associate

Hi,

I'm using NFC reader chip ST25R3916 and the library STSW-ST25R016 on a Nucleo 64 dev board. To get started I compiled the polling example. I want to be able to detect and activate multiple tags, one by one. In demo_polling.c, I changed discParam.devLimit to 5. After that change, it will detect that I put two tags on the reader. It will select the first tag in the device list and print the ID for that tag. In

static void demoNotif( rfalNfcState st )

it will select the first tag (rfalNfcSelect(0)). How can I halt that tag and select the next tag? How can I get the main state to RFAL_NFC_STATE_POLL_SELECT as for to let rfalNfcSelect(1) to work? 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Grégoire Poulain
ST Employee

Hi Niclas,

The RFAL's NFC layer is a convenience layer that aims to accommodate the typical NFC use cases, and therefore may not suit all usages.

It's inspired on NFC Forum NCI spec, but does not fully mimics all its interfaces. In order to reach the usage you aim a Discover( SLEEP ) command from ACTIVE/DATA_EXCHANGE state would be issued.

Such is not currently available.

0693W000006F6fTQAS.png 

Could you please share more details on your application and the use case targeted? Would such usage be required on your final application or at this point would be to execute some intermediate tests?

You can off course activate different devices by the following approaches:

  • Using the RFAL's NFC layer
    • Start Discovery
    • Get Discover notifications from two cards
    • Select/Activate one card, rfalNfcSelect(0) for example
      • Perform the actions desired
    • Perform a Deactivate( DISCOVER ) (a field reset will be performed in between)
    • Get Discover notifications from two cards
    • Select/Activate one card, rfalNfcSelect(1) for example
      • Perform the actions desired

  • Direct usage of Technology interfaces (NFCA, NFCB, NFCF, NFCV modules)
    • Execute the technology detection
    • Perform Collision resolution
    • Select/Activate one card
      • Perform the actions desired
    • Execute the Sleep method
    • Select/Activate the other card
      • Perform the actions desired

Best regards

GP

View solution in original post

2 REPLIES 2
Grégoire Poulain
ST Employee

Hi Niclas,

The RFAL's NFC layer is a convenience layer that aims to accommodate the typical NFC use cases, and therefore may not suit all usages.

It's inspired on NFC Forum NCI spec, but does not fully mimics all its interfaces. In order to reach the usage you aim a Discover( SLEEP ) command from ACTIVE/DATA_EXCHANGE state would be issued.

Such is not currently available.

0693W000006F6fTQAS.png 

Could you please share more details on your application and the use case targeted? Would such usage be required on your final application or at this point would be to execute some intermediate tests?

You can off course activate different devices by the following approaches:

  • Using the RFAL's NFC layer
    • Start Discovery
    • Get Discover notifications from two cards
    • Select/Activate one card, rfalNfcSelect(0) for example
      • Perform the actions desired
    • Perform a Deactivate( DISCOVER ) (a field reset will be performed in between)
    • Get Discover notifications from two cards
    • Select/Activate one card, rfalNfcSelect(1) for example
      • Perform the actions desired

  • Direct usage of Technology interfaces (NFCA, NFCB, NFCF, NFCV modules)
    • Execute the technology detection
    • Perform Collision resolution
    • Select/Activate one card
      • Perform the actions desired
    • Execute the Sleep method
    • Select/Activate the other card
      • Perform the actions desired

Best regards

GP

Thanks for the reply.

Some more info about my case. We are using NFC tags on two components in our product to track the type and lifetime of the components. Basically the tag is used as a memory where the lifetime etc is stored. Both tags are positioned in range of the NFC antenna. Every now and then the application code will read a few data pages from one tag at a time, do some lifetime calculation and then write the lifetime to the tags' data pages. The commands we want to use to read/write data pages are:

FAST_READ 3Ah

WRITE A2h

I've tested "Using the RFAL's NFC layer" and I can read the UID from the tags. But it would be nice to read and/or write to all the detected tags once they have been discovered.

I will try to use NFCA technology interface and the flow you describe above to see if I can do what I want.