pkg/semtech-loramac: update to upstream v4.4.1 + cleanup#8864
pkg/semtech-loramac: update to upstream v4.4.1 + cleanup#8864aabadie merged 9 commits intoRIOT-OS:masterfrom
Conversation
|
I am hoping to use this pull request for a project, and would like to help out. What unreliable behavior have you observed? And do you have a sense of where the problem might be coming from? From my end, I see OTAA joins failing before a reply can be received (sometimes, but not always), and data transmissions aren't being sent - plus the test code hangs indefinitely with no confirmation or failure message when trying to send data. Thanks. |
bd54ced to
ce851f4
Compare
|
Thanks for proposing some help here @ecarthi.
I didn't rework this PR recently, just rebased it now, but the problems I initially observed are the same as the ones you describe regarding reply not received: the RX windows are closed too early so messages sent from the backend are missed. The problems were happening mostly with DR0/DR1. Regarding the code that is hanging, this was fixed in master, so now that the branch is rebased, this shouldn't happen anymore (not yet tested though). Otherwise, the good point with this loramac version is the possibility to select the datarate used during the join procedure. With the old version, this is not possible. |
ce851f4 to
ad52f7d
Compare
ad52f7d to
eb03fd2
Compare
|
@aabadie do you think you can rebase this PR ? I have some new hardware I'd like to test, I would like to try your PR and I need the I2C rework ;) |
I already rebased it after I2C rework was merged. |
|
I ran some tests with this PR and my new board |
|
Hi We did it separately — https://github.com/unwireddevices/RIOT/tree/loralan-public-2018.07/pkg/semtech-loramac, also backported RU864 band from 1.0.3a Application logic is here — https://github.com/unwireddevices/RIOT/blob/loralan-public-2018.07/examples/loralan-wan/main-node.c (not a pure example, but a part of a bigger project, and some logic is not here yet, e.g. uplink queue) Works quite good with Thingpark and Gotthard's LoRaWAN server, including DR0 OTAA joins. |
|
I'm trying to figure out what's wrong with this madness but I didn't make any progress. |
|
Network server issue maybe? E.g. Actility ThingPark has SF settings for each registered device, and it replies on RX2 with the specified SF, not SF that device used to send JoinReq. Our branch works on STM32L151 Cat. 3/4/5 (CBU6A, CCU6, RET6...) or STM32L07x CPUs, if you have any of those, you may want to try it by compiling examples/loralan-wan (change the board accordingly). Other CPUs are not supported due to rtctimers_millis implementation. At least you'll see if it's a device related issue or not. After flashing, you'll need serial console to set DevEUI, AppKey and AppEUI, and then you may change LoRaWAN settings (join type, default DR, ADR) with the "set" command followed by "save" and "reboot". To send some payload data enable something like "mod lmt01 enable" or "mod adc enable", then "save" and "reboot" — after that you'll have "lmt01" or "adc" modules enabled, they send some data automatically (period can be changed with "adc period N" or "lmt01 period N" command) or by command ("adc send", "lmt01 send"). As for now, we've tested our code with Actility, brocaar and gotthard's servers, OTAA works with DR0. |
|
@olegart I am not a ST user so I won't be able to test your branch directly. I'm using TTN with a multitech GW for now. I don't think (yet ?) this is related to the server. I'll try to put more time on it later. |
|
I have some news about DR0 and DR1. TTN seems to use the RX2 window to send the join request's response(using DR0 and DR1 only). But a timeout occurs even before the device setup the RX2 window leading to failure. |
|
@aabadie I was able to locate the DR0/DR1 join request issue. I'll provide a fix once cleanup done so we can finally move forward. Should I push your branch directly or you prefer handle it ? |
|
Thanks for your help @dylad ! That's really a good news.
You can push to my branch, no problem. |
|
To explain more in details what was going on there : This function was substracting us with ms leading in incorrect results. This wrong result was then used here Note : I also fixed @aabadie I'll let you check if it solves issues on your side. |
|
Interesting fix @dylad, so it was just a conversion issue ? I'll try to test today on IoT-LAB if time permits. |
|
Yup, I confirm it again, I was able to fix all my JR DR0/DR1 with this fix. I put 1 billion printf in LoRaMAC stack to find it out ;-) |
0aa6fe9 to
3721215
Compare
|
I tested this PR on IoT-LAB and could join/send/receive packets using DR{0,1,2,3,4,5}. Thanks a lot @dylad ! |
Great ! One approves and we can finally merge this one ! |
To me it's perfectly fine if there's only yours :) |
|
Me too but I'm afraid some maintainers don't have the same opinion. |
|
just tested and works as expected! |
|
there's a bug but it's also present in upstream: I'm OK to merge this one and add the fix in another PR |
|
(we should fix the DR issue, which is not related to this PR) |
|
re-trigger Murdock for LLVM. We can push the green button right after ! |
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
- better handler duty cycle restriction of the MAC when joining and sending - remove state attribute and rely on internal loramac busy state - don't join if already joined
bbd46f8 to
7bfef11
Compare
|
rebased, let's wait for the CI |
|
The CI passed, there's an ACK => all green, so let's go. |
Contribution description
This PR updates the target version of the Semtech loramac-node to the latest release (4.4.1).
For simplicity, the branch is based on #8639.
While working on it, I realized that some code in the driver was useless (rx timeout timer) so I removed it.
I tested the port against TheThingsNetwork but for the moment it doesn't as reliably as expected.
Issues/PRs references
Based on
#8639