6A82 APDU communication issue between NFC enabled Android phone and ISO/IEC 14443-4 Smart Card

戏子无情 提交于 2019-12-25 04:48:06

问题


I'm currently working with an Android payment application using NFC.For this purpose Android application need to send and receive APDU commands to ISO/IEC 14443-4 Smart Card.

When i test my application using Galaxy S5(OS 4.4.2) , or Galaxy s3(OS 4.1.2) I'm getting 6A82

My Code flow is going like below:

1st step ->

Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
 IsoDep iso = IsoDep.get(tag); 
 iso.connect();

2nd step -> By using iso.transceive().. I'm sending APDU command 0084000008 from Mobile Application to Smard Card and receiving F5BC9C9F3A2B7C179000 as response.

3rd Step -> using iso.isConnect() I'm checking the connection and -> Connection available

4th Step -> By using iso.transceive().. sending APDU command : 903203000A1403CF549C2B7520389C receiving : 6A82 All the time

I would be happy if anyone suggest me why I'm getting strange File not found (6A82) for this APDU command.


回答1:


after calling iso.connect() you should send select apdu first 00A40400 + for example :

(u should convert hex to bytes first)

aid = AABBCCDD;

byte[] selectCmd = 00A4040004AABBCCDD

isoDep.transceive(command)


来源:https://stackoverflow.com/questions/27900477/6a82-apdu-communication-issue-between-nfc-enabled-android-phone-and-iso-iec-1444

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