Android NFC : Tag lost when APDU command sent to a smart card

无人久伴 提交于 2019-11-28 20:53:36

One possibility is that the response from the card takes more time than the default time-out setting. This often occurs when the card has to do some internal calculations; typically in case of cryptographic operations such as authentication.

You can change the time-out value using IsoDep.setTimeout():

 IsoDep iso = IsoDep.get(tag);
 iso.connect();
 iso.setTimeOut(5000); // 5 sec time out
 iso.transceive(apduCommand); // now send your command 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!