安卓:NFC APDU命令响应“6700”长度错误“长度、命令、错误、NFC

2023-09-07 04:13:22 作者:含朕的龙根

我送下面APDU命令ISODep标签和我得到'6700错误的长度

I am sending below APDU command to ISODep tag and I am getting '6700 wrong length'

byte[] command = new byte[]{ (byte)0x80,  (byte)0xD0, (byte)0x01, (byte)0x00, (byte)0x07,(byte)0x22 , (byte)0x22,(byte)0x12 , (byte)0x34 , (byte)0x56 , (byte)0x78 , (byte)0x90  };

请建议如果事情是错的在上面的命令。

Please suggest if something is wrong in above command.

推荐答案

您发送的情况下4 APDU那里,对不对?你们的信用证表示0×07字节的数据,并有0×90尾随的乐。请与您的规范这个命令是否真正期待的情况下4结构,还是你只是得到了在LC字段中的数据长度错误(0x08的,而不是0×07)。

You are sending a case 4 APDU there, right? Your Lc indicates 0x07 bytes of data, and there's a Le of 0x90 trailing. Check with your specification whether this command is actually expecting a case 4 structure, or whether you just got the data length in the Lc field wrong (0x08 instead of 0x07).