arduino-libraries / MKRWAN_v2

[Beta] Library for Arduino MKRWAN 1300 / 1310 suitable for firmwares derived from ST sources
GNU Lesser General Public License v3.0
7 stars 6 forks source link

Fix typo that makes data get a nibble out of kilter when sending. #2

Closed davidbrodrick closed 3 years ago

davidbrodrick commented 3 years ago

The check for prefixing a leading zero is base 10, but the string is hex, so it should be base 16. This causes a nibble to be dropped when the value of the byte to be sent is between 0x0A and 0x0F, which causes and invalid and/or corrupted packet.

facchinm commented 3 years ago

Thanks for finding this! Just out of curiosity, are you using this version of the library because original MKRWAN has problems in your setup (eg old regions) or for other reasons?

davidbrodrick commented 3 years ago

I needed to use the AU915 sub-band 2, i.e. AU915_TTN. Do you advise against this version of the library?

facchinm commented 3 years ago

No, absolutely, that's the right library for your use case!