我尝试通过Android NFC发送APDU命令:
byte[] selCommand = ApduBuilder.INS(INS.SELECT).P1(NfcActivityA.FileRefControl.GET_BY_DF.code).data("A0000006581010").build();
Log.d("APDU", "selCommand: "+ fromByteArray(selCommand));
byte[] result = mNfc.transceive(selCommand);
但是我得到奇怪的行为:
方法之一-我尝试发送命令
-> log write selCommand: 123(for example)
-> I get ecxeption `android.nfc.TagLostException: Tag was lost.`
方法二-我尝试发送命令(调试模式)
-> log write selCommand: 123(for example)
-> I stop on `mNfc.transceive(selCommand);` line
-> I select this line and pres Alt + F8
-> Evaluate
-> get success response
为什么?