-
Notifications
You must be signed in to change notification settings - Fork 212
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
How to make DR fixed in OTAA example #938
Comments
Hi, I am also using this library, and i can report the same issue, but i can go further. To me, it happens that the device does de join and the first message with SF7, but the next message are sent with the SF that you order. I don't know why it happens like that, but it really bother us, bucause usually the first join is the most difficult message, then the next messages do not have problems. If i power down the device, next join and first message again uses SF7, and after that it returns the specified SF. |
While digging around the library, I realized that this issue is related to Payload Size. If you look over "LoraWAN Regional Parameters" document, you will see Maximum payload size differs per DataRate. For example for SF12 and SF11 MaxPayloadSize is 51byte (FRMpayload). If in your example, you set DR0(SF12) and try to send payload that exceed this limitation, library decrease SF by itself. Please lower your payload below that limit and try again. For more info refer to Regional parameters documantation |
I can also confirm, that setting the DR rate just before sending packet out works, should be written in the README. |
If you set up SF before join that parameter will be deleted during join. In EU868 region (and AS923 I think also) device will try to join on SF7 and if that fails it will increase SF and repeat. Than it will try to join on SF8, and if it fails it will increase SF on SF9. It will repeat this until SF12 and than it will try only on SF12. If you want to set fixed SF, you need to do that in EV_JOINED part, next to "LMIC_setLinkCheckMode(0);". So after join is successful, than set up SF you want and disable ADR. |
@slavendam |
|
I am using this example with ABP method, but I am facing same problem. I tried your suggestion, I added to EV_JOINED case: |
ABP doesn't go through process of joining so EV_JOINED is never called. |
still not solved by me |
Hello, I implement ttn_otaa example successfully and I need to make DR fixed at SF12. I add these but doesn't work :
Codes are below :
How can i implement it correctly ?
The text was updated successfully, but these errors were encountered: