From b10c96ee32d94c2baefe04530fca014c2f042edc Mon Sep 17 00:00:00 2001 From: nikito7 <45373783+nikito7@users.noreply.github.com> Date: Mon, 10 Jul 2023 10:11:19 +0100 Subject: [PATCH] LoRa ESP8266 fix (#1711) * LoRa ESP8266 fix * Update ZgatewayLORA.ino --- main/ZgatewayLORA.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/ZgatewayLORA.ino b/main/ZgatewayLORA.ino index a1a8f88b97..48ac2ee17e 100644 --- a/main/ZgatewayLORA.ino +++ b/main/ZgatewayLORA.ino @@ -128,7 +128,12 @@ boolean _MQTTtoWiPhone(JsonObject& LORAdata) { } void setupLORA() { +# ifdef ESP8266 + SPI.begin(); +# else SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_SS); +# endif + LoRa.setPins(LORA_SS, LORA_RST, LORA_DI0); if (!LoRa.begin(LORA_BAND)) {