从智能卡获取ATR后的命令

时间:2018-02-12 08:12:24

标签: c apdu stm32f1

我正在使用stm32f103和st8024作为读卡器与智能卡进行通信。我的问题是在我得到ATR之后,我无法得到

的回复
HAL_SMARTCARD_Receive(&hsc1 , response1 , sizeof(response1) , 1000);

上面的函数总是为任何命令返回TIMEOUT。没有任何回应1。

下面是我的代码:

uint8_t command1[] = {0xC0 , 0x20 , 0 , 1 , 8 , 0x30 , 0x30 , 0x30 , 0x30 , 0x30 , 0x30 , 0x30 , 0x30 , 0};
uint8_t response1[20];
HAL_SMARTCARD_Transmit(&hsc1 , command1 , sizeof(command1),1000);
HAL_Delay(100);
HAL_SMARTCARD_Receive(&hsc1 , response1 , sizeof(response1) , 1000);

0 个答案:

没有答案
相关问题