cancel
Showing results for 
Search instead for 
Did you mean: 

Handling multiple devices with st25r3911b

rabinniroula
Associate II

How would i send apdu to multiple detected devices? I believe I should use the rfalIsoDepPollAHandleActivation() function with different DID values. I couldn't find much documentation on DID other than it's used to determine which device to activate and that it's a logical address, could you explain?

8 REPLIES 8
Ulysses HERNIOSUS
ST Employee

Hi,

although a multi-activation exists in ISO14443-4 (Annex A) this method I have never seen being used. NFC Forum and EMVCo only ever have one tag activated at a time. Our RFAL does not support multi-activation. NFC Forum allows deselecting the active tag and activating a different one. I would propose for you to do the same - there are APIs inside rfal_isoDep.h for deselecting. Peaking into rfal_nfc.c you can find examples of usage (follow the RFAL_NFC_DEACTIVATE_SLEEP rabbit there). Or maybe you just want to use the higher rfal_nfc layer?

BR, Ulysses

rabinniroula
Associate II

I'm not talking about activating multi activation, I'm talking about activating a certain PICC when multiple are present in the field. How would i select one from the other?

Hi,

it depends a bit on the technology you are using - slightly different between NFC-A and NFC-B. With NFC-A you get  out of the collision resolution a list of devices. If it isSleep you need to first issue a WUPA, then select it. When then selected you can proceed to isodep activation as before.

The necessary procedures are implmented in rfal_nfc.c - look at rfalNfcPollActivation().

BR, Ulysses

Yes, I'm using NFC-A, I do get a list of devices out of the collision resolution. Is it the DID parameter in ISODepActivation that is used to select different devices? If so, how would i know the DID of the devices?

err = rfal_nfc.rfalNfcaPollerFullCollisionResolution(RFAL_COMPLIANCE_MODE_ISO, MAX_DEVICE_DISCOVERY, nfcDevices, deviceCount);
err = rfal_nfc.rfalIsoDepPollAHandleActivation((rfalIsoDepFSxI)RFAL_ISODEP_FSDI_DEFAULT, RFAL_ISODEP_NO_DID, RFAL_BR_106, &isoDepDev);

As you can see I'm using RFAL_ISO_NO_DID, but to select different devices in the field, How would I change the DID?

Or am I entirely in the wrong here?

Hi, 

DID would only be required with multi-activations. During activation the PCD assigns a CID/DID to a PICC.

The selection itself is done based on UID/NFCID - please see the code parts which I mentioned.

 

Ulysses

rabinniroula
Associate II

Let me rephrase my question. In line 74, I have run rfalNfcaPollerFullCollisionResolution() which gives me a list of devices to chose from. How do I send apdu to the device that is, let's say in the 3rd index of nfcDevices? How do I activate different devices other than the first device in the list?

rabinniroula
Associate II
 

Hi,

did you read:

"The necessary procedures are implemented in rfal_nfc.c - look at rfalNfcPollActivation()."

You either follow that implementation or you switch to using rfal_nfc layer which provides the functions you are looking for.

Ulysses