This weird error is caused by?

I researched a lot of pages… and I didn’t find the answer :C

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header

why? (ubuntu 20.04, vscode) same problem on arduino ide…

Does your board have a button that you have to press to get it into uploading mode? Apparently, and I’m no expert, some esp8266 boards need a button to be pressed to initiate uploads.

Cheers,
Norm.

I tried to push button when uploading, did not work… (flash button)

Download and open a serial monitor program like hterm at 74880 baud on the USB-serial adapter of your board. Hold down the FLASH button, press the RESET / EN button once (while FLASH is being held down), then release FLASH. What’s the serial output?

I can’t set the baud rate to 74880, https://i.imgur.com/TKaDGk6.png

Well, that’s bad… Reminds me of "Timed out waiting for packet header" on kernel 5.13.10 (only for CH340 + ESP8266) [fixed in kernels 5.14 & 5.13.14] (ESPTOOL-291) · Issue #653 · espressif/esptool · GitHub. What’s your kernel version? (uname -r)

5.13.0-28-generic

It’s weird, beacuse that stopped working for no reason.

What’s the USB-to-serial converter chip on the board? A CH340 or a CP2102?

When you do sudo apt update && sudo apt dist-upgrade, are there updates to the Linux kernel available?

It’s CH340 and no kernel updates are available

Does it work on other computers? (Windows or Linux with a different kernel)

I have no way to check it (everything is same on other esp8266 board, same nodemcu)

Please install esptool globally (Esptool.py Documentation - ESP32 - — esptool.py latest documentation) and run esptool -p PORT flash_id where PORT is your serial port, e.g., /dev/ttyUSB0. If it does not work, open an issue at GitHub - espressif/esptool: Espressif SoC serial bootloader utility, as this is beyond PlatformIO then.

For what it’s worth I’ve had similar issues on Windows when another process (i.e. a second instance of the development tool or a terminal in another console) had control of the serial port. In those cases the ‘failure to connect’ was because the port was already in use.

Resolved :slight_smile: Failed to connect to Espressif device: No serial data received (ESPTOOL-401) · Issue #719 · espressif/esptool · GitHub