[riot-notifications] [RIOT-OS/RIOT] pkg/semtech-loramac: rework how session keys are get/set (#11783)
notifications at github.com
Fri Jul 5 16:50:54 CEST 2019
> do you have the steps to reproduce the original issue in b-l072z-lrwan1?
You can follow the testing described here. On master, after the last reboot step (before send), you get a hardfault on the lobaro-lorabox (and im880b). With this PR, it doesn't happen, everything works as expected.
Note also that the issue doesn't happen when running on b-l072z-lrwan1.
> the functions might not be the real cause of not restoring the keys properly
I think the same but when one calls them to set the AppSKey and NwkSKey just after reading the keys from EEPROM, they don't work as expected: the value read from EEPROM is correct but after the value copied to corresponding static variable is lost for some reason.
This doesn't happen when calling the set function from the shell function.
It could be some context issue but both `semtech_loramac_set_appskey`/`semtech_loramac_set_appskey` functions are called from the main thread (in loramac_init and in the shell function).
Is the mutex not doing his job correctly ? The fact that 2 calls to memcpy are done to update the static variable seems overkill to me (it the same with other parameters actually).
> I would check the return status of the LoRaMacMibSetRequestConfirm in order to check what's going on there
I did a lot of debugging in the function itself to verify what arrays were copied to the static variables containing the key. Normal code path was used so checking the return value won't help.
I won't be able to work again on this before the release unfortunately.
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...
More information about the notifications