Dear Team,
My customer found something strange at SmartCard interface like below.
At below point SmartCard is off with the response for example 0x6A(Application errors).
If you have, could you please share your experience with below codes?
@smart_card.c
/* Parse the ccid command */
static usb_status_t USB_DeviceCcidSmartCardCommandParse(usb_device_ccid_command_struct_t *command)
{
uint8_t EMVL1_SendApduCommand(uint8_t *commandApdu,
uint32_t commandApduLength,
uint8_t *ResponseApdu,
uint32_t *ResponseApduLength)
{
…
if (error != kStatus_CCID_EMV_Success)
{
ccidResponse->bStatus =
(USB_DEVICE_CCID_SLOT_STATUS_COMMAND_STATUS_FAILED) | (USB_DEVICE_CCID_SLOT_STATUS_ICC_PRESENT_ACTIVE);
ccidResponse->bError = USB_DEVICE_CCID_SLOT_ERROR_HW_ERROR;
EMVL1_SmartCardPowerOff();
usb_device_ccid_data_block_response_t *ccid_datablock =
(usb_device_ccid_data_block_response_t *)&g_UsbDeviceCcidSmartCard
.slotsAtrBuffer[usbDeviceCcidCommand->bSlot][0];
receiveLength = USB_DEVICE_CCID_ATR_BUFFER_LENGTH - USB_DEVICE_CCID_RESPONSE_HEADER_LENGTH;
EMVL1_SmartCardPowerOn(ccid_datablock->abData, &receiveLength);
}
Best Regards,
YK Lee
Hi Iva,
Thanks a lot for your help.
Actually customer is using UART IF for Smartcard IF.
Best Regards,
YK Lee
Hello YK Lee,
Please, are you using USB IF to Smartcard IF?
Thank you.
Best Regards,