Big STM32 boards topic

@GrumpyOldPizza

Contunued from here: Murata CMWX1ZZABZ-xxx LoRaWAN Module Breakout Board - #17 by GrumpyOldPizza

With all respect, what docs? :wink:
The code doesn’t contain any (and the LoRaWAN library code is rather cryptic).
Adding some documentation to the code and adding a description of the library will increase it’s usability for others tenfold.

I tried the included basic examples TTN_OTAA.ino and TTN_ABP.ino using #define REGION_EU868 (on a B-L072Z-LRWAN1 board).
Unfortunately I directly ran into several issues:

  • TTN_ABP.ino
    The examples use LoRaWAN keys/id’s in string format.
    The only (byte array) string format that TTN Console uses is msb-first format.
    (The TTN Console supports both msb-first and lsb-first formats only for the array initializer notation with brackets.)
    Unfortunately the TTN_ABP example expects the devAddr string variable to be in lsb-first format which is not consistent with the format that TTN Console provides and neither is it documented that devAddr requires lsb-format instead of msb-format. nwkSKey and appSKey use msb-first format, like presented on the TTN Console, but again information about the required format is missing.

  • TTN_OTAA.ino
    Different from TTN_ABP.ino, TTN_OTAA.ino expects all LoRaWAN keys/id’s in msb-first format.
    That is at least the only way where I can get a JOIN ACCEPT on a JOIN request.
    I tried devEui, appEui and appKey in different msb-first / lsb-first combinations but only when all were msb-first did I actually see JOIN ACCEPT’s on the gateway and application consoles.
    But then it stops. The JOIN ACCEPT is not followed up by an upstream message from the node. I see no data arriving.
    What can this be? Why doesn’t the node send any data messages?

  • Both the OTAA and ABP examples start communication at SF12 instead of the usual SF7.
    The examples do not specify a spreading factor so SF12 appears to be the default.
    I think the default should be SF7.
    Where can the spreading factor be specified?

1 Like