K64 SmartCard I/F: Error when handling SW1 and 6x command..Smartcard is off

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K64 SmartCard I/F: Error when handling SW1 and 6x command..Smartcard is off

1,692件の閲覧回数
yklee1
Contributor II

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

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,541件の閲覧回数
yklee1
Contributor II

Hi Iva,

Thanks a lot for your help.

Actually customer is using UART IF for Smartcard IF.

Best Regards,

YK Lee

0 件の賞賛
返信

1,540件の閲覧回数
ivadorazinova
NXP Employee
NXP Employee

Hello YK Lee,

Please, are you using USB IF to Smartcard IF?

Thank you.

Best Regards,

0 件の賞賛
返信

1,541件の閲覧回数
ivadorazinova
NXP Employee
NXP Employee

Hi YK Lee,

thank you for your question.

We will let you know as soon as possible.

Best Regards,

Iva

0 件の賞賛
返信