Tag: nfc

NFC阅读器“SELECT(通过AID)”APDU不会路由到Android设备

我有一台ACR122U NFC读写器连接到安装了ACR122驱动程序的Windows机器。 我尝试使用javax.smartcardio API将SELECT(通过AID)ADPU发送到我的Android设备(应该处于HCE模式)。 这是我的代码: TerminalFactory factory = TerminalFactory.getDefault(); List terminals = factory.terminals().list(); CardTerminal terminal = terminals.get(0); System.out.println(terminal.getName()); Card card = terminal.connect(“*”); CardChannel channel = card.getBasicChannel(); execute(channel, new byte[] { (byte) 0xFF, 0x00, 0x51, (byte) 195, 0x00}, card); execute(channel, new byte[] { (byte)0xFF, 0x00, 0x00, 0x00, 0x04,(byte)0xD4, 0x4A, 0x01, 0x00}, card); //InListPassiveTarget execute(channel, new byte[] […]

NTAG212 Mifare Ultralight带认证

我是NFC Android的新手,我已经坚持了几天试图通过身份validation获得NTAG212 Mifare Ultralight的第7页,我已经有了PWD和PACK来完成基于NTAG212 Docs的PWD_AUTH 。 我这样做… //assume password as array of bytes //assume pack as array of bytes try{ nfc.connect(); byte[] cmd1 = nfc.transceive(new byte[]{ (byte) 0x30, (byte) 0x00 }); //read the page 0 to make the NFC active nfc.transceive(new byte[]{ (byte) 0x1B, //command for PWD_AUTH pass[0], pass[1], pass[2], pass[3] }); byte[] cmd4 = […]

Mifare Classic 1K的锁定机制

Mifare Classic 1K的程序是 轮询标签 validation这些标签 如果validation成功,则读/写。 我已经完成了这些程序,并且还从特定部门读取和写入数据。 标签的轮询命令是 new byte[] { (byte) 0xFF, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0xD4, (byte) 0x4A, (byte) 0x01, (byte) 0x00 } validation命令是 new byte[] { (byte) 0xFF, (byte) 0x86, (byte) 0x00, (byte) 0x00, (byte) 0x05, (byte) 0x01,(byte) 0x00, (byte) 0x04, (byte) 0x60,(byte) 0x00 }; 这里“(字节)0x01”是扇区1 并且在扇区1上写入,块5是 […]

使用SCL010获取Mifare Ultralight的UID

我想获得Mifare Ultralight NFC标签的UID。 在Java中我有这个代码: TerminalFactory factory = TerminalFactory.getDefault(); List terminals = factory.terminals().list(); System.out.println(“Terminals: ” + terminals); CardTerminal terminal = terminals.get(0); Card card = terminal.connect(“*”); System.out.println(“card: ” + card); CardChannel channel = card.getBasicChannel(); ResponseAPDU answer = channel.transmit(new CommandAPDU(0xFF, 0xCA, 0x00, 0x00, 0x00)); byte[] uid = answer.getBytes(); 问题是我收到两个字节而不是UID。 有什么问题? APDU是否正确?