when I connect and disconnect my esp32 from usb, it comes back and connects to COM13 (which I have chosen in device mgr). Then I click upload and it says "No DFU capable USB device available".
Then, when I double press RESET button on this board it goes into this slowly flashing mode, and it then connects to first available COM port and upload works just fine!
What can I do to make this board work without double pressing reset button?
What you're observing is your PC enumerating the USB ports. When you disconnect a device, the port is released and made available for other devices. Upon reconnecting or connecting a new device, the enumeration process starts at zero and increments upward as additional ports are assigned.
I've seen this thread and I feel it has something to do with that. Also I've read somewhere about micropython/C switching and I feel it has something to do with it.
Why I'm able to upload after double tapping RST button only?
Can someone explain to me what double tap does at all?
One question though, which package are you using in the Boards Manager?
Arduino ESP32 Boards (from Arduino)
or esp32 (from Espressif)?
Also, have you tried to follow the recovery steps in the thread you linked (which are described in more detail in this support article)?
If not, please do and let us know your results!
So, I went through recovery steps with zero problems - all as described.
Unfortunately it didn't change nano behavior. Still can't upload sketch with "normal" button, and it doesn't connect to serial monitor after restart. But on the bottom bar on the right it says "Arduino Nano ESP32 on COM13 [connected]"
Upload fails with:
No DFU capable USB device available
Failed uploading: uploading error: exit status 74
There is no problem in having both installed, but it makes it more difficult to actually be sure about what you are using, since both define the same board.
Can you try uninstalling the esp32 package, and re-doing the bootloader update with a Blink example and the latest Arduino ESP32 Boards package?
I have a few additional questions for you:
let me know the core version you are using;
does the issue happen even with the Blink example?
does double tapping until you have a fading green light fix the issue?
It worked! I'm pretty sure I used both of them in testing previously, so not sure what could have happened now?
It stopped going into COM13 and I can upload any sketch with just an arrow.
There is however something weird: After uploading sketch I'm working on right now it has 3 leds on. Green led by usb is on fully and 2 other leds are on, but just slightly. The one near reset button looks like it has 2 colors at the same time. Weird!
it was working more or less normal after double tapping and uploading (with fading green led).
It is ok now, but I'd like to know what was the problem? Board was clearly having episode of schizophrenia! Sometimes connecting to COM13 and acting weird, and sometime connecting to COM6 and acting normal but broken! Please tell me what you think happened?
I'm not really a board psychologist but I would guess a combination of uploads switching among the two cores (Arduino and Espressif) may have caused the issue. Reloading the bootloader restores stock programming and thus should recover any Nano ESP32 (except for hardware damages).
The current LED status is also peculiar - that should happen only in the hardware bootloader, during the recovery procedure you just performed, and not while running a sketch.
If you are using libraries in your sketch, please read this guide on Nano ESP32 pin numbering. For maximum compatibility you should set "By GPIO number (legacy)" in the "Tools" > "Pin Numbering" menu of the IDE, and use labels instead of numbers (e.g. digitalWrite(D3, HIGH) instead of digitalWrite(3, HIGH)) whenever you refer to pins in your sketch.