-
Adding a longer URL just truncate it
you mean you need url over 246 characters?
Any clue on how to fix this ?
I think this line is the issue, it saves length as single byte
https://github.com/espruino/Espruino/blob/master/libs/bluetooth/jswrap_bluetooth.c#L2456
also mentioned here https://github.com/espruino/Espruino/blob/master/libs/bluetooth/bluetooth.h#L335
Most probably this limit is because the SR bit for short record is set in the header so the payload length is really using only 1 byte.Fortunately there is also the
NRF.nfcRaw
where you can build whole array as you wish including short bit cleared and payload length stored in 32 bits.
More info about the structure e.g. here https://w3c.github.io/web-nfc/#the-ndef-record-and-fields
Maybe easiest is to use NFC TagWriter to write such long url over NFC and see how the array looks and start from that and build it with NRF.nfcRaw yourself?
Yes this works however it seem to be some kind of unwarranted size limitation. The TAG has a max message size of 246 bytes (256-10 I guess) while the capabilities NDEF Capability container has 992 bytes. I assume this is set during initialization before the actual URL is set. Adding a longer URL just truncate it... Any clue on how to fix this ?