[riot-notifications] [RIOT-OS/RIOT] pkg/semtech-loramac: provide basic persistence for session keys and devaddr (#11552)
notifications at github.com
Mon May 20 15:30:25 CEST 2019
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
### Contribution description
This PR provides an automatic persistence mecanism of the LoRaMAC session keys and devaddr. This allows to put a device a standby (no ram retention) when using OTAA activation and to continue sending data after wakep without having to join the network again.
Only devaddr, nwkskey, appskey and joined status are saved. But maybe we can extend to more information (DR, ADR, etc) ?
To avoid conflicts, note that this PR is based on #11541 which also provides a useful rework
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
### Testing procedure
- Build and flash `tests/pkg_semtech-loramac` application, join a network using OTAA procedure, send a message:
> loramac set deveui <deveui>
> loramac set appeui <appeui>
> loramac set appkey <appkey>
> loramac set dr 5
> loramac join otaa
Join procedure succeeded!
> loramac tx test
Message sent with success
- Save the current status of the MAC and reboot:
> loramac save
- Try to send another message without joining again:
> loramac tx anothertest
Message sent with success
All steps should work. Other things that can also be tested: `uncnf`, receive a downlink. Also test that ABP activation still works.
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
### Issues/PRs references
Based on #11541
Examples: Fixes #1234. See also #5678. Depends on PR #9876.
Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* pkg/semtech-loramac: reduce MAC thread message queue
* pkg/semtech-loramac: refactor send and recv interactions with the MAC
* tests/pkg_semtech-loramac: add RX thread for downlink messages
* pkg-semtech-loramac: update/simplify doxygen documentation
* examples/lorawan: remove recv call to avoid endless lock
* examples/lorawan: add possibility to use ABP + pm
* examples/lorawan: update README
* pkg/semtech-loramac: persist OTAA join information in eeprom
* examples/lorawan: don't launch join procudure if already joined
* examples/lorawan: unblock lowest possible power mode by default
-- File Changes --
M examples/lorawan/Makefile (32)
M examples/lorawan/README.md (44)
M examples/lorawan/main.c (83)
M pkg/semtech-loramac/contrib/semtech_loramac.c (223)
M pkg/semtech-loramac/contrib/semtech_loramac_getset.c (55)
M pkg/semtech-loramac/doc.txt (6)
M pkg/semtech-loramac/include/semtech_loramac.h (15)
M tests/pkg_semtech-loramac/main.c (67)
-- Patch Links --
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