Merge branch 'master' into development

This commit is contained in:
Verkehrsrot 2019-10-10 23:11:23 +02:00 committed by GitHub
commit 7f7587f3a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,6 +419,19 @@ void lmictask(void *pvParameters) {
// discarded. // discarded.
LMIC_reset(); LMIC_reset();
#if defined(CFG_eu868)
// 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
LMIC_setDrTxpow(EU868_DR_SF9, KEEP_TXPOW);
#else
// Set the data rate to Spreading Factor 7. This is the fastest supported
// rate for 125 kHz channels, and it minimizes air time and battery power.
// Set the transmission power to 14 dBi (25 mW).
LMIC_setDrTxpow(DR_SF7, 14);
#endif
// This tells LMIC to make the receive windows bigger, in case your clock is // This tells LMIC to make the receive windows bigger, in case your clock is
// faster or slower. This causes the transceiver to be earlier switched on, // faster or slower. This causes the transceiver to be earlier switched on,
// so consuming more power. You may sharpen (reduce) CLOCK_ERROR_PERCENTAGE // so consuming more power. You may sharpen (reduce) CLOCK_ERROR_PERCENTAGE