Contactless registry service (CRS) considerations
GlobalPlatform Card Specification v 2.2 Amendment C defines a Universal Integrated Circuit Card (UICC) with a contactless registry service (CRS) applet on it.
If you are using such a UICC to activate or deactivate applets over the NFC interface, call the nfc_se_enable_swp() function just before opening a logical channel to the CRS applet to update its state.
The following code sample demonstrates the call sequence:
fc_channel_type_t channelType = NFC_CHANNEL_TYPE_SE_UICC;
uint8_t aid[] = { 0xA0, 0x00, 0x00, 0x01, 0x51, 0x43, 0x52, 0x53, 0x00 };
uint32_t aid_len = sizeof(aid);
fcp_type_t fcpResponseType = SATSA_OPEN_EMV_FCP;
uint32_t hSEChannel;
int32_t responseLen;
nfc_se_enable_swp();
nfc_se_open_logical_channel_direct(channelType,
aid,
aid_len,
fcpResponseType,
&hSEChannel,
&responseLen));