Which CRC algorithm must be used to query the Tamper Tag status from a NTag213?

65 views Asked by At

I'm trying to read the "TT status" of a Tamper Tag NTag 213 (using a TWN4 reader).

The "Read TT status" command is A4 00 + CRC (documentation).

I seem to have a problem with the CRC calculation, as the command always returns 01. 01 is documented as "NAK for parity or CRC error".

Could you tell me which algorithm I should use to calculate the CRC? I've tried the CRC_A algorithm, which gives D63F for the given payload (A400). Is this CRC value wrong?

2

There are 2 answers

0
Mark Adler On

To answer the question, the CRC is CRC-16/ISO-IEC-14443-3-A, which has these parameters:

width=16 poly=0x1021 init=0xc6c6 refin=true refout=true xorout=0x0000 check=0xbf05 residue=0x0000 name="CRC-16/ISO-IEC-14443-3-A"
2
Andrew On

Normally most NFC reader hardware does the CRC calculation for you.

As the datasheet of the Tag outlines what it's hardware expects at the ISO 14443-3 level, but what you send to the reader is actually an instruction asking it to generate the desired 14443-3 command.

Thus you only send to the reader hardware the instruction A4 00 (usually with USB readers this is wrapped in an APDU command).