im trying to flash a esp8285 using a ttl (https://www.amazon.co.uk/gp/product/B07BBPX8B8/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1)
i keep getting A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
i have tried wiring i00 to gnd of the ttl, i have tried disconnecting the i00 line from gnd a min after i have connected the usb, the ttl programmer is connected to the raspberry pi 3b+ i am running home assistant on. and am using the home assistant image from the offical download,
INFO Reading configuration /config/esphome/backlight.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running: platformio run -d /config/esphome/backlight
Processing backlight (board: esp8285; framework: arduino; platform: [email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES:
- framework-arduinoespressif8266 2.20502.0 (2.5.2)
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.20600.0 (2.6.0)
- toolchain-xtensa 1.40802.2 (4.8.2)
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.2
| |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
| |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.6
| |-- <ESPAsyncTCP-esphome> 1.2.2
| | |-- <ESP8266WiFi> 1.0
| |-- <Hash> 1.0
| |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
| |-- <ESP8266WiFi> 1.0
Compiling /data/backlight/.pioenvs/backlight/src/main.cpp.o
Linking /data/backlight/.pioenvs/backlight/firmware.elf
Retrieving maximum program size /data/backlight/.pioenvs/backlight/firmware.elf
Checking size /data/backlight/.pioenvs/backlight/firmware.elf
Building /data/backlight/.pioenvs/backlight/firmware.bin
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [===== ] 45.1% (used 36908 bytes from 81920 bytes)
Flash: [==== ] 38.6% (used 394764 bytes from 1023984 bytes)
Creating BIN file "/data/backlight/.pioenvs/backlight/firmware.bin" using "/data/backlight/.pioenvs/backlight/firmware.elf"
========================= [SUCCESS] Took 16.67 seconds =========================
INFO Successfully compiled program.
INFO Running: esptool.py --before default_reset --after hard_reset --baud 460800 --chip esp8266 --port /dev/ttyUSB0 write_flash 0x0 /data/backlight/.pioenvs/backlight/firmware.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
INFO Upload with baud rate 460800 failed. Trying again with baud rate 115200.
INFO Running: esptool.py --before default_reset --after hard_reset --baud 115200 --chip esp8266 --port /dev/ttyUSB0 write_flash 0x0 /data/backlight/.pioenvs/backlight/firmware.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
esphome:
name: backlight
platform: ESP8266
board: esp8285
wifi:
ssid: "...."
password: "......."
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Backlight Fallback Hotspot"
password: "OhvbXqy2p66h"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "..."
ota:
password: "....."
after plugging the usb in i get the rx and tx leds flash after a few seconds, i read that it means the ttl is working okay, while the uploader is trying to upload only the tx led flashes before it fails,
the fail message i get is program failed with code 2