[riot-notifications] [RIOT-OS/RIOT] Pr/pkg/loramac link check (#8639)

Alexandre Abadie notifications at github.com
Mon Feb 26 09:19:07 CET 2018

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 adds support for the LoRaWAN "LinkCheckReq" MAC command.

The feature adds the possibility to validate the connectivity with the network by retrieving 2 informations:
- the number of gateways reachable by the end device
- the demodulation margin indicates the link margin in dB of the last received command (from the specs:
"A value of 0 means that the frame was received at the demodulation floor (0 dB or no
margin) while a value of 20, for example, means that the frame reached the gateway 20 dB
above the demodulation floor"

The link check request will be sent with the next TX packet and the reply will be received by the nodes in the following RX window. This means that one has to schedule the request and check for the result after a TX.

This PR also adds the `link_check` subcommand to the `loramac` in the `pkg_semtech-loramac` test application. Use it as follows:

# schedule the link check
> loramac link_check
Link check request scheduled
> loramac tx test
TX done
Link check information:
- Demodulation margin: 38
- Number of gateways: 1

As a side note, I'm planning to refactor the API of the semtech loramac package by introducing a structure the will handle a loramac instance. This structure will also contain usefull attributes (radio device descriptor, keys, rx_data, etc) and will simplify the netdev adaption (I think) and help fixing thread safety issues.

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

### Issues/PRs references


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: add link check request support
  * tests/pkg_semtech-loramac: add new link_check command

-- File Changes --

    M pkg/semtech-loramac/contrib/semtech_loramac.c (38)
    M pkg/semtech-loramac/include/semtech_loramac.h (29)
    M tests/pkg_semtech-loramac/main.c (24)

-- 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...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180226/aa6b3b0d/attachment.html>

More information about the notifications mailing list