请,
我正在尝试使用ACR122U阅读器编写一个简单的二进制块来识别1k标签。
我正在尝试写入块,5个字节,文本:' teste'读回来。
但是在更新此块时我总是收到错误6300。
有什么想法?
我正在使用Windows 8.1 / delphi xe8。
我的日志是:
SCardEstablishContext succeeded.
Card State changed in ACS ACR122U PICC Interface 0 to available
New reader found: ACS ACR122U PICC Interface 0
Card inserted in ACS ACR122U PICC Interface 0
ATR = 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
SCardConnect (shared) succeeded.
Active Protocol: T=1
ISO 14443 A, Part3 Card Type: Mifare Standard 1K is detected
Sending APDU to card: FF 82 00 01 06 FF FF FF FF FF FF
SCardTransmit succeeded.
Card response status word: 9000 (OK)
Sending APDU to card: FF 86 00 00 05 01 00 01 60 01
SCardTransmit succeeded.
Card response status word: 9000 (OK)
Sending APDU to card: FF 86 00 00 05 01 00 01 60 01
SCardTransmit succeeded.
Card response status word: 9000 (OK)
Sending APDU to card: FF D6 00 01 05 74 65 73 74 65
SCardTransmit succeeded.
Card response status word: 6300 (State of non-volatile memory changed.)
答案 0 :(得分:3)
您正在写一个块,您必须提供完整的信息块。 Lc
的唯一选项是x04
或x10
- 四个字节或十六个字节。对于Mifare 1K,它很清楚你需要提供16个字节。您只有5个字节的数据,因此用零填充其余部分。
| CMD | block1 | 16 bytes | data ...
FF D6 00 01 10 74 65 73 74 65 00 00 00 00 00 00 00 00 00 00 00