0
我正在尝试验证MIFARE经典卡的任何部分。我正在使用twinlinx mymax贴纸(这使得几乎所有的蓝牙设备NFC都可以使用)。它将命令发送到连接的NFC标签。我已经建立了连接,并使用Ultralight C标签发送和接收数据,但到目前为止,我没有成功访问过Mifare Classic。以下是我的验证码:MIFARE CLASSIC没有回应
private boolean authenticate(int sector, byte[] key, boolean keyA) {
byte[] cmd = new byte[12];
// First byte is the command
if (keyA) {
cmd[0] = 0x60; // phHal_eMifareAuthentA
} else {
cmd[0] = 0x61; // phHal_eMifareAuthentB
}
// Second byte is block address
cmd[1] = (byte) 0x03;
// Next 6 bytes are the key
System.arraycopy(key, 0, cmd, 2, 6);
// Next 4 bytes is the UID
System.arraycopy(Answer, 3, cmd, 8,4);
byte[] test = null;
//this makes a connection to the NFC tag (and this works)
TR.ConnectToExternalCard(AUTH, (byte)0x00);
//checking if the tag is still connected
if (TR.isCardPresent() == true){
//sending command to authenticate
test = TR.SendCommandPropAndWaitResponse(cmd, (byte) 0x00);
}
try {
if (test != null) {
return true;
}
}
我使用的是标准MIFARE Classic键,标签是从工厂新鲜出来的。完整的命令(以字节为单位),其被发送到标签是:
[0x60的,0x3,0xff的,0xff的,0xff的,0xff的,0xff的,0xff的,0xf3,0xF4中,0xa9,0xFB的才能]
任何想法?该标签似乎没有响应...尝试访问其他经典标签,但也没有成功。谢谢!