tuya-convert icon indicating copy to clipboard operation
tuya-convert copied to clipboard

Tuya curtain switch won't flash

Open HA-TB303 opened this issue 7 years ago • 12 comments

Device: https://www.aliexpress.com/item/Tuya-Smart-Life-WiFi-Curtain-Switch-for-Electric-Motorized-Curtain-Blind-Roller-Shutter-Google-Home-Amazon/32963064005.html

Issue:

Hi tried flashing a Tuya Wifi Curtain switch (brandless) but it won't work. I have used the same setup (raspberry pi 3+ using the internal wifi) several times before with success.

Is this a device with new firmware which can not be flashed with tuya convert, or is there still hope? ;)

Logs:

pi@raspberrypi:~/tuya-convert/scripts $ cat *.log
1557382733: mosquitto version 1.4.10 (build date Wed, 13 Feb 2019 00:45:38 +0000) starting
1557382733: Using default config.
1557382733: Opening ipv4 listen socket on port 1883.
1557382733: Opening ipv6 listen socket on port 1883.
Put Device in Learn Mode! Sending SmartConfig Packets now
Sending SSID                  vtrust-flash
Sending wifiPassword          flashmeifyoucan
SmartConfig in progress
..........
SmartConfig complete.
Listening on port 80
Backing up /etc/dnsmasq.conf...
Writing dnsmasq config file...
Creating new /etc/dnsmasq.conf...
Writing hostapd config file...
Configuring AP interface...
Applying iptables rules...
Starting DNSMASQ server...
Starting AP on wlan0 in screen terminal...
Configuration file: /etc/hostapd/hostapd.conf
Failed to create interface mon.wlan0: -95 (Operation not supported)
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:15:c8:9f and ssid "vtrust-flash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: associated
wlan0: AP-STA-CONNECTED a4:cf:12:a3:61:08
wlan0: STA a4:cf:12:a3:61:08 RADIUS: starting accounting session 033E5D2F101C8A6D
wlan0: STA a4:cf:12:a3:61:08 WPA: pairwise key handshake completed (RSN)
wlan0: STA 70:70:0d:0f:99:e5 IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 70:70:0d:0f:99:e5
wlan0: STA 70:70:0d:0f:99:e5 RADIUS: starting accounting session 28C06D7793334D7E
wlan0: STA 70:70:0d:0f:99:e5 WPA: pairwise key handshake completed (RSN)
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED a4:cf:12:a3:61:08
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: disassociated
wlan0: STA a4:cf:12:a3:61:08 IEEE 802.11: associated
wlan0: AP-STA-CONNECTED a4:cf:12:a3:61:08
wlan0: STA a4:cf:12:a3:61:08 RADIUS: starting accounting session 6C10E6FFFA89C6D5
wlan0: STA a4:cf:12:a3:61:08 WPA: pairwise key handshake completed (RSN)

HA-TB303 avatar May 09 '19 06:05 HA-TB303

When attempting the flash with the device in pairing mode, after a few seconds the devices LED stops flashing and then turns off. The device does not seem to reboot, but it does leave the pairing mode.

When I put it in pairing mode without attempting the flash, it stays in pairing mode so there is some communication going on.

HA-TB303 avatar May 10 '19 17:05 HA-TB303

looks like mine

nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Backing up /etc/dnsmasq.conf...
Writing dnsmasq config file...
Creating new /etc/dnsmasq.conf...
Writing hostapd config file...
Configuring AP interface...
Applying iptables rules...
Starting DNSMASQ server...
RTNETLINK answers: File exists
Starting AP on wlan0 in screen terminal...
Configuration file: /etc/hostapd/hostapd.conf
Failed to create interface mon.wlan0: -95 (Operation not supported)
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:23:63:06 and ssid "vtrust-flash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 14:30:c6:3f:69:ec
wlan0: STA 14:30:c6:3f:69:ec RADIUS: starting accounting session DA93BEEE0BAFD932
wlan0: STA 14:30:c6:3f:69:ec WPA: pairwise key handshake completed (RSN)
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED 14:30:c6:3f:69:ec
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: associated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: associated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: disassociated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: associated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: associated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: disassociated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: associated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: disassociated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: associated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: associated
wlan0: AP-STA-POSSIBLE-PSK-MISMATCH 60:01:94:d1:52:a1
wlan0: AP-STA-POSSIBLE-PSK-MISMATCH 60:01:94:d1:52:a1
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: disassociated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: associated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: associated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: disassociated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: associated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: AP-STA-POSSIBLE-PSK-MISMATCH 60:01:94:d1:52:a1
wlan0: AP-STA-POSSIBLE-PSK-MISMATCH 60:01:94:d1:52:a1
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: disassociated
wlan0: STA 60:01:94:d1:52:a1 IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 60:01:94:d1:52:a1
wlan0: STA 60:01:94:d1:52:a1 RADIUS: starting accounting session FE261F04550B051C
wlan0: STA 60:01:94:d1:52:a1 WPA: pairwise key handshake completed (RSN)
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 14:30:c6:3f:69:ec
wlan0: STA 14:30:c6:3f:69:ec RADIUS: starting accounting session E5B3468A892AF34B
wlan0: STA 14:30:c6:3f:69:ec WPA: pairwise key handshake completed (RSN)
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED 14:30:c6:3f:69:ec
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated
wlan0: STA 14:30:c6:3f:69:ec IEEE 802.11: disassociated

