1

I'm working on an RFID reader that has partial implementation with ISO/IEC 14443-4 although not specifically compliant. I can decode a lot of the strings and understand the command base but I have not been able to crack the check sum.

Read commands are 4 bytes in the format

0x82 Read Chunk
0xYY Chunk Number
2 Byte checksum

the response is to echo the Read command, chunk Id, 32 Bytes of data then 2 byte checksum.

I've tried the hex strings with a bunch of standard checksum calculators as well as looking for things like logical ands but cannot find any rule for how they are generated. Is there some other techniques for this style of checksum?

Sample Data:

8208942d
82081101004049424d2020202020363831303232393437310004000d1f0e000d220a273b
82091d3c
8209000d2591000e8521000e8521000e881d363955320000000000000000386c1940c1a4
821b8e0f
821b00000000000000000000000000000000000000000000000000000000000000008ca8
821c317b
821c0000000000000000000000000000000000000000000000000000000000000000b461
821db86a
821d0000000000000000000000000000000000000000000000000000000000000000d721
2

It is a CRC-A checksum. 16bits. Preface: From my research this is the crc for that standard.

Its calculated from start of packet up to checksum

https://crccalc.com Put 8209 and check the result: 3C1D. This is byte swapped due to endian. Probably why you didn't find it.

Let me know if you need help, be happy to help code it. Here is a c++ implementation of the calculation: https://github.com/pkourany/MFRC522_RFID_Library/blob/master/src/MFRC522.cpp This is the Arduino library for the NFC chip.

Cheers

2
  • Spot on, what a champ! You are right about the endian. I also missed the ASCII/Hex flag on that calculator as well when I tried it previously. Interestingly the tags I am working with are not NFC compliant, they were based on a draft version of the 14443-4
    – Andrew V
    Mar 6 '19 at 12:20
  • @AndrewV Absolute pleasure. The CRC was probably decided very early on or was taken from another IEEE standard. Like Qualcomm uses TCP/IP CRC for the CDMA diag protocol.
    – Thomas
    Mar 6 '19 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.