From 469bb48d52a846cb33a93ac532017b63c1d8f13a Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Wed, 14 Nov 2018 07:27:57 +0100 Subject: [PATCH] correct sonoff rf bridge issue not communicating with RF module #310 --- OpenMQTTGateway.ino | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index 2a45a62..eabd21d 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -255,9 +255,12 @@ void setup() Serial.begin(SERIAL_BAUD); #if defined(ESP8266) || defined(ESP32) + #ifdef ESP8266 - Serial.end(); - Serial.begin(SERIAL_BAUD, SERIAL_8N1, SERIAL_TX_ONLY);// enable on ESP8266 to free some pin + #ifndef ZgatewaySRFB // if we are not in sonoff rf bridge case we apply the ESP8266 pin optimization + Serial.end(); + Serial.begin(SERIAL_BAUD, SERIAL_8N1, SERIAL_TX_ONLY);// enable on ESP8266 to free some pin + #endif #endif #if defined(ESP8266) && !defined(ESPWifiManualSetup)