Felica Polling
There are some Felica polling parameters, that use hard-coded default values when polling is initiated:
System Code
Request Code
Time Slot
The default values are set in ptxNSC_EmvGetDiscParams() in ptxNSC_Interface.c in the OS POS SDK:
Description of default values in discoverParams→conPollFCmd :
Byte 0: Length
Byte 1: Command Code:
0x00Bytes 2-3: System Code:
0xFFFF– wildcardsByte 4: Request Code:
0x00– no requestByte 5: Time Slot:
0x03– 4 time slots
Even if these parameters are changed inside the SDK, polling will be done using the default values. The only way to use custom values is to call ptxPOS_T3T_SENSFRequest() . This function can only be used, when a card is already activated (that is, in the data exchange state of the example application), which means that the first polling will use the default values and the second polling will use the custom values:
In case a card doesn't support the provided system code, it will not respond and ptxPOS_T3T_SENSFRequest() will return an RF error 0x2622 .
In order to test it, replace the contents of ptxPOSInt_EmvState_ExchangeFeliCa() in ptx_POS_Main.c with the below code. Make sure poll_config.PollTypeF212 or poll_config.PollTypeF424 is enabled before calling ptxPOS_Initiate_Polling() .
static void ptxPOSInt_EmvState_ExchangeFeliCa(void *stackComp, ptxPOS_EmvLoopback_State_t *state, uint32_t app_timeout, ptxPOS_CardParams_t *card_params, uint8_t *rx_data, uint32_t *rx_data_length)
{
ptxCommon_PrintF("SENSF_RES = ");
ptxCommon_Print_Buffer(&card_params->TechParams.CardFParams.SENSF_RES[2], 0, 8, 1, 0);
ptxStatus_t st;
app_timeout = 300;
*rx_data_length = RX_BUFFER_SIZE;
uint16_t systemCode = 0x4444U;
uint8_t requestCode = 0x02U;
uint8_t timeSlot = 0x07U;
st = ptxPOS_T3T_SENSFRequest(stackComp, systemCode, requestCode, timeSlot, rx_data, rx_data_length, app_timeout);
if (ptxStatus_Success == st)
{
if (0 != rx_data_length)
{
ptxCommon_PrintF("RX = ");
ptxCommon_Print_Buffer(&rx_data[0], 0, *rx_data_length, 1, 0);
}
else
{
ptxCommon_PrintF("Data Exchange failed due to Transmission/Timeout Error\n");
}
*state = POS_EmvState_RestartPolling;
}
else
{
ptxCommon_PrintF("Data Exchange failed 0x%04X\n", st);
*state = POS_EmvState_DeactivateReader;
}
}