Andy Whitehead
2003-09-04 16:41:53 UTC
I've been trying to generate the 8-bit CRC for the Mifare Application
Directory.
The CRC uses the polynomial x^8 + x^4 + x^3 + x^2 + 1 and is preset
with 0xE3
The MAD spec gives an example MAD with bytes: -
0x01 0x01 0x08 0x01 0x08 0x01 0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x04
0x00
0x03 0x10 0x03 0x10 0x02 0x10 0x02 0x10 0x00 0x00 0x00 0x00 0x00 0x00
0x11 0x30
Giving a CRC of 0x89
No matter what approach/sample code I use I cannot get this value for
the CRC.
Has anyone successfully written the CRC byte to the MAD using their
own code? I'm using c++. Can anyone help?
Thanks in advance
Andy
Directory.
The CRC uses the polynomial x^8 + x^4 + x^3 + x^2 + 1 and is preset
with 0xE3
The MAD spec gives an example MAD with bytes: -
0x01 0x01 0x08 0x01 0x08 0x01 0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x04
0x00
0x03 0x10 0x03 0x10 0x02 0x10 0x02 0x10 0x00 0x00 0x00 0x00 0x00 0x00
0x11 0x30
Giving a CRC of 0x89
No matter what approach/sample code I use I cannot get this value for
the CRC.
Has anyone successfully written the CRC byte to the MAD using their
own code? I'm using c++. Can anyone help?
Thanks in advance
Andy