Giter Site home page Giter Site logo

Comments (11)

miguemorales avatar miguemorales commented on July 17, 2024 1

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.
Kind regards

from arduino-lmic.

i-g-g-y avatar i-g-g-y commented on July 17, 2024

I can confirm the same issue. The code bellow will not put a node into a fixed data rate.

`
LMIC_setAdrMode(0);
LMIC_setDrTxpow(DR_SF10,14);

image

`

from arduino-lmic.

kadirozdinc avatar kadirozdinc commented on July 17, 2024

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

from arduino-lmic.

i-g-g-y avatar i-g-g-y commented on July 17, 2024

I can also confirm, that setting the DR rate just before sending packet out works, should be written in the README.

from arduino-lmic.

slavendam avatar slavendam commented on July 17, 2024

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.
In US and AU region device is always trying to join on SF10.

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.
Note that if device joined on e.g. SF11 it means that it couldn't reach gateway with lower SFs. So if you after join put e.g. SF8 or SF9, it is possible that you device will not be able to transfer messages to gateway.

from arduino-lmic.

martinius96 avatar martinius96 commented on July 17, 2024

@slavendam
Can you provide full example please?

from arduino-lmic.

slavendam avatar slavendam commented on July 17, 2024

Can you provide full example please?

  1. Press CTRL+F while on this page,
  2. find line "LMIC_setLinkCheckMode(0);" in example above
  3. next to that add:
LMIC_setAdrMode(false);
LMIC_setDrTxpow(DR_SF12, 14); // or other SF you want

from arduino-lmic.

martinius96 avatar martinius96 commented on July 17, 2024

I am using this example with ABP method, but I am facing same problem.
https://github.com/martinius96/hladinomer-studna-scripty/blob/master/examples/Hladinomer/LoRaWAN/LoRaWAN.ino

I tried your suggestion, I added to EV_JOINED case:
LMIC_setLinkCheckMode(0);
LMIC_setAdrMode(false);
LMIC_setDrTxpow(DR_SF12, 14); // or other SF you want
but no success. Still it is sending with SF9 as before.

from arduino-lmic.

slavendam avatar slavendam commented on July 17, 2024

I am using this example with ABP method, but I am facing same problem.

ABP doesn't go through process of joining so EV_JOINED is never called.
For ABP you need to set this at the end of void setup() function.
On line 266 in your example you already have function that setup SF. Just change value.
https://github.com/martinius96/hladinomer-studna-scripty/blob/0a5983aaaee78427656a8620987ae33e96245f02/examples/Hladinomer/LoRaWAN/LoRaWAN.ino#L266

from arduino-lmic.

martinius96 avatar martinius96 commented on July 17, 2024

I tried but it does not work.
It's simply not using parameter I provided to that function on row 266.
Still SF9 is set, it does not react on provided value
ABP TTGO board SF

from arduino-lmic.

martinius96 avatar martinius96 commented on July 17, 2024

still not solved by me

from arduino-lmic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.