fix JOIN WAIT problem with TTN

This commit is contained in:
Verkehrsrot 2019-10-05 23:08:13 +02:00
parent 01fb7c53b4
commit 7762170fa1

View File

@ -484,6 +484,14 @@ void lmictask(void *pvParameters) {
os_init(); // initialize lmic run-time environment
LMIC_reset(); // initialize lmic MAC
// Note that The Things Network uses the non-standard SF9BW125 data rate for RX2
// in Europe and switches between RX1 and RX2 based on network congestion. Thus,
// to avoid occasionally join failures, we set datarate to SF9 and bypass the
// LORAWAN spec-compliant RX2 == SF12 setting
#if defined(CFG_eu868)
LMIC_setDrTxpow(EU868_DR_SF9, KEEP_TXPOW);
#endif
LMIC_setLinkCheckMode(0);
// This tells LMIC to make the receive windows bigger, in case your clock is