A fatal error occurred: Failed to connect to ESP32: Invalid head of packet 0xC3

Started by atlantisguru, June 12, 2020, 08:43:34 pm

Previous topic - Next topic

atlantisguru

I would like to upload sketch to ESP32-EVB REV.F, but constantly get "failed to connect..." error message.

1 of my 3 EVBs works great, but the others are maybe faulty.

When the Arduino IDE tries to connect to the boards:
- the ethernet yellow led flashing when the "......." and "-------" symbols change.
- somtimes the 2 charge leds light up for very short moments randomly
- the upload succsessful cca. 1 out of 50 tries

I tried these methods to solve the problem:

1. https://randomnerdtutorials.com/solved-failed-to-connect-to-esp32-timed-out-waiting-for-packet-header/
2. Tried to hold and release the RST and BUT1 in different variations.
3. Tried on 2 differrent PCs. (Windows 10)
4. Tried with 3 different USB cables.
5. Tried to reinstall Arduino IDE and/or driver. (Arduino IDE: 1.8.12)
6. Tried diferrent USB ports.

I bought the working EVB on March.
My company bought the other 2 EVBs in May.

What should i do next?

LubOlimex

This had been reported a couple of times and unfortunately we've been unable to replicate it here. There are too many variables and the board is only one of the variables. Timings caused by operating system, drivers, uploader software, USB port, cables and so on. Such reports exist for other boards too and I am not sure if there is an issue with our hardware or it is general issue with these timings, uploaders and so on.

What I know for sure is that we test each ESP32-EVB empirically here, and each board had been programmed successfully via the USB at least two times. Also I've personally tested a couple of boards that got returned from a customer with similar timeout complaints and these programmed fine on two Windows 10 machines here. This is a big problem since if we can't reproduce the issue here, we can't solve it.

I'd like to investigate the issue a bit further, so there are couple of ideas I have and if you have some time to debug the issue it would help us solve this problem once and for all. Being able to reproduce the issue at your side might lead us to success. The ideas I had are:

1. Try another uploader software! For example, if you used ESP-IDF, try Arduino IDE, or maybe espressif GUI tool.

2. Try to power the board externally using 5V power supply and the on-board power jack, or vice versa - try without it if you always powered the board with 5V external power supply.

3. If you have some soldering experience or access to someone with soldering experience do the following:

3.1 Replace R24 with 10k resistor. Desolder the original resistor and place 0603 size 10k resistor (5% or 10% should be alright). R24 can be found here:



3.2 Test if upload works. If the problem remains try the next step

3.3 Add a 10uF capactior >=10V to ground to the ESP_EN, the easiest place to do it would be at EXT1 header - pin #33 (ESP_EN) and pin #34 (GND). I used PTH capacitor 10uF 50V for the picture but anything for 10V or more is also alright. Again percentage is not that important even 10% is alright.



Let me know how these tests go.
Technical support and documentation manager at Olimex

atlantisguru

Thank you for the suggestions, and sorry for the delay.

I tried the external power but didn't work.

Tried the 10uF itself, but as i see, it needs additional steps before. Currently i'm waiting for some parts and tools for it.

Until the parts will arrive i give a try to another IDE.

atlantisguru

Changing the R24 to 10k and adding a 10uF(50V) capacitor to the ESP_EN/GND pins works a 100%.

(Changing the resistor itself didn't work.)

Thanks for the help!

LubOlimex

Thank you for the feedback, would pass it to the developers for consideration to be changed in future revisions. Hope this thread helps other people with similar issue.
Technical support and documentation manager at Olimex