[riot-notifications] [RIOT-OS/RIOT] tests/pkg_semtech_loramac: fix get command with EUI values (#8633)
notifications at github.com
Sat Feb 24 11:14:33 CET 2018
- add a null character after conversion from bytes to hex chars
- set the maximum print buffer size to the maximum possible size (application key size)
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 fixes the output of the `loramac set` command in the `pkg_semtech-loramac` test application. I
just realized that no string terminating character is added to the buffer used to store the string of hex chars. And thus, calling the `get` command with `appkey` (16 bytes, 32 hex chars) before `deveui` (8 bytes, 16 hex chars) was working for the former but not for the latter: chars from the previous command still being in the converted chars buffer.
This PR also set the maximum size of the print buffer to the maximum number of characters expected: the keys (application, application session and network session keys) are 16 bytes long (32 hex chars) so now it's 33 bytes long.
Tested and works now.
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 --
* tests/pkg_semtech_loramac: fix get command for EUIs
-- File Changes --
M tests/pkg_semtech-loramac/main.c (10)
-- 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