我确实了解目的,但您需要如何将命令发送到ACR122u。
据我所知FF000000意味着:
我只是不知道如何发送实际的PN532命令,例如:
我走了这么远:
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(); }
我感谢您的帮助!
提前谢谢了!!
假设 08 D406 6305 630D 6338 表示
它看起来像这样:
byte[] command = new byte[8] { (byte) 0xD4, 0x06, 0x63, 0x05, 0x63, 0x0D, 0x63, 0x38 };
您可以省略,8因为javac会为您计算字节数。
8