brandond / esphome-tuya_pir

ESPHome support for cheap WiFi PIR sensors
66 stars 21 forks source link

Unable to flash the firmware #6

Closed newnew01 closed 4 years ago

newnew01 commented 4 years ago

The device is in boot mode but I am not able to flash.

This is what I got. What should I do?

INFO Running:  esptool.py --before default_reset --after hard_reset --chip esp8266 --port COM8 write_flash 0x0 '.build\.pioenvs\pir\firmware.bin'
esptool.py v2.7
Serial port COM8
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
newnew01 commented 4 years ago

Ok I found the solution 1.insert the battery 2.if you get the same problem as me Hold the button for 6 second to change mode(if not work ,try this step again to change mode) 3.remove the battery 4.on the device, connect gpio0 to gnd then insert battery the the led will flash for a second then gone(already in boot mode) 5.remove the wire that connect gnd and gpio0 in step4 ,do not remove the battery 6.connect tx rx and gnd with your usb to ttl then flash the firmware 7.after complete flashing ,remove everything 8.insert the battery and wait for 5 seconds 9.hold the button until the led flash continuously the release the button 10.wait untill the led gone 11.the device is ready

brandond commented 4 years ago

Yeah they can be REAL fussy. Glad you got it working!

ollieatkinson commented 4 years ago

Thank you for this @newnew01 - you helped me get this working :)