Using nfc on nrf5340 to do type 4 card emulation, how can I set the ATS bytes for the RATS request from a reader?

Hi

I have custom nrf5340 based product, with an NFC interface for card emulation. I have managed to get this to work in raw APDU mode in NCS 2.9.0 (with selected cherry picked patches from NCS 3.0.x to get the message exchanges to work)

Now I find that my card emulation fails to be recognised for some PC/SC applications, apparently because the ATS value returned to the reader after a RATS message is not what it expects (as this is used by the reader to make up the ATR for the PC/SC application it seems).

I had hoped to have a parameter to set in the nfct4tlib using nfc_t4t_parameter_set()  eg like this:

        // No access to set ATS in T4T lib?
        int ret = nfc_t4t_parameter_set(NFC_T4T_PARAM_ATS???, ats, atslen);
        if (ret==0) {
            return true;
        }
But there is no NFC_T4T_PARAM for ATS setting defined in nfc_t4t_lib.h

Am I missing something, or is there another way to respond to the RATS message myself? I handle the subsequent APDUs received via the callback with NFC_T4T_EVENT_DATA_IND : but I don't think I get the RATS message to handle here?

 thanks

Brian

Parents Reply Children
No Data
Related