Page 1 of 1

Can connect via serial monitor app but not Arduino or ESP-IDF

Posted: Fri Apr 08, 2022 6:42 pm
by DanielPLongo
Using the ESP32-WROOM-32UE
I have been successfully programming the chips using a custom circuit with a MCP2221 as the USB to UART serial converter for almost a year, but the interface has stopped working. I can still use the circuit and communicate with the ESP32 through CoolTerm or TeraTerm serial monitors. I can get the chip into programming mode and verify it in the serial window:
"rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download"

The Arduino IDE reports:
"A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x00)"

I know that the Arduino IDE is opening the port, because if I try to use CoolTerm while it is "Connecting.....", I get a message saying that the port is busy.


I have tried changing port assignments, the flash speeds, rebooting both the IDE and my computer, etc. I can connect to an actual Development Module and program it fine, so I know the toolchain is okay. I'm stumped.

Thanks in advance for any thoughts!

Re: Can connect via serial monitor app but not Arduino

Posted: Sat Apr 09, 2022 10:18 am
by rpiloverbd
Looks like this guy faced the same problem and could solve it: https://forum.sparkfun.com/viewtopic.php?f=182&t=56445

Re: Can connect via serial monitor app but not Arduino

Posted: Mon Apr 11, 2022 8:54 pm
by DanielPLongo
ESP32-WROOM-32UE
Thank you for the reply, but that link is not pertinent to my situation. To frame it more succinctly, I am not using a development board. The UART channel is operative and functionally the chip reports that it is "waiting for download" in CoolTerm serial monitor, but Arduino is not seeing it any longer, nor can I connect to the ESP32 via ESP-IDF. The chip is clearly able to communicate via the terminal, so why can't ESP-IDF? I have been using this same setup for a year and cannot determine what has broken. There is no further information with verbose settings on in Arduino and the CMD window in ESP-IDF only says "A fatal error occurred: Failed to connect to ESP32: No serial data received.". Any direction on how to get more insight into the causes of this error would be helpful. Thanks in advance!

Re: Can connect via serial monitor app but not Arduino or ESP-IDF

Posted: Tue Apr 12, 2022 6:05 pm
by DanielPLongo
To be more succinct, I know there is serial communication, because I can see the ESP32-WROOM-32UE report in the CoolTerm serial monitor as well as reporting "waiting for download". I have been using this same build for the last year. Only a couple of days ago did the Arduino IDE stop being able to communicate. ESP-IDF through the CMD window cannot connect either.

Re: Can connect via serial monitor app but not Arduino or ESP-IDF

Posted: Wed Apr 13, 2022 2:48 am
by ESP_Sprite
Could you post what esp-idf spits out when you try to program the device?