问题描述
我想在SLE4442智能卡中读取和写入数据
i有ACR38U-i1智能卡读卡器
I want to read and write data in SLE4442 smart cardi have ACR38U-i1 smart card reader
对于写我使用此命令APDU
For write I am use this commandAPDU
byte[] cmdApduPutCardUid = new byte[]{(byte)0xFF, (byte)0xD0, (byte)0x40,(byte)0x00, (byte)4,(byte)6,(byte)2,(byte)6,(byte)2};
读取数据
byte[] cmdApduGetCardUid = new byte[]{(byte)0xFF,(byte)0xB0,(byte)0x40,(byte)0x00,(byte)0xFF};
两者都是执行并发送SW = 9000
但是没有一个数据接收响应APDU
就像我写6262数据但没有收到
both are execute and send SW= 9000but no one data receive in responseAPDULike I write 6262 data but it not receive
我也在写和读命令之前使用选择命令
I am also use Select command to before write and read command
select命令是
byte[] cmdApduSlcCardUid = new byte[]{(byte)0xFF,(byte)0xA4,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x06};
是否有任何正确的Java代码可以在SLE4442智能卡中读写?
Have anyone Proper java code to read and write in SLE4442 smart card ?
推荐答案
APDU与使用存储卡相关的命令可能因不同的读者和实现支持而有所不同。这是一个。
APDU Commands related to work with Memory Cards could be different for different readers and implemented support. Here is an example for OmniKey reader.
看看您的并使用特定的Pseudo-APDU命令与SLE 4442一起使用。
Take a look to your ACR reader specification and use specific Pseudo-APDU command to work with SLE 4442.
For您的问题:
4.6.1 SELECT_CARD_TYPE :FF A4 00 00 01 06
,其中 0x06
的数据意味着Infineon SLE 4432和SLE 4442。
4.6.1 SELECT_CARD_TYPE: "FF A4 00 00 01 06"
, where 0x06
in the data meant "Infineon SLE 4432 and SLE 4442".
4.6.2 READ_MEMORY_CARD :FF B0 00 [字节地址] [MEM_L]
,其中
4.6.2 READ_MEMORY_CARD: "FF B0 00 [Bytes Address] [MEM_L]"
, where
-
[字节地址]
:是存储卡的存储地址位置 -
[MEM_L]
:要从存储卡读取的数据长度
[Bytes Address]
: is the memory address location of memory card[MEM_L]
: Length of data to be read from the memory card
4.6.5 WRITE_MEMORY_CARD :FF D0 00 [字节地址] [MEM_L] [数据]
-
[数据]
:要写入存储卡的数据
[Data]
: data to be written to the memory card
您使用 P1 = 0x40
,这可能是一个问题。
You used P1 = 0x40
and this could be an issue.
这篇关于使用java commandAPDU读取SLE4442智能卡中的写入数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!