[Nano ESP32] Board repeatedly connects/disconnects through USB; can't load new firmware

Nano ESP32, Arduino IDE 2.3.2, Windows 10

Hi! I've been loading different programs onto the board the last few weeks, but yesterday I flashed a new program onto the board and suddenly it started repeatedly disconnecting and reconnecting every few seconds to my laptop. I can't even load a blank firmware onto the board to reset it because it won't stay connected long enough.

Here's what I've tried so far:

  1. Enter bootloader mode by double-tapping the RST button. When I do this, the COM port disappears from the Arduino IDE and Device Manager (Windows). Without the COM port, I can't upload new code. I've tried restarting the IDE, plugging, unplugging--no effect.

  2. Enter firmware download mode by shorting GND and B1 pins and simultaneously pressing the RST button. When I do this, the IDE no longer recognizes the board as a Nano ESP32 and now thinks it's a LOLIN S3 ("SN: (null)" in the Board Info screen) and changes the COM port (in the most recent case, from COM10 to COM9). When I try to upload the new code through this port, I get "No DFU capable USB device available; Failed uploading: uploading error: exit status 74".

Any ideas? It's a pain that a slight change in my code would cause such a haywire reaction.

1 Like

Don't worry, it's easy to recover via the firmware download guide you linked. But make sure to follow it carefully! In particular, make sure to select Esptool under Tools > Programmer in the IDE menus, or the IDE will try a normal upload even if you ask for an Upload with Programmer.

1 Like

It worked perfectly, thank you!

1 Like

Heya everyone. Just wanted to stop by and add, if anybody's just got this error and is working on the Cloud version, what ended up working for me is going to the thingProperties.h script and checking if you have any undefined variables that are possibly being used in the setup() function beforehand. Hope it helps!