0
votes

I have the ESP8266 and have already tried the versions 2.6.2, 2.7.3, and 2.7.4. Nothing worked and all got was the same error:

Serial port COM3
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
  File "C:\Users\mauru\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.2/tools/upload.py", line 65, in 
    esptool.main(cmdline)
  File "C:/Users/mauru/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.2/tools/esptool\esptool.py", line 2890, in main
    esp.connect(args.before)
  File "C:/Users/mauru/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.2/tools/esptool\esptool.py", line 483, in connect
    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
Ungültige Bibliothek C:\Users\mauru\Documents\Arduino\libraries\hardware in keine Header-Dateien (.h) in C:\Users\mauru\Documents\Arduino\libraries\hardware gefunden gefunden

I already tried reinstalling the versions.

9
Just sayin', next time you should set the Arduino IDE's language to english before making screenshots or copying error messages, because I guess it doesn't help someone who only speaks english to know that a Bibliothek is ungültig. :P (I'm from Germany too)user14699696

9 Answers

1
votes

I had the same problem with nodeMCU V3. Holding the Flash button and press RST once solves the problem.

0
votes

I think I know what's your problem, I had a very similar one: You have to keep pressing one of the two ESP8266 buttons (it's called boot I think (I was wrong, it's called flash)) next to the USB plug while uploading (I wrote this before I realised that there are no buttons and no USB plug). That's a problem that is mostly there on cheap chinese devices I think.

Edit: Now that I know the exact board (I just assumed it was a NodeMCU for some reason) it turned out that that board doesn't have such a flash button, but that doesn't mean that you can't make one yourself:

Pinout of the board

(image from this site)

GPIO0, the pin that is grounded by the flash button, is accessable, so it should be possible to just ground it.

0
votes

enter image description herejust for that add a pushbutton for flash code

0
votes

Interesting observation I have seen is that it will give the above error when the 5v pin is being used for a sensor or some other purpose. Disconnect the 5v pin from any external device / sensor, and amazingly it will flash.

0
votes

Usually this problem is in the form of port problems or connection problems.

Then make sure you make the connections as described above. Finally, be sure to reconnect the GPIO0 section to Ground (GND) when assigning code. (extra connect) Otherwise, the ESP will act as flash and will not allow you to code.

And you should update ESP boards to 3.0.0

0
votes

Your RX/TX pins are connected to something, remove them and reconnect after upload

0
votes

try changing the uploading speed and baud rate.... mine was 3000000 and it showed the same error, then i changed it to 152000 then it worked!!!

0
votes

If you enter ssid or password using space for example

const char* ssid = "Realme 5 pro"

Then remove the space or change the name to something else for example

const char* ssid = "Realme"

It's worked for me.

-1
votes

it solved when i connected to another port of my laptop