Skip to main content
Visitor II
November 21, 2024
Solved

Handling multiple devices with st25r3911b

  • November 21, 2024
  • 4 replies
  • 1819 views

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?

    This topic has been closed for replies.
    Best answer by Ulysses HERNIOSUS

    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

    4 replies

    Technical Moderator
    November 21, 2024

    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

    Visitor II
    November 21, 2024

    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?

    Technical Moderator
    November 21, 2024

    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

    Visitor II
    November 21, 2024

    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?

    Visitor II
    November 22, 2024

    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?

    Technical Moderator
    November 22, 2024

    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