Error when Uploading

Sketch uses 358564 bytes (11%) of program storage space. Maximum is 3145728 bytes.
Global variables use 39780 bytes (12%) of dynamic memory, leaving 287900 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\Windy\AppData\Local\Arduino15\packages\arduino\tools\dfu-util\0.11.0-arduino5/dfu-util" --device 0x2341:0x0070 -D "C:\Users\Windy\AppData\Local\arduino\sketches\3625A93DACD7873814F058BE5425459D/sketch_feb6a.ino.bin" -Q
No DFU capable USB device available
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/

Failed uploading: uploading error: exit status 74

Board: Arduino ESP32 CH340 30P
Arduino: 2.3.4 (Windows 8.1)

Hi @dung124. From the output you shared, I can tell that you have Arduino IDE configured for use with the official Arduino Nano ESP32.

However, you describe your board as:

The official Nano ESP32 board does not have a CH340 USB chip, so this tells me that you have some board other than the Nano ESP32. It is expected that the upload will fail when you have Arduino IDE configured for use with the Nano ESP32, but are instead using a different board.

The solution will be to select the appropriate board from Arduino IDE's Tools > Board menu. If you would like advice about which board to select from that menu, the forum helpers would need to know more about the board you are using. If you provide a link to the product page from which you purchased the board in a reply here, we should be able to glean the necessary information from it.

To my knowledge the CH340 gives a serial port, not a DFU capable device.

Please provide a link to the board that you have and the tell us which exact board you're compiling for.

// Edit
ptillisch did beat me to it.

ESP32 Dev Board CH340 - USB-C - Micro Robotics
this is the link that have informations of my board(i think) i cant find any web site that have suffix 30P
also this is the site that i buy it: https://shopee.vn/Kit-ESP32-CH340-30P-Wifi-Bluetooth-cổng-Type-C-Kit-ESP32-CP2102-30P-Wifi-cổng-Micro-i.1033330712.24102681490)

No, that board uses a different serial-to-usb adapter.

You need to install two things (if not done already)

  1. The ESP32 board package. The additional board URL under resources → installing ESP32 in Arduino IDE in the Micro Robotics link is possibly not up-to-date. Use https://espressif.github.io/arduino-esp32/package_esp32_index.json
  2. You need to install the CH340 drivers (based on the name of the product that you bought).

That site asks me to login.

Oh thank you, i upload it successfully but it still have a error:
Sketch uses 301300 bytes (22%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20160 bytes (6%) of dynamic memory, leaving 307520 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\Windy\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.9.dev3/esptool.exe" --chip esp32 --port "COM3" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x1000 "C:\Users\Windy\AppData\Local\arduino\sketches\3625A93DACD7873814F058BE5425459D/sketch_feb6a.ino.bootloader.bin" 0x8000 "C:\Users\Windy\AppData\Local\arduino\sketches\3625A93DACD7873814F058BE5425459D/sketch_feb6a.ino.partitions.bin" 0xe000 "C:\Users\Windy\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\Windy\AppData\Local\arduino\sketches\3625A93DACD7873814F058BE5425459D/sketch_feb6a.ino.bin"
esptool.py v4.8.1
Serial port COM3
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 2

You did not upload successfully because you have an error. I can't help you with that because I don't know anything about ESP32 based boards.

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