adafruit / Adafruit-PN532

Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip
Other
423 stars 266 forks source link

NDEF NTAG215 and 216 compatability #55

Open tgikal opened 6 years ago

tgikal commented 6 years ago

The nfc.ntag2xx_WriteNDEFURI(ndefprefix, url, dataLength) is written with dataLength defined as a uint8_t, which limits the data size to 256, even though NTAG215 and NTAG216 tags have much more memory than this.

A simple test of writing 450 x "a" will show it only writes 194 characters, which results from the 0x1C2 having being converted to 0xC2 by stuffing it in a uint8_t.

tgikal commented 6 years ago

Managed to edit the .cpp and .h files to accommodate this issue.

The only other change made is making the "TIMEOUT!" message from waitready only print when debugging is turned on.

Please see https://github.com/adafruit/Adafruit-PN532/pull/56 for a fix.

ladyada commented 6 years ago

hi @tgikal please stay positive and constructive in comments, we have 1000+ repos to maintain - not every issue & PR is handled immediately. please submit a PR if you have tested the code!

caternuson commented 1 year ago

Looks like a dupe of #38