-
Notifications
You must be signed in to change notification settings - Fork 3k
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
LoRaWAN: Reduced priority for automatic uplinks & higher data rate usage for connection establishment #7601
Conversation
@kivaisan Please review. |
@kivaisan Please review again. I have added two more commits to the PR. |
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.
Looks ok.
In the case when an automatic uplink was queued and the user do have something send, we should give priority to user data instead od automatic uplink message.
The stack was trying to connect with default data rates which happened to be the lowest data rates in a specific region. In the beginning device and NS do not have agreed upon tx rx parameters and there can be synchronization issues. When we use lower datarates, we may end up having a minute and a half long transmissions that hnot only blocks the channel for a long time but also reduce the chance of proper synch between device and NS. That's why we have decided to begin with higher data rates and gradually decrease datarate if we do not hear from the network server.
DR7 is used for FSK in AS932 region. As a default max DR, we should use a LoRa modulation compatible data rate. Ofcourse if a device wishes to use FSK, it can set DR7 using set_data_rate() API and turning off ADR, or an NS can configure a new channel for the device utilizing DR7.
900522e
to
57393bc
Compare
If an ack is not received after maximum retries, we need to mark an error which was missing from the post processing sequence.
We had a bug especially in the reception path. Our recv window opening delays were being calculated on the premise that the radio has to capture 5 preamble symbols out of 8 transmitted by the base station. However, in PHY layer while setting radio rc settings, we were setting preamble length to be 8. Preamble length register needs to be configured differently for Uplink and Downlink. For uplink, we wish to transmit 8 preamble symbols whereas in the reception path we need to receive 5 preamble symbols at least out of 8. Alongwith that the maximum range of timing error may vary from platform to platform as it is based upon the crystal in the chip. We have now made these parameters configurable and have loaded them with the most optimal defaults.
57393bc
to
c7f3585
Compare
@SeppoTakalo Can you please review this ? |
Code looks OK, but I don't know the domain enough to tell whether it is correct, but I assume this was tested already. |
@AnttiKauppila Can you please review this ? Have been in pipeline for a long time now. |
@kjbracey-arm Can you please review ? |
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.
LGTM
/morph build |
Build : SUCCESSBuild number : 2744 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2376 |
Test : SUCCESSBuild number : 2469 |
/morph mbed2-build |
LoRaWAN: Reduced priority for automatic uplinks & higher data rate usage for connection establishment
Description
This PR handles two issues:
i) User transmissions should have priority over automatic uplinks.
The stack schedules an event for the automatic uplink when needed and the control goes back to
application, if the user stays silent and there is nothing else to do, the automatic uplink goes out as
planned, otherwise user transmission gets priority and automatic uplink gets cancelled.
ii) We should use higher data rates to begin with as they result in smaller transmission times which
doesn't block the channel too long. Plus it also helps getting in synch with the network server faster
which is crucial to set network delays in order to open receive windows.
In addition to that a bug is fixed in post processing of CONFIRMED messages.
As receive timing error and preamle lengths are constants but could be configurable, we have made them configurable and loaded most optimal values as defaults.
Changes in the API and usage is internal to the stack.
Pull request type