6 years ago.

LoRaWAN support for MTB_RAK811 target in mbed-os 5.8.2

Hi,

I am very happy with the LoRaWAN node example running on the STMicro DISCO-072CZ-LRWAN1 and I posted about it on my site: - https://nicbkw.com/stmicro-nucleo-disco-l072cz-lrwan1-quickstart-mbed-os/

I see that the RAKWireless MTB_RAK811 is included in new targets for mbed-os 5.8.2 and so I tried to build the same example for the WisNode-Lora board (http://wiki.rakwireless.com/doku.php?id=wisnode_series:wisnode-lora).

The build binary is too big without optimization, so I applied the suggestions made here: https://os.mbed.com/blog/entry/Reducing-memory-usage-by-tuning-RTOS-con/ and here: https://os.mbed.com/blog/entry/Reducing-memory-usage-with-a-custom-prin/

Now I am stuck at a point where the build runs on the device and I see this on the console:

 Mbed LoRaWANStack initialized 
 CONFIRMED message retries : 3 
 Adaptive data  rate (ADR) - Enabled 
 Connection error, code = -1014 

Where error = -1014 is defined as

LORAWAN_STATUS_CRYPTO_FAIL = -1014,            /**< Service not started - crypto failure */

Update: I think this was a stack limitation as it now works after I added the main_stack_size value in mbed_app.json :

        "MTB_RAK811": {
            "main_stack_size":      1024,
            "lorawan-enabled":     true,

Question relating to:

Be the first to answer this question.