Javacard applet RPDU does not contain any data when accessed from seek-for-android

亡梦爱人 提交于 2019-12-03 09:13:19

I found an error in my applet, which really caused the whole issue. My applet responded with status word 0x911C and no data. However, SEEK returned always 0x9000 instead of 0x911C, because status words 0x91XX cannot be used when accessing via SEEK. Next paragraph is by EduardEtc from the SEEK forum and it explains everything:

"ETSI defines (in TS 102 221) status word 91XX for use with SIMToolKit (CAT) applications . Any card application that would otherwise send 9000 as SW1SW2 can return 91xx instead which the phone must interpret to handle CAT APDUs. So the phone application will never see the 91xx, it is replaced by the phone’s CAT handling layer by 9000. ISO/IEC 7816-4 defines SW1SW2=61xx for a similar purpose. At the time this included in the standard to meet a need from ETSI, however, ETSI didn’t wait for the ISO process to finish and specified a different encoding."

The main problem is with the Open Logical channel i suppose. may be the card is not supporting logical channel. Try Open Basic channel.

and u are not getting any response data because, the Le part is not set. CLA, INS, P1, P2, (Le), Data ..If you are setting your Le field to 00 you should get full back response as the total number of bytes available. Again if you send the number of bytes you need suppose XX then pass it and you should be able to get that response, if its more than 256 then it will be 61 XX, XX indicating the number of bytes of response.

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