Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/lorawan: fix semtech_loramac_send TX ret code #11869

Merged
merged 1 commit into from
Jul 19, 2019

Conversation

fjmolinas
Copy link
Contributor

Contribution description

With #11541 (b7890b3) TX notification messages are only sent after mcps confirm event, and the code sent is SEMTECH_LORAMAC_TX_DONE instead of SEMTECH_LORAMAC_TX_OK. This PR fixes the documentation and the example accordingly.

Testing procedure

Compile and flash examples/lorawan with valid keys:

make BOARD=b-l072z-lrwan1 DEVEUI=00BD35DEE58FF9CB APPEUI=70B3D57ED000B02F APPKEY=C91870835C73F5E36EDF6E5DBD1445D0 -C examples/lorawan flash term

Without this PR TX actually succeeds but SEMTECH_LORAMAC_TX_DONE return value is perceived as error:

2019-07-19 11:54:38,531 - INFO # nding: This is Rmain(): This is RIOT! (Version: 2019.10-devel-71-ga9e72c5-pr_lorawan_retcode)
2019-07-19 11:54:38,535 - INFO # LoRaWAN Class A low-power application
2019-07-19 11:54:38,538 - INFO # =====================================
2019-07-19 11:54:38,604 - INFO # Starting join procedure
2019-07-19 11:54:43,784 - INFO # Join procedure succeeded
2019-07-19 11:54:43,786 - INFO # Sending: This is RIOT!
2019-07-19 11:54:44,902 - INFO # Cannot send message 'This is RIOT!', ret code: 6

With this PR everything is OK.

2019-07-19 11:52:59,595 - INFO # main(): This is RIOT! (Version: 2019.10-devel-71-ga9e72c5-pr_lorawan_retcode)
2019-07-19 11:52:59,599 - INFO # LoRaWAN Class A low-power application
2019-07-19 11:52:59,602 - INFO # =====================================
2019-07-19 11:52:59,668 - INFO # Starting join procedure
2019-07-19 11:53:04,849 - INFO # Join procedure succeeded
2019-07-19 11:53:04,852 - INFO # Sending: This is RIOT!
2019-07-19 11:53:25,966 - INFO # Sending: This is RIOT!

Issues/PRs references

- with RIOT-OS#11541 TX notification are only sent after mcps confirm event
  this will send a SEMTECH_LORAMAC_TX_DONE instead of
  SEMTECH_LORAMAC_TX_OK.
@fjmolinas fjmolinas added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: doc Area: Documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: LoRa Area: LoRa radio support labels Jul 19, 2019
@fjmolinas fjmolinas requested a review from jia200x July 19, 2019 10:23
@leandrolanzieri leandrolanzieri added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Jul 19, 2019
Copy link
Contributor

@leandrolanzieri leandrolanzieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Tested and works as expected. ACK.

@fjmolinas
Copy link
Contributor Author

@leandrolanzieri Thanks for the review.

@fjmolinas
Copy link
Contributor Author

Backport provided in #11873

@fjmolinas fjmolinas deleted the pr_lorawan_retcode branch July 19, 2019 12:30
@kb2ma kb2ma modified the milestone: Release 2019.10 Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: LoRa Area: LoRa radio support CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants