0
我剛剛讀了this回答關於如何把我的ACR122U在卡模擬模式。我確實瞭解目的,但您需要如何將命令發送到ACR122u。ACR122u卡模擬模式發送PN532命令
據我知道FF000000指:
- FF [類]
- 00 [INS]
- 00 [P1]
- 00 [P2]
我只是無法弄清楚我可以如何發送實際的PN532命令,例如:
- FF000000 08 D406 6305 630D 6338
- FF000000 11 D408 6302 80 6303 80 6305 XX 630D YY 6338 ZZ
我已經走到這一步:
TerminalFactory factory = TerminalFactory.getDefault();
List<CardTerminal> terminals;
try {
terminals = factory.terminals().list();
CardTerminal terminal = terminals.get(0);
Card card = terminal.connect("*");
CardChannel channel = card.getBasicChannel();
byte[] command = {???};
CommandAPDU command1 = new CommandAPDU(0xFF,0x00,0x00,0x00, command);
ResponseAPDU response1 = channel.transmit(command1);
System.out.println(bytesToHex(response1.getBytes()));
} catch (CardException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
我欣賞你的幫助!
非常感謝提前!
非常感謝你! –