A0000006581010
我需要生成select命令并读取结果。
private static final String SAMPLE_LOYALTY_CARD_AID = "F222222222";
private void performTransaction(Intent nfcIntent) {
Tag tagFromIntent = nfcIntent.getParcelableExtra(EXTRA_TAG);
NfcA mNfc = NfcA.get(tagFromIntent);
try {
mNfc.connect();
//I can read ID
byte[] id = mNfc.getTag().getId();
//I tried create SELECT command
byte[] selCommand = BuildSelectApdu(SAMPLE_LOYALTY_CARD_AID);
//I try send command to card
byte[] result = mNfc.transceive(selCommand);
//I get result == {106, -126}
} catch (IOException e) {
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
} finally {
if (mNfc != null) {
try {
mNfc.close();
} catch (IOException e) {
Log.v("tag", "error closing the tag");
}
}
}
}
如何从智能卡上的concret aid中选择命令?