Read write data in SLE4442 smart card with java commandAPDU?

旧时模样 提交于 2019-12-30 07:50:11

问题


I want to read and write data in SLE4442 smart card i have ACR38U-i1 smart card reader

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};

And for read data

byte[] cmdApduGetCardUid = new byte[]{(byte)0xFF,(byte)0xB0,(byte)0x40,(byte)0x00,(byte)0xFF};

both are execute and send SW= 9000 but no one data receive in responseAPDU Like I write 6262 data but it not receive

I am also use Select command to before write and read command

The select command is

byte[] cmdApduSlcCardUid = new byte[]{(byte)0xFF,(byte)0xA4,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x06};

Have anyone Proper java code to read and write in SLE4442 smart card ?


回答1:


APDU Commands related to work with Memory Cards could be different for different readers and implemented support. Here is an example for OmniKey reader.

Take a look to your ACR reader specification and use specific Pseudo-APDU command to work with SLE 4442.

For your question:

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 [Bytes Address] [MEM_L]", where

  • [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 [Bytes Address] [MEM_L] [Data]"

  • [Data]: data to be written to the memory card

You used P1 = 0x40 and this could be an issue.



来源:https://stackoverflow.com/questions/31850578/read-write-data-in-sle4442-smart-card-with-java-commandapdu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!