No DFU capable USB device available Failed uploading: uploading error: exit status 74

Getting this msg. on 3 different ESP-32s. Changed cable, same result. Using a box running Win11, no good. Also tried on my server running Server 2019, still no good. I had no problems about 4-5 months ago but I'm not sure what if anything changed on my computers. Please help!

Using Arduino IDE 2.3.8

Hi @bellm1965. I'm going to ask you to provide the full verbose output from an upload attempt.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: ☑ compile in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a reply here on this forum topic by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to publish the post.
Sketch uses 286157 bytes (9%) of program storage space. Maximum is 3145728 bytes.
Global variables use 30552 bytes (9%) of dynamic memory, leaving 297128 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\dfu-util\0.11.0-arduino5/dfu-util" --device 0x2341:0x0070 -D "C:\Users\Me\AppData\Local\arduino\sketches\9626D14EF0E26C1512D41D34FB49569E/Blink.ino.bin" -Q
dfu-util 0.11-arduino4

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

No DFU capable USB device available
Failed uploading: uploading error: exit status 74

This has me really confused. My UNOs and NANOs work just fine, it's just the ESP32s that do this.

Please add a reply here on this forum topic to tell us which Arduino board you are using. From the output you shared, I can see you have Arduino IDE configured for use with the Arduino Nano ESP32, but that doesn't necessarily mean that you actually have a Nano ESP32 board. One possible cause of the error is not having the correct configuration of Arduino board for the hardware you are using, so it is important that we know which specific hardware you have.

Please be as specific as possible, as some Arduino boards with similar names have significant differences and the forum helpers can only provide effective assistance if we are aware of which one is being used.

If you aren't sure how to describe which board you are using, you can provide the link to the online product listing you bought the board from and we'll proceed based on the information found there.

Here is the link to the latest one I purchased:

https://www.aliexpress.us/item/3256805767190776.html?spm=a2g0o.order_list.order_list_main.35.2c201802lvAWYm&gatewayAdapt=glo2usa

I found the link to some of the other ones I bought earlier. These used to work about 4-5 months ago but when I took them out of a drawer to play with them a couple of weeks ago, that's when the problem started.

OK, great. As I said in my previous reply, you have Arduino IDE configured for use with the Nano ESP32 board. The board you are using is not a Nano ESP32. It is true that the 3rd party board you are using has an ESP32 microcontroller, but there are actually very significant differences between the hardware of the Nano ESP32 board and the board you are using, and those differences makes the Nano ESP32 configuration not suitable for use with your board.

Open your sketch in Arduino IDE, select Tools > Board > esp32 > ESP32 Dev Module from the Arduino IDE menus and then try uploading the sketch again, just as you did before when you encountered the error. Hopefully this time everything will work as expected.

Note that the submenu you are looking for is Tools > Board > esp32, not Tools > Board > Arduino ESP32 Boards. If you don't find an esp32 submenu under Arduino IDE's Tools > Board menu, just let us know and we'll provide instructions you can follow to install support in Arduino IDE for the 3rd party ESP32-based boards.

Followed your instructions and rcvd. this error:

C:\Users\Me\AppData\Local\Temp\.arduinoIDE-unsaved2026316-26744-hrsfxb.3y6j\Blink\Blink.ino: In function 'void setup()':
C:\Users\Me\AppData\Local\Temp\.arduinoIDE-unsaved2026316-26744-hrsfxb.3y6j\Blink\Blink.ino:28:11: error: 'LED_BUILTIN' was not declared in this scope
   28 |   pinMode(LED_BUILTIN, OUTPUT);
      |           ^~~~~~~~~~~
C:\Users\Me\AppData\Local\Temp\.arduinoIDE-unsaved2026316-26744-hrsfxb.3y6j\Blink\Blink.ino: In function 'void loop()':
C:\Users\Me\AppData\Local\Temp\.arduinoIDE-unsaved2026316-26744-hrsfxb.3y6j\Blink\Blink.ino:33:16: error: 'LED_BUILTIN' was not declared in this scope
   33 |   digitalWrite(LED_BUILTIN, HIGH);  // change state of the LED by setting the pin to the HIGH voltage level
      |                ^~~~~~~~~~~
exit status 1

Compilation error: 'LED_BUILTIN' was not declared in this scope

This was using the sketch in the Arduino IDE: File > Examples > 01.Basics > Blink

I also tried a different "Blink" sketch that used a LED and resistor. This one used to work on my boards but I am now getting these msgs.

Sketch uses 269672 bytes (20%) of program storage space. Maximum is 1310720 bytes.
Global variables use 22060 bytes (6%) of dynamic memory, leaving 305620 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\Me\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\5.1.0/esptool.exe" --chip esp32 --port "COM12" --baud 921600  --before default-reset --after hard-reset write-flash  -z --flash-mode keep --flash-freq keep --flash-size keep 0x1000 "C:\Users\Me\AppData\Local\arduino\sketches\FDBAC61249F9746C077EADB0E706548B/Blink.ino.bootloader.bin" 0x8000 "C:\Users\Me\AppData\Local\arduino\sketches\FDBAC61249F9746C077EADB0E706548B/Blink.ino.partitions.bin" 0xe000 "C:\Users\Me\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.7/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\Me\AppData\Local\arduino\sketches\FDBAC61249F9746C077EADB0E706548B/Blink.ino.bin" 
esptool v5.1.0
Serial port COM12:
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

