Configure LoRA gateway parameters at startup (#1234)
Without this (and without sending an initial MQTT message to the gateway to configure it) messages are not necessarily received if parameters are different from firmware defaults. This patch helped at least two users: - https://community.home-assistant.io/t/awesome-lora-soil-sensor/304351/23 - https://community.home-assistant.io/t/awesome-lora-soil-sensor/304351/18 Change-Id: Ia65ee5780b56f81fc73662c8779b79083805009b Co-authored-by: Grégoire Seux <grego_openmqttgateway@familleseux.net>
This commit is contained in:
1 parent
9154e6cc46
commit
537583e505
1 file changed
+6
@@ -49,6 +49,12 @@ void setupLORA() {
|
||||
Log.notice(F("LORA_SS: %d" CR), LORA_SS);
|
||||
Log.notice(F("LORA_RST: %d" CR), LORA_RST);
|
||||
Log.notice(F("LORA_DI0: %d" CR), LORA_DI0);
|
||||
LoRa.setTxPower(LORA_TX_POWER);
|
||||
LoRa.setSpreadingFactor(LORA_SPREADING_FACTOR);
|
||||
LoRa.setSignalBandwidth(LORA_SIGNAL_BANDWIDTH);
|
||||
LoRa.setCodingRate4(LORA_CODING_RATE);
|
||||
LoRa.setPreambleLength(LORA_PREAMBLE_LENGTH);
|
||||
LoRa.setSyncWord(LORA_SYNC_WORD);
|
||||
Log.trace(F("ZgatewayLORA setup done" CR));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user