Force avoiding use of high spreading factors with ADR and LinkCheckMode enabled #761
-
Hello, I am using EU868 region on a Heltec ESP32 LoRa (v2) board with TTN. The application I am creating favors sending messages more often (and at constant intervals) rather than having them received at all costs. From airtime calculations I gather that I can use at most SF9. However, AFAIU TTN also supports SF10 and having ADR+LinkCheckMode enabled in the default configuration may chose to set SF10 (under bad connectivity conditions). If this happens, transmissions will take too much air time to stay within the fair use policy. Hence my idea is to disable the use of SF10. Under normal conditions, messages will be received just fine at SF7 thus my current implementation forces SF7 by the following lines:
I can foresee this causing problems should SF7 ever not be enough. Hence I would like to enable ADR and LinkCheck while at the same time ensuring nothing beyond SF9 is ever being used to transmit messages. A cursory look at the source code suggests I might try to directly disable the respective data rate from Hence my question: Is this possible with Arduino-LMIC? If yes, how would it be configured? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
If I understand your question correctly Setup a channel that use SF7 to SF9 You can also force SF7 by calling |
Beta Was this translation helpful? Give feedback.
If I understand your question correctly
Since i am on AS923 I will use that as an example (not sure about EU868)
Setup a channel that use SF7 to SF9
LMIC_setupChannel(0, 923200000, DR_RANGE_MAP(DR_SF9, DR_SF7), BAND_CENTI);
You can also force SF7 by calling
LMIC_setDrTxpow(DR_SF7, 14)
before sending data, which I think is better (?) than setting value inside LMIC's data struct