ESP8266-01 with CH340G adaptor not flashing on Arduino IDE

Hey!

I'm getting the following error while trying to flash anything on my esp01, even the templates.

Sketch uses 257016 bytes (26%) of program storage space. Maximum is 958448 bytes.
Global variables use 27612 bytes (33%) of dynamic memory, leaving 54308 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.7
Serial port COM4
Connecting........_____....._____....._____....._____....._____....._____....._____
Traceback (most recent call last):
  File "C:\Users\Eduardo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0/tools/upload.py", line 25, in <module>
    esptool.main(fakeargs)
  File "C:/Users/Eduardo/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.0/tools/esptool\esptool.py", line 2841, in main
    esp.connect(args.before)
  File "C:/Users/Eduardo/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.0/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
Failed uploading: uploading error: exit status 1

Does anyone know what might be causing? It is a brand new esp01s with a CH340G usb adaptor, and never had anything load into it.

Thank you very much!

Hi @matetorossi.

Is this one of the adapters that is designed so you can plug an ESP-01 module in directly? I am referring to something like this:

Or is it a general purpose USB to serial bridge adapter module where you must use some jumper wires to make the electrical connections between the adapter and the ESP-01?

Thank you ptillisch for participating. It is exactly like the one you showed in the picture.

I don't have any experience with these adapters, but I see some notes that they don't automatically put the ESP8266 into boot mode as is done by the circuits on the common complete ESP8266 boards. This means you must manually manipulate the GPIO0 pin in order to put it in boot mode before starting the upload.

There is some information about that here:

Did you connect the GPIO pin to GND before plugging the adapter into your computer in preparation for the upload?

Thank you. No, I did not. I'll try to do that right now and let you know the results here asap.

It worked, thank you very much, I was looking for this the last 2 days.

You are welcome. I'm glad it is working now.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.