1 (edited by umlorg 2012-03-20 14:37:21)

Topic: Read and write topaz tags using transcievebytes

I have tried using the codes 0x01 for reading and 0x53 for writing content with topaz tags but it doesn't seem to be working. transcieve bytes always fails.
I used the methods described in this document:
http://www.nfc-reader.com/NFC-smart-car … ACR122.pdf
on page 19 for Topaz tags with the difference that I send only bytes starting with 0x01 or 0x53 and beyond.
For example if the required sequence for reading block 8 from the tag is as follows:
FF 00 00 00 05 D4 40 01 01 08
I skip bytes
FF 00 00 00 05 D4 40 01
and send only bytes
01 08
Similary for writing to the tag the required byte sequence for writing to block 8 is as follows:
FF 00 00 00 06 D4 40 01 53 08 FF
I skip bytes
FF 00 00 00 06 D4 40 01
and send only bytes
53 08 FF
I can read and write mifare ultralight tags, but as I managed to see that the initial sequence for sending a read command is identical but differs for a write command in fourth byte (15 for mifare tags and 06 for topaz) so that might be the problem when writing topazm, but it shouldn't be a problem when reading it because the sequences are the same.

I also must mention that I can successfully identify that topaz tag was used on the reader, I just can't read or write the data from it.

Re: Read and write topaz tags using transcievebytes

I've got the commands RID, RALL, READ and WRITE-E working, but I do have some problems with the RSEG and READ8 commands.

Let me know if you're still interested in how it works.

Re: Read and write topaz tags using transcievebytes

RSEG doesn't work with my Touchatag (PN532), but works with my SCL3711 (PN533).

There seem to be a bug in the PN53x-firmware (source: nfcpy documentation) with makes it impossible to execute the READ8 and WRITE8 commands. So, you can read and write the first 96 bytes, you can read the rest (using RSEG), but you can't write the blocks 0x10 and above.

Re: Read and write topaz tags using transcievebytes

Feel free to share e.g. the equivalent of nfc-mfultralight.c for Topaz and we'll integrate it into libnfc examples so others can benefit from your experience.

Re: Read and write topaz tags using transcievebytes

I can confirm this behavior on my PN532 stack. 

No matter what I do, when trying to write 8 byte blocks at a time using the WRITE-E8 (0x54) command, the response received is 0x01, which means that the tag did not respond.  I have tried putting in the UID echo myself and that does not work either.  I even played with the endianness of the UID echo and still the same result.

This is disappointing as the utility of this command is obviously to write to pages 0x10 and greater, since Topaz tags have a good amount of memory and are NFC Forum compatible Type 1 (unlike Mifare Classic).

I will see if I can do this using the inCommunicateThru command of the PN532.  I may have to calculate my own CRCA and CRCB values to do this, but I think it could work. 

I'll post an update  about the results.