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 [backport 2019.07] #11873

Conversation

fjmolinas
Copy link
Contributor

Backport of #11869

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.

(cherry picked from commit cdf687c)
@fjmolinas fjmolinas added 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 Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) 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.

ACK.

@leandrolanzieri leandrolanzieri merged commit 84a3cec into RIOT-OS:2019.07-branch Jul 19, 2019
@fjmolinas fjmolinas deleted the backport/2019.07/pr_lorawan_retcode branch July 19, 2019 13:20
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 Process: release backport Integration Process: The PR is a release backport of a change previously provided to master 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.

2 participants