pkg/semtech-loramac: improve TX status management after sending a message#10903
Merged
aabadie merged 4 commits intoRIOT-OS:masterfrom Jan 30, 2019
Merged
Conversation
Contributor
|
Testing now, will get back with the results. |
leandrolanzieri
requested changes
Jan 30, 2019
Contributor
|
seems to work since 7d49dff |
leandrolanzieri
approved these changes
Jan 30, 2019
Contributor
There was a problem hiding this comment.
LGTM. Tested on b-l072z-lrwan1 and lobaro-lorabox boards: lorawan example and pkg test - Receiving and sending on different DR. Also it seems to fix @fesselk 's issue (though I could not reproduce it). ACK.
@aabadie Please squash
7d49dff to
bb8bdad
Compare
Contributor
Author
|
@leandrolanzieri, thanks a lot for your sensible review and testing! |
Contributor
|
@aabadie thank you for this fix! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR is an attempt to fix #10352. The idea is to better manage the TX status returned by the MAC right after a send.
The caller code has to take care of this return code (ok, error, mac_busy, dutycycle_restriction, etc) and not call the receive function in not ok.
To achieve a status returned by the send function, I fixed a missing management of the status IPC messages returned from the MAC. Now all cases are correctly taken into account. This improves things.
The
examples/lorawanandtests/pkg_semtech-loramachave been adapted accordingly to the change.The doxygen documentation of the send/recv functions has also been adapted.
Testing procedure
tests/pkg_semtech-loramacapplication, configure the device, join a network (OTAA or ABP) and send frames using different datarates. The node should always be responsive after a receive or after an error happens with the send (dutycycle for example).examples/lorawan, it should work smoothly.Issues/PRs references
Probably fixes #10352