question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't flash Tuya based bulb

See original GitHub issue

I’m trying to flash a lamp, LTLED-0178 from LOFTer which is recommended to be used with Smart Life app, but I did not have problem controlling it with Tuya app too. Maybe is just the model not suitable for this flash, I would like to better understand that. Wifi-AP seems to be OK, I’m able to connect through phone, tablet and so on. Even the lamp seems to connect succesfully, according to the logs. I did many tries so I’ll post last lines of the log files. The start_flash.sh just loops on dots until I kill it with CTRL + C. I tried running this on both Ubuntu 16.04 LTS and Ubuntu Server 18.04 LTS with similar results.

smarthack-smartconfig.log

Put Device in Learn Mode! Sending SmartConfig Packets now
Sending SSID                  vtrust-flash
Sending wifiPassword          flashmeifyoucan
SmartConfig in progress
..........
SmartConfig complete.

smarthack-wifi.log

nl80211: deinit ifname=wlx0c9d92b943c4 disabled_11b_rates=0
Backing up NetworkManager.cfg...
Restarting NetworkManager...
Failed to restart network-manager.service: Unit network-manager.service not found.
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 wlx0c9d92b943c4 in screen terminal...
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlx0c9d92b943c4 with hwaddr 0c:9d:92:b9:43:c4 and ssid "vtrust-flash"
wlx0c9d92b943c4: interface state UNINITIALIZED->ENABLED
wlx0c9d92b943c4: AP-ENABLED
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca IEEE 802.11: authenticated
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca IEEE 802.11: associated (aid 1)
wlx0c9d92b943c4: AP-STA-CONNECTED ac:57:75:34:bc:ca
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca RADIUS: starting accounting session B341CD45200C8D63
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca WPA: pairwise key handshake completed (RSN)
wlx0c9d92b943c4: AP-STA-DISCONNECTED ac:57:75:34:bc:ca
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca IEEE 802.11: authenticated
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca IEEE 802.11: associated (aid 1)
wlx0c9d92b943c4: AP-STA-CONNECTED ac:57:75:34:bc:ca
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca RADIUS: starting accounting session 9C8A9D907F1FF156
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca WPA: pairwise key handshake completed (RSN)
wlx0c9d92b943c4: AP-STA-DISCONNECTED ac:57:75:34:bc:ca
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca IEEE 802.11: authenticated
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca IEEE 802.11: associated (aid 1)
wlx0c9d92b943c4: AP-STA-CONNECTED ac:57:75:34:bc:ca
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca RADIUS: starting accounting session 7680D81B9C500A32
wlx0c9d92b943c4: STA ac:57:75:34:bc:ca WPA: pairwise key handshake completed (RSN)
wlx0c9d92b943c4: STA b4:e6:2d:07:bc:73 IEEE 802.11: authenticated
wlx0c9d92b943c4: STA b4:e6:2d:07:bc:73 IEEE 802.11: associated (aid 2)
wlx0c9d92b943c4: AP-STA-CONNECTED b4:e6:2d:07:bc:73
wlx0c9d92b943c4: STA b4:e6:2d:07:bc:73 RADIUS: starting accounting session A17C76B551B67D3F
wlx0c9d92b943c4: STA b4:e6:2d:07:bc:73 WPA: pairwise key handshake completed (RSN)
wlx0c9d92b943c4: STA b4:e6:2d:07:bc:73 WPA: group key handshake completed (RSN)
wlx0c9d92b943c4: AP-STA-DISCONNECTED ac:57:75:34:bc:ca

b4:e6:2d:07:bc:73 should be the lamp ac:57:75:34:bc:ca is the phone

smarthack-web.log

Listening on port 80