Failed uploading: uploading error: exit status 2

This is expected. The purpose of LED_BUILTIN is to provide the pin number of the board's on-board LED. The "ESP32 Dev Module" board definition you now have selected is a generic definition that is intended to allow the use of any board that has an ESP32 microcontroller. Those boards may not have an on-board LED, and even if they do there is no way to know which pin the board manufacturer chose to connect the LED to.

So you can not use LED_BUILTIN in your sketch code when using the "ESP32 Dev Module" board definition. You must instead use the number of the pin that has a connected LED.

Please try this:

  1. Select Sketch > Upload from the Arduino IDE menus.
  2. Watch the black output panel at the bottom of the Arduino IDE window until you see this text printed:
    Connecting...
    
  3. Press and hold the button that is marked "BOOT" or "IO0" on your ESP32 board.
  4. Wait about one second.
  5. Release the button.

The upload should now finish successfully.

That worked for the one I got from Aliexpress. I guess I need to press the boot button every time I load a sketch. I will try the ones from Amazon later. On another note, in the Arduino IDE I couldn't find anything for a ESP8266 board. Do I use ESP 32 or is there something I need to download. I couldn't find anything in the built-in library.

Oh by the way. Thanks for all the help!!!

Great news!

These boards typically have a special circuit that automatically puts the ESP32 into "download mode", so it is somewhat unexpected that it was necessary to do this. However, AliExpress stuff is always a gamble, so I'm not too surprised if the board you got is poorly designed. I had one cheapo board like this where I sometimes had to press the button to accomplish an upload, but other times it would automatically trigger the "download mode". So I think the circuit can be a bit unreliable depending on how it is designed. It is timing sensitive, so the environment produced by your specific PC might also be a factor.

Support for ESP8266-based boards is provided by the 3rd party "esp8266" boards platform. By default, the Arduino IDE Boards Manager only lists the official boards platforms, and select platforms from business partners of the Arduino company. For installation of other platforms, it is necessary to perform one additional step, which is to add a special URL to the "Additional Boards Manager URLs" field in the Arduino IDE preferences. You can find instructions for doing that here:

https://arduino-esp8266.readthedocs.io/en/3.1.2/installing.html#instructions

That worked for the ESP8266. You are truly THE Arduino Wizard. It is now 0538, I'm finally tired enough to go to bed. Again, thanks for everything and I'll work on the rest later.

After we fixed the 2 previous problems a new one showed up. I have a Nano

[https://www.aliexpress.us/item/3256805941736729.html?spm=a2g0o.order_list.order_list_main.99.43751802avvtFF&gatewayAdapt=glo2usa]

running a LED strip as a VU Meter in front of my speakers in the garage. It has been running with no problems for about a month except when I temporarily plug in another board for whatever. It used to run off of COM Port 9 and had no problems. Now the only option is COM Port 3 and I get the following msg. in the output. There is no error msg. just the following in the output:

Sketch uses 4134 bytes (13%) of program storage space. Maximum is 30720 bytes.
Global variables use 507 bytes (24%) of dynamic memory, leaving 1541 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/bin/avrdude" "-CC:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM3" -b115200 -D "-Uflash:w:C:\Users\Me\AppData\Local\arduino\sketches\9825F2DE187E300DE002EF7858AFB4E0/Sound3.ino.hex:i"
Avrdude version 8.0-arduino.1
Copyright see avrdude/AUTHORS at main · avrdudes/avrdude · GitHub

System wide configuration file is C:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1\etc\avrdude.conf

Using port : COM3
Using programmer : arduino
Setting baud rate : 115200
AVR part : ATmega328P
Programming modes : SPM, ISP, HVPP, debugWIRE
Programmer type : Arduino
Description : Arduino bootloader using STK500 v1 protocol
HW Version : 3
FW Version : 4.4

AVR device initialized and ready to accept instructions
Device signature = 1E 95 0F (ATmega328P, ATA6614Q, LGT8F328P)
Reading 4134 bytes for flash from input file Sound3.ino.hex
in 1 section [0, 0x1025]: 33 pages and 90 pad bytes
Writing 4134 bytes to flash
Writing | ################################################## | 100% 0.53s
4134 bytes of flash written
Avrdude done. Thank you.

Sorry for the rambling but I've been working on this for about 5 hours with no luck.

Thanks

Holy crap! I feel like an idiot. One of the dogs must have gotten behind the work bench. The power cord wasn't all the way plugged into the brick and I couldn't see it until I moved everything out of the way. It's working now, I just got a huge mess to straighten up.