arduino-libraries / MKRWAN

An Arduino library for sending and receiving data using LoRaWAN protocol and LoRa® radios.
https://www.arduino.cc
GNU Lesser General Public License v3.0
88 stars 60 forks source link

Endianness AppEui #92

Closed hpssjellis closed 3 years ago

hpssjellis commented 3 years ago

Endianness for the AppEui: most providers such as TTN and Helium have a default for Endianness but also a second method either LSB (least significant byte first) or MSB (Most significant byte first) . What is the expected Endianness for most Arduinos? I am testing: MKRWAN , MKRWAN_v2 and GrumpyOldPizza . (Not really, I am actually using @facchinm GrumpyOldPizza board version for the stm32l0 core here )

I don't think Endianness applies to the AppKey, but if you are planning on changing the DevEui Endianness would also be an issue. Anyone have any opinions or at least what worked for them.

flhofer commented 3 years ago

All LoRa libraries I used so far use big endian, i.e. copy the keys and EUIs as is into a string and it will work.

hpssjellis commented 3 years ago

@flhofer Thanks for that information. Are you in North America or Europe or ... ? I am looking for simple TTN code that works in North America. "I know it should just be changing to US915", but when things are not working it is nice to have a working bit of sample code.

flhofer commented 3 years ago

I'm in Europe. Technically you should be able to "Just change to US915", all other settings are transparent. You might want to make sure that the firmware on the modem has not been compiled with a fixed regional band, but typically this is not the case. Things might not work if your network has particular requirements. I seem to remember that US has in-transmission hopping as a mode. Don't remember if it was an option or a fixed thing. Try the Send-receive sketch and let me know :)