URI:/gw.json?a=s.gw.update&gwId=02200466b4e62d07bc73&t=190&v=2.0&sign=5ff896439f79b0011cfead00fc084594
Answer s.gw.update
ESC[32m[I 190414 21:18:54 web:2246]ESC[m^O 200 POST /gw.json?a=s.gw.update&gwId=02200466b4e62d07bc73&t=190&v=2.0&sign=5ff896439f79b0011cfead00fc084594 (10.42.42.23) 4.39ms


URI:/gw.json?a=s.gw.dev.update&gwId=02200466b4e62d07bc73&t=7&v=2.0&sign=b7925bd9458faff2db7eb8e32a406033
Answer s.gw.update
ESC[32m[I 190414 21:18:54 web:2246]ESC[m^O 200 POST /gw.json?a=s.gw.dev.update&gwId=02200466b4e62d07bc73&t=7&v=2.0&sign=b7925bd9458faff2db7eb8e32a406033 (10.42.42.23) 2.74ms


URI:/gw.json?a=atop.online.debug.log&gwId=02200466b4e62d07bc73&t=8&sign=c9370154abebebd70ecbd5d115fbb9e3
Answer atop.online.debug.log
ESC[32m[I 190414 21:18:55 web:2246]ESC[m^O 200 POST /gw.json?a=atop.online.debug.log&gwId=02200466b4e62d07bc73&t=8&sign=c9370154abebebd70ecbd5d115fbb9e3 (10.42.42.23) 2.46ms


URI:/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=20&sign=5e19775073daf41508207956b1873027
WARN: unknown request: s.gw.dev.timer.count (/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=20&sign=5e19775073daf41508207956b1873027)
ESC[32m[I 190414 21:19:08 web:2246]ESC[m^O 200 POST /gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=20&sign=5e19775073daf41508207956b1873027 (10.42.42.23) 4.56ms


URI:/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=35&sign=bd07e091c00c86fc5e89232f70363e9e
WARN: unknown request: s.gw.dev.timer.count (/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=35&sign=bd07e091c00c86fc5e89232f70363e9e)
ESC[32m[I 190414 21:19:23 web:2246]ESC[m^O 200 POST /gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=35&sign=bd07e091c00c86fc5e89232f70363e9e (10.42.42.23) 5.69ms


URI:/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=50&sign=c43dda7910e9d753dfcd2a39f4fb41f8
WARN: unknown request: s.gw.dev.timer.count (/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=50&sign=c43dda7910e9d753dfcd2a39f4fb41f8)
ESC[32m[I 190414 21:19:38 web:2246]ESC[m^O 200 POST /gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=50&sign=c43dda7910e9d753dfcd2a39f4fb41f8 (10.42.42.23) 15.91ms


URI:/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=65&sign=87ddcb0105da469395ed323c3e516ee9
WARN: unknown request: s.gw.dev.timer.count (/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=65&sign=87ddcb0105da469395ed323c3e516ee9)
ESC[32m[I 190414 21:19:53 web:2246]ESC[m^O 200 POST /gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=65&sign=87ddcb0105da469395ed323c3e516ee9 (10.42.42.23) 7.15ms


URI:/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=80&sign=0a61011240b22efea23bae5b98242c8d
WARN: unknown request: s.gw.dev.timer.count (/gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=80&sign=0a61011240b22efea23bae5b98242c8d)
ESC[32m[I 190414 21:20:08 web:2246]ESC[m^O 200 POST /gw.json?a=s.gw.dev.timer.count&gwId=02200466b4e62d07bc73&t=80&sign=0a61011240b22efea23bae5b98242c8d (10.42.42.23) 11.50ms

smarthack-mqtt.log

1555276267: mosquitto version 1.4.15 (build date Wed, 13 Feb 2019 00:27:01 +0000) starting
1555276267: Using default config.
1555276267: Opening ipv4 listen socket on port 1883.
1555276267: Opening ipv6 listen socket on port 1883.
1555276733: New connection from 10.42.42.23 on port 1883.
1555276733: New client connected from 10.42.42.23 as 02200466b4e62d07bc73 (c1, k30, u'02200466b4e62d07bc73').
1555276733: Sending CONNACK to 02200466b4e62d07bc73 (0, 0)
1555276733: Received SUBSCRIBE from 02200466b4e62d07bc73
1555276733:     smart/device/in/02200466b4e62d07bc73 (QoS 0)
1555276733: 02200466b4e62d07bc73 0 smart/device/in/02200466b4e62d07bc73
1555276733: Sending SUBACK to 02200466b4e62d07bc73
1555276763: Received PINGREQ from 02200466b4e62d07bc73
1555276763: Sending PINGRESP to 02200466b4e62d07bc73
1555276793: Received PINGREQ from 02200466b4e62d07bc73
1555276793: Sending PINGRESP to 02200466b4e62d07bc73
1555276823: Received PINGREQ from 02200466b4e62d07bc73
1555276823: Sending PINGRESP to 02200466b4e62d07bc73
1555276853: Received PINGREQ from 02200466b4e62d07bc73
1555276853: Sending PINGRESP to 02200466b4e62d07bc73
1555276883: Received PINGREQ from 02200466b4e62d07bc73
1555276883: Sending PINGRESP to 02200466b4e62d07bc73
1555276913: Received PINGREQ from 02200466b4e62d07bc73
1555276913: Sending PINGRESP to 02200466b4e62d07bc73
1555276943: Received PINGREQ from 02200466b4e62d07bc73
1555276943: Sending PINGRESP to 02200466b4e62d07bc73
1555276973: Received PINGREQ from 02200466b4e62d07bc73
1555276973: Sending PINGRESP to 02200466b4e62d07bc73
1555277003: Received PINGREQ from 02200466b4e62d07bc73
1555277003: Sending PINGRESP to 02200466b4e62d07bc73
1555277033: Received PINGREQ from 02200466b4e62d07bc73
1555277033: Sending PINGRESP to 02200466b4e62d07bc73
1555277063: Received PINGREQ from 02200466b4e62d07bc73
1555277063: Sending PINGRESP to 02200466b4e62d07bc73
1555277093: Received PINGREQ from 02200466b4e62d07bc73
1555277093: Sending PINGRESP to 02200466b4e62d07bc73
1555277123: Received PINGREQ from 02200466b4e62d07bc73
1555277123: Sending PINGRESP to 02200466b4e62d07bc73
1555277153: Received PINGREQ from 02200466b4e62d07bc73
1555277153: Sending PINGRESP to 02200466b4e62d07bc73
1555277183: Received PINGREQ from 02200466b4e62d07bc73
1555277183: Sending PINGRESP to 02200466b4e62d07bc73
1555277213: Received PINGREQ from 02200466b4e62d07bc73
1555277213: Sending PINGRESP to 02200466b4e62d07bc73
1555277243: Received PINGREQ from 02200466b4e62d07bc73
1555277243: Sending PINGRESP to 02200466b4e62d07bc73
1555277273: Received PINGREQ from 02200466b4e62d07bc73
1555277273: Sending PINGRESP to 02200466b4e62d07bc73
1555277303: Received PINGREQ from 02200466b4e62d07bc73
1555277303: Sending PINGRESP to 02200466b4e62d07bc73
1555277333: Received PINGREQ from 02200466b4e62d07bc73
1555277333: Sending PINGRESP to 02200466b4e62d07bc73
1555277363: Received PINGREQ from 02200466b4e62d07bc73
1555277363: Sending PINGRESP to 02200466b4e62d07bc73
1555277393: Received PINGREQ from 02200466b4e62d07bc73
1555277393: Sending PINGRESP to 02200466b4e62d07bc73

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
ragenhecommented, Apr 15, 2019

These steps worked for me when I encountered the same situation. First reset the bulb. And stop any running processes. Note: This process doesn’t connect a separate device to the vtrust-flash.

  1. Turn bulb on, it should be flashing.
  2. Run ./start-flash as directed.
  • Pairing should happen within 10 seconds of power on.
  • Updating should begin within 10 seconds of pairing.
0reactions
kueblccommented, Sep 28, 2019

Closing due to inactivity, feel free to open a new issue if you have any concerns.

For those that missed it, support for HTTPS firmware is in the works #279

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tuya-Convert guide - OTA flashing of smart bulbs and plugs
Tuya -Convert is a very easy method of flashing your esp8266 based smart bulbs with custom firmware, so that you can remove the...
Read more >
Help with flashing tuya light bulbs : r/homeassistant - Reddit
I'm guessing this was wrong as I cannot get back into the bulb. Is there a way to reflash this to the base...
Read more >
Detailed guide on how to flash the new Tuya Beken Chips ...
Here is a detailed guide on how to Open Bekenize/flash the new Tuya chips with OpenBK7231T. In this guide I am using an...
Read more >
Prepare a device with tuya-convert - ESPHome-Devices
You can use tuya-convert to initially flash a Tuya device, without soldering. This is especially useful for smart bulbs and other devices which...
Read more >
Flash Tuya Smartlife Devices - No Soldering - Tuya Convert 2
Updated procedure video here: https://youtu.be/dt5-iZc4_qUWelcome back to flashing your devices without any soldering or opening of devices!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found