-
Notifications
You must be signed in to change notification settings - Fork 3k
[LoRaWAN]: Adding QOS in response to LinkADRReq and fixing class C bugs #8405
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
Conversation
@AnttiKauppila, @cmonr Please review. |
@hasnainvirk Please take a look at the unittest. Looks like one of them is producing a segfault. |
LinkADRReq parameters and certain parameters used camel case which is not the recommended style.
Before going after an automatic uplink, we should check if there was an automatic uplink already ongoing, i.e., the ack for the previous automatic uplink cycle has not been received. If there is we shouldn't queue the new automatic uplink and wait for the previous Ack cycle to complete.
LinkADRReq mac command can be used by the network server to set a certain level of QOS using NbTrans field which is applicable to Unconfirmed traffic only for 1.0.2 spec. This commit introduces mechanisms to facilitate this QOS. It means to repeat an outgoing unconfirmed message NbTrans times without changing its frame counter. For class C, we have retired the ack_expiry_timer_for_class_c and have replaced it with another timer which mimics the RX2 closure as in Class A but doesn't actually close RX2 window. It's just a mechanism by which the state machine is informed that the you can proceed forward, we have not received anything in RX2 window either. This is needed as RX2 doesn't timeout in class C (i.e., the radio remains in continuous mode). In addition to that we need to close any pending timers for Receive windows after the MIC has passed and the Duplicate counter check has also been passed.
After transmission we should change the state before invoking opening of slots as we may start receiving in the rx slots and the state would suddenly change from SENDING to RECEIVING without going through the ACK_WAIT state (in case of CONFIRMED messages). Tests show that after this slight adjustment, our number of ack retries have significantly reduced.
The idea behind the method post_process_no_reception() is to post process any outgoing TX but we shouldn't do that if a CONFIRMED message is outgoing and there are still some retries left.
Previously, we weren't filling in RX1 frequecny in rx_window1_config structure. However, everything worked as in LoRaPHY::rx_config() API there was a check which filled in correct RX1 frequency. Now we are filling in RX1 freq. properly while we are computing parameters for RX1 window.
A couple of the coverity analysis findings are being treated here. For the rest there will be a separate PR.
Missing methods are added. Logic was broken at various places which needed to be fixed.
18a07e5
to
3bfef7f
Compare
@hasnainvirk I re-ran the unit-test check and that still failed, then tried re-build on Jenkins as @OPpuolitaival suggested , but it still failed: |
Still failing, can you review the failures? @AnttiKauppila please review |
PR 8299 went in but correct unit tests were not there. This commit is adding proper unittests for 8299.
8f0df13
to
9c3f73b
Compare
/morph build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really hoping the rest of the PR does't fail the rest of CI.
Build : SUCCESSBuild number : 3372 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 3006 |
Test : SUCCESSBuild number : 3174 |
Description
Adds QOS mechanism for unconfirmed messages as per 1.0.2 spec in response to LinkADRReq mac command. In addition to that it fixes various bugs potentially hindering class C operation.
Unit tests for missing methods and fixes for broken logic in the unit tests is also added.
Pull request type