but then

curl http://10.42.42.37
curl: (7) Failed to connect to 10.42.42.37 port 80: Connection refused ``` 

Underknowledge avatar May 11 '19 13:05 Underknowledge

Have the exact same problem. LED is blinking fast, device (Gosund SP1) connects to the AP, LED switches off. Another SP1 flashed without any problems using the same live environment, so I guess that some devices already have a fixed firmware while others doesn't.

DoktorHeisenberg avatar May 13 '19 09:05 DoktorHeisenberg

Same here with a Tellur TLL331011 bulb I received today (Wifi module 1.0.0/ECU module 1.0.0). Despite the version, I guess the firmware is fixed as well.

However if I run:

nc -u -l -k -p 6666 nc -u -l -k -p 6667

as suggested at https://github.com/ct-Open-Source/tuya-convert/issues/165#issuecomment-480084833, then can see the bulb output in JSON format (and luckily I can still control it locally using port 6668)

If I can provide more data, including the logs, if needed.

Couldn't see anything particular, on pairing mode, I can't see anything but the bulb getting IP address, when it gets out of pairing mode, it makes the requests, including:

URI:/gw.json?a=tuya.device.dynamic.config.get&gwId=XXXXXXXXXXXXXXXXXXX&t=555&v=1.0&sign=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
WARN: unknown request: tuya.device.dynamic.config.get (/gw.json?a=tuya.device.dynamic.config.get&gwId=XXXXXXXXXXXXXXXXXXX&t=555&v=1.0&sign=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY)
[I 190513 19:59:53 web:2246] 200 POST /gw.json?a=tuya.device.dynamic.config.get&gwId=XXXXXXXXXXXXXXXXXXX&t=555&v=1.0&sign=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY (10.42.42.40) 7.11ms

Maybe this is a duplicate of #185 and #165?

juliogonzalez avatar May 13 '19 21:05 juliogonzalez

@HA-TB303 @Underknowledge as @DoktorHeisenberg mentioned, you may be running a patched firmware. You can verify this running the commands like @juliogonzalez. Stay tuned to see if we can release a fix, or flash it via serial.

@juliogonzalez That's good news you are getting JSON output, so I'd say this is a different issue entirely. Some devices have broken update mechanisms, but we'll need to do a little more digging to be sure. Please open a new issue with all the details to keep things organized.

kueblc avatar May 14 '19 21:05 kueblc

Same issue here with a Digoo SP 202 Plug (WIFI 1.1.1 , MCU 1.1.1) Serial Flash is not possible. The circuit board is too well secured. So i pray to god, that you´ll find a solution for OTA Flash.

haselchen avatar May 17 '19 09:05 haselchen

Same here currently with a Merkury light bulb.... just can't get it to flash. I'm beginning to think they have been patched.

drock1985 avatar May 18 '19 21:05 drock1985

Same here currently with a Merkury light bulb.... just can't get it to flash. I'm beginning to think they have been patched.

Same here just returned mine. I am starting to think if there are still old stocks...

lucmbahmoute avatar May 27 '19 15:05 lucmbahmoute

and to think I went to Walmart and bought other stuff while picking up these bulbs, ahh well at least I got 3 in before the patches, sorry Walmart, our relationship is over

davericher avatar May 30 '19 01:05 davericher

5* I returned the two Merkury flood light style rgbws, and picked up two more of the regular bulb style rgbws, there still good to go

7* I forgot the light boxes (3d printed lithophane boxes) i have some of these in

davericher avatar May 30 '19 05:05 davericher

5* I returned the two Merkury flood light style rgbws, and picked up two more of the regular bulb style rgbws, there still good to go

7* I forgot the light boxes (3d printed lithophane boxes) i have some of these in

You mean white + colour ones? Were you able to flash successfully? Maybe I should try picking up more

lucmbahmoute avatar May 30 '19 13:05 lucmbahmoute

Happy to share that support for HTTPS firmware is in the works #279

kueblc avatar Sep 28 '19 12:09 kueblc