Mac OS Big Sur: Failed to connect to ESP32: Timed out waiting for packet header

Hi folks,

I have a custom PCB with an ESP32-WROOM-32E board on it, and a UART port as well. It has the standard two-transistor schematics for automatically entering into programming mode via the UART port using the RTS and DTR lines. I connect it to my computer using an USB-to-Serial FTDI panel. I had a Macbook air before with standard USB A port and OS X Catalina. On that platform everything was working fine. Now I switched to a Macbook Pro, that has only USB C ports and it has OS X Big Sur. I am using a USB C - USB A adapter with the same USB A cable and FTDI converter. Serial communication seems to work, on the Arduino Serial monitor I can read what my board sends via the serial port. But I cannot program it. I figured out that it is not able to enter programming mode automatically, so if during programming I connect GPIO0 to GND then I'm able to upload the new code. However this was working fine before, so I'm guessing this might be either because of the USB C connector (although I doubt that, because I think that USB A and C are the same except for the sizes), or the other possible cause might be the FTDI driver. Or rather the lack of it. So previously I was able to install the official driver, but in Big Sur the extension is blocked and Apple won't allow it to run at all. But it does have a built in driver for it, that's why I can read and write data over the Serial port, but I suspect that it might not handle the RTS or DTR line.
Do any of you have any experience with that?
Thanks!

I have some news regarding my issue. I grabbed my scope and it seems the DTR and RTS lines are working (or at least doing something). I also checked the GPIO0 pin and it gets pulled down from time to time, so it seems like esptool is trying to reset it and put it into programming mode.


However it still doesn't succeed for some reason, maybe it's something with timing, or I don't really know anymore. So this is the command that I use at the moment (just for the sake of connecting to the chip):

esptool.py -p /dev/cu.usbserial-A50285BI read_mac

And this is what I get:

esptool.py v3.0
Serial port /dev/cu.usbserial-A50285BI
Connecting........_____....._____....._____....._____....._____....._____....._____

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

But if I short GPIO0 to GND, it all starts to work:

esptool.py v3.0
Serial port /dev/cu.usbserial-A50285BI
Connecting........_____.....__
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 7c:9e:bd:d7:27:9c
Uploading stub...
Running stub...
Stub running...
MAC: xxxxxxxxxxxxx (redacted)
Hard resetting via RTS pin...

Unfortunately I have a scope with only one channel, so I'm not able to monitor the reset pin and GPIO0 simultaneously .

I'm also looking for the answer as facing the similar issue, it was working fine until my Mac upgraded to Big Sur 11.1

I ran into the same problem and pulled GPIO0 to ground through a 2.2k resistor (better not short it just in case something puts out a signal on it). That made the serial communication work. However, my program still isn't accepted by the board. Or at least it's not running. Not even a simple LED blink.

Ideas?

Oh, my bad. I had to disconnect it from ground once I'm done uploading. Now it works like a charm!

Similar experience. Using same Arduino hardware as I did before (Sparkfun ESP32Thing), same IDE version 1.8.13, same USB cable, same Mac hardware (2014 MacBook Air) but after upgrading to MacOs 11.4 Big Sur, downloads became unreliable (more failures than successes) with same symptoms as zolcsi. Tried reducing the Upload Speed to 115200: still unreliable. But now I connect GPIO0 to ground between "Linking everything together..." and "Writing at 0x..." and it then works like before.

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