我正在使用读写器 acr38f,我的智能卡是 SLE4418。如何在智能卡中读取和写入文本?
例如:Hello World!
apdu = [0XFF, 0X20,0x00,0x00,0x02, 0x00, 0x00]
响应,sw1,sw2 = cardservice.connection.transmit(apdu)
apdu = [0XFF,0xA4,0x00,0x00,0x01,0x05] response, sw1, sw2 = cardservice.connection.transmit( apdu ) apdu = [0XFF,0XB2,0X00,0xA7,0X09] response, sw1, sw2 = cardservice.connection.transmit( apdu ) print response apdu = [0XFF, 0XD0,0x00,0xA7,0x09,0xA7,0x02,0xA7,0x02,0xA7,0x02,0xA7,0x02,0xA7] response, sw1, sw2 = cardservice.connection.transmit( apdu )
卡回复:
connecting to ACS CCID USB Reader 0
ATR 3B 04 92 23 10 91
> FF 20 00 00 02 00 00
< 00 00 00 90 0
> FF A4 00 00 01 05
< [] 90 0
> FF B2 00 A7 09
< FF FF FF FF FF FF FF FF FF 90 0
[255, 255, 255, 255, 255, 255, 255, 255, 255]
> FF D0 00 A7 09 A7 02 A7 02 A7 02 A7 02 A7
< [] 90 0