From b7b525f3d946b9a32218f07aca9b216b0bcee5c1 Mon Sep 17 00:00:00 2001 From: Cheney Date: Fri, 21 Jan 2022 17:21:09 +0800 Subject: [PATCH 1/2] Send HEX string to mqtt --- tasmota/xdrv_08_serial_bridge.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_08_serial_bridge.ino b/tasmota/xdrv_08_serial_bridge.ino index 9d297bd2a..bcb5cfc4a 100644 --- a/tasmota/xdrv_08_serial_bridge.ino +++ b/tasmota/xdrv_08_serial_bridge.ino @@ -65,7 +65,7 @@ void SerialBridgeInput(void) { while (SerialBridgeSerial->available()) { yield(); uint8_t serial_in_byte = SerialBridgeSerial->read(); - + serial_bridge_raw = Settings->serial_delimiter == 255; if ((serial_in_byte > 127) && !serial_bridge_raw) { // Discard binary data above 127 if no raw reception allowed serial_bridge_in_byte_counter = 0; SerialBridgeSerial->flush(); From 5e79ace1655e9c8612279d9c3692a172a178d182 Mon Sep 17 00:00:00 2001 From: Cheney Date: Mon, 24 Jan 2022 12:01:14 +0800 Subject: [PATCH 2/2] set SerialDelimiter=254 to post HEX string --- tasmota/xdrv_08_serial_bridge.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_08_serial_bridge.ino b/tasmota/xdrv_08_serial_bridge.ino index bcb5cfc4a..51d2a13f3 100644 --- a/tasmota/xdrv_08_serial_bridge.ino +++ b/tasmota/xdrv_08_serial_bridge.ino @@ -65,7 +65,7 @@ void SerialBridgeInput(void) { while (SerialBridgeSerial->available()) { yield(); uint8_t serial_in_byte = SerialBridgeSerial->read(); - serial_bridge_raw = Settings->serial_delimiter == 255; + serial_bridge_raw = Settings->serial_delimiter == 254; if ((serial_in_byte > 127) && !serial_bridge_raw) { // Discard binary data above 127 if no raw reception allowed serial_bridge_in_byte_counter = 0; SerialBridgeSerial->flush();