googlearchive/chrome-nfc

Support other tags, including NTAG203

Closed this issue · 0 comments

I'm unsure how this could be implemented cleanly as I am not that familiar with the library, but adding support for different tags should be relatively straightforward.

I had to make a few simple changes to properly read and write to NTAG203 tags, all in tt2.js

  1. Line 111: var max_len = 168 - 24;
    a) That variable currently is never used, it should probably be in some sort of tag configuration object so it can be referenced at lines 116 and 149 rather than the current hardcoded values.

  2. Line 116: var blen = 144 / 8;
    a) This should use max_len instead of a hardcoded value.

  3. Line 149: if (card_blknum > (144 / 4)) {
    a) This should also use max_len instead of a hardcoded value.
    b) As far as I know, a page always consists of 4 bytes, but perhaps that should also be configurable.