[riot-notifications] [RIOT-OS/RIOT] tests/pkg_semtech-loramac: hardfault on lobaro-lorabox (#11626)

Alexandre Abadie notifications at github.com
Wed Jul 3 13:12:25 CEST 2019

Some good news with this issue: I was able to reproduce the issue on im880b board (same CPU) and could fix it (hopefully).

In fact, I found several issues:
- reading stored configurations doesn't work correctly on this CPU. For example, reading the join status triggers the hardfault. I could fix it by using `eeprom_read` instead of `eeprom_read_byte`. This is still unclear to me why this fixes the crash.
- another issue is the session keys (app, nwk) are not set correctly to the MAC after they are read from the EEPROM. This is a problem because after a reboot, the session keys are not valid and thus no comminucations with the network an be done: payloads are invalid.
For me, this is a bug in Loramac code with `LoRaMacMibGetRequestConfirm`/`LoRaMacMibSetRequestConfirm` functions. I have a fix for this but I still need to see if I can do better.
- last one is not critical and unrelated: the MAC is initialized twice when using the `tests/pkg_semtech-loramac`: once by `auto_init_loramac` and once by the main function. I'll open a PR to remove the initialization done in the main function, this is an easy one.

I still need to do more testing before opening PRs.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190703/9817f947/attachment.html>

More information about the notifications mailing list