From 791e33f81ae6e4e3b8ae6381c376db5df38ac278 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sat, 13 Jul 2019 16:31:53 +0200 Subject: [PATCH] Fix WeMo emulation for 1G echo and 2G echo dot (#6086) --- sonoff/_changelog.ino | 1 + sonoff/support_udp.ino | 1 + sonoff/xdrv_21_wemo.ino | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index cd2f2d7d43a5..0345af3071e5 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -11,6 +11,7 @@ * Add AZ7798 automatic setting of clock display (#6034) * Add Epoch and UptimeSec to JSON messages (#6068) * Add support for up to 4 INA219 sensors (#6046) + * Fix WeMo emulation for 1G echo and 2G echo dot (#6086) * * 6.6.0 20190707 * Remove support of TLS on core 2.3.0 and extent support on core 2.4.2 and up diff --git a/sonoff/support_udp.ino b/sonoff/support_udp.ino index eccc4681d938..550e97b97343 100644 --- a/sonoff/support_udp.ino +++ b/sonoff/support_udp.ino @@ -36,6 +36,7 @@ bool udp_response_mutex = false; // M-Search response mutex to control r \*********************************************************************************************/ const char URN_BELKIN_DEVICE[] PROGMEM = "urn:belkin:device:**"; +const char URN_BELKIN_DEVICE_CAP[] PROGMEM = "urn:Belkin:device:**"; const char UPNP_ROOTDEVICE[] PROGMEM = "upnp:rootdevice"; const char SSDPSEARCH_ALL[] PROGMEM = "ssdpsearch:all"; const char SSDP_ALL[] PROGMEM = "ssdp:all"; diff --git a/sonoff/xdrv_21_wemo.ino b/sonoff/xdrv_21_wemo.ino index 6d5a41715d6d..4858cd1f544d 100644 --- a/sonoff/xdrv_21_wemo.ino +++ b/sonoff/xdrv_21_wemo.ino @@ -62,7 +62,7 @@ void WemoRespondToMSearch(int echo_type) if (PortUdp.beginPacket(udp_remote_ip, udp_remote_port)) { char type[24]; if (1 == echo_type) { // type1 echo 1g & dot 2g - strcpy_P(type, URN_BELKIN_DEVICE); + strcpy_P(type, URN_BELKIN_DEVICE_CAP); } else { // type2 echo 2g (echo, plus, show) strcpy_P(type, UPNP_ROOTDEVICE); }