I don't know about macbook. On Windows I start a first Arduino IDE and plug in the first Arduino and remember the assigned port. Then I open a second IDE, connect the next Arduino and again remember the assigned port. A port may change whenever an Arduino is plugged off and in again.
Hi @angel1. Unlike most Arduino boards, the upload to the Nano ESP32 board is not done via a serial port, but rather via the "DFU" (device firmware update) mechanism. The target device is identified using its USB VID/PID pair rather than serial port.
This might be a bit confusing since we can select a serial port of the board from the menus in Arduino IDE and usually that port is used for the upload. But with the Nano ESP32, the port selection is only used to configure Serial Monitor.
All Nano ESP32 boards have the same USB VID/PID pair, so the upload tool doesn't have any way of knowing which board you are targeting if you attempt an upload with multiple Nano ESP32 boards connected to your computer via the USB cable. As mentioned in the error message, the dfu-util tool used under the hood by Arduino IDE to perform the upload does have the capability for you to indicate the specific target by also providing its unique serial number, but unfortunately the Arduino ESP32 boards platform does not currently pass that information to the upload tool so you would only be able to use that capability when working with dfu-util directly from the command line.
The available workaround for Arduino IDE users is to disconnect the USB cables of all Nano ESP32 boards from your computer other than the one you are targeting before starting an upload.
Ah I see, thanks for the detailed answer. I hope that at some point we will be able to add flags to the upload command to specify a serial port, in the meantime it's not a big deal to unplug the none targeted arduinos.
You are welcome. I'm glad if I was able to be of assistance.
FYI, it is not a serial port that you would specify, but instead a serial number (despite the presence of "serial" in both, they are very different things). In case you are interested in seeing what I'm talking about, select the serial port of an Nano ESP32 board in Arduino IDE and then select Tools > Get Board Info from the Arduino IDE menus. You will see the serial number of the board in the "SN" field of the "Board Info" dialog that opens.
Hello I've encountered a similar problem with using multiple minima's. Is there a way to pass the serial number to the Arduino CLI? And if so, do you, or anyone in the community have an example snippet?
Yes, as long as you are using a recent version of Arduino IDE 2.x. I can provide detailed instructions for doing that, but first I need to collect some information for you so that I can tailor the instructions to your system. Please do this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to Show verbose output during: ☑ compile in the "Preferences" dialog.
Check the box next to Show verbose output during: ☐ upload.
Click the "OK" button.
The "Preferences" dialog will close.
Attempt an upload, as you did before.
Wait for the upload to finish (it doesn't matter whether it is successful or not).
Right click on the black "Output" panel at the bottom of the Arduino IDE window.
A context menu will open.
Select Copy All from the menu.
Open a forum reply here by clicking the "Reply" button.
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.
Thanks for your support on this. I am using 2.3.4. I have followed the steps and here is the output.
Sketch uses 38780 bytes (14%) of program storage space. Maximum is 262144 bytes.
Global variables use 3940 bytes (12%) of dynamic memory, leaving 28828 bytes for local variables. Maximum is 32768 bytes.
"C:\Users\unshielded\AppData\Local\Arduino15\packages\arduino\tools\dfu-util\0.11.0-arduino5/dfu-util" --device 0x2341:0x0069,:0x0369 -D "C:\Users\unshielded\AppData\Local\arduino\sketches\717FDEF3588BA08CFB0A51A38D75FF63/Blink.ino.bin" -a0 -Q
More than one DFU capable USB device found! Try `--list' and specify the serial number or disconnect all but one device
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
Select File > Quit from the Arduino IDE menus.
All Arduino IDE windows will close.
Start any text editor application.
Create a new text file in the text editor.
Add the following content to the editor:
# serial-discovery uses the property name `serialNumber`, while dfu-discovery uses the name `serial`, so only one of the
# two properties will be defined. Thus an empty fallback definition is required.
# This also provides backwards compatibility with tool versions that don't generate port properties.
# These definitions are overridden when the tool generates the property.
tools.dfu-util.upload.port.properties.serialNumber=
tools.dfu-util.upload.port.properties.serial=
# Both properties are referenced to support uploading when a port of either protocol is selected.
# The leading comma causes the upload command to be valid even when neither property is defined, whether due to using a
# tool version that doesn't generate them, or when no port is selected.
tools.dfu-util.serial_number=,{upload.port.properties.serialNumber}{upload.port.properties.serial}
tools.dfu-util.upload.pattern="{path}/{cmd}" --device {vid.0}:{pid.0} -D "{build.path}/{build.project_name}.bin" -Q --serial {serial_number}
Note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
Start Arduino IDE.
You should now find that you can upload while multiple Nano ESP32 boards are connected to your computer without encountering that "More than one DFU capable USB device found! Try --list' and specify the serial number or disconnect all but one device`" error.
Note that the change I described above will be lost every time you update the "Arduino ESP32 Boards" platform to a new version. I suggest you store a copy of the platform.local.txt file in a safe location outside the C:\Users\unshielded\AppData\Local\Arduino15\packages\arduino\esp32\2.0.18-arduino.5 folder. That way you can just copy the file back to the platform installation folder after performing an update.
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\mna\AppData\Local\Arduino15\packages\arduino\tools\dfu-util\0.11.0-arduino5/dfu-util" --device 0x2341:0x0070 -D "C:\Users\mna\AppData\Local\arduino\sketches\C6FFD98AC9ABB6FC3DA24F4233FA3E66/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/
More than one DFU capable USB device found! Try `--list' and specify the serial number or disconnect all but one device
Failed uploading: uploading error: exit status 74
And here is my platform.local.txt file
# serial-discovery uses the property name `serialNumber`, while dfu-discovery uses the name `serial`, so only one of the
# two properties will be defined. Thus an empty fallback definition is required.
# This also provides backwards compatibility with tool versions that don't generate port properties.
# These definitions are overridden when the tool generates the property.
tools.dfu-util.upload.port.properties.serialNumber=
tools.dfu-util.upload.port.properties.serial=
# Both properties are referenced to support uploading when a port of either protocol is selected.
# The trailing comma causes the upload command to be valid even when neither property is defined, whether due to using a
# tool version that doesn't generate them, or when no port is selected.
tools.dfu-util.serial_number={upload.port.properties.serialNumber}{upload.port.properties.serial},
tools.dfu-util.upload.pattern="{path}/{cmd}" --device {vid.0}:{pid.0} -D "{build.path}/{build.project_name}.bin" -Q --serial {serial_number}
the file was placed in "C:\Users\mna\AppData\Local\Arduino15\packages\arduino\hardware\esp32\2.0.18-arduino.5\platform.local.txt"
Make sure the file is trule named platform.local.txt. By default, Windows hides the file extension, so it is easy to not notice if you accidentally name it platform.local.txt.txt (note the extra .txt file extension).
I'm going to ask you to provide the full verbose output from a compilation.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
Click the "OK" button.
The "Preferences" dialog will close.
Select Sketch > Verify/Compile from the Arduino IDE menus.
Wait for the compilation to finish.
Right click on the black "Output" panel at the bottom of the Arduino IDE window.
A context menu will open.
Select Copy All from the menu.
Open a forum reply here by clicking the "Reply" button.
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.
Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the compilation output into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
Click the "Reply" button to post the output.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.
Select the .txt file you saved from the "Open" dialog.
Click the "Open" button.
The dialog will close.
Click the "Reply" button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.
I am having the same issue. I followed the instructions and it still has the issue as mentioned. I am using arduino CLI on a Raspberry Pi CM4 module arduino-cli Version: 1.2.2 Commit: c11b9dd5 Date: 2025-04-22T13:51:03Z.
My command I sent is: arduino-cli upload -v -p /dev/ttyACM0 -b arduino:esp32:nano_nora ./Oreqa_Water_Control
The response back is: "/home/pi/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5/dfu-util" --device 0x2341:0x0070 -D "/home/pi/.cache/arduino/sketches/A1A124A90EA3E48C702DE424F877CB42/Oreqa_Water_Control.ino.bin" -Q --serial 3485187A8594,
dfu-util: More than one DFU capable USB device found! Try `--list' and specify the serial number or disconnect all but one device
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 dfu-util / Tickets
Failed uploading: uploading error: exit status 74
I don't have an option to unplug one of these Arduino Nano ESP32 once I deploy my system. That is not an option. Has this been fixed? I followed the instructions exactly. I can provide my platform.local.txt if desired. It is a copy from above. Thanks!
I have it working now. I removed the "," from the end of the line in platform.local.txt: tools.dfu-util.serial_number={upload.port.properties.serialNumber}{upload.port.properties.serial}
That then saw the correct board and programmed it.
Thanks for taking the time to post your findings @b-oreqa.
I confirm that the trailing comma does indeed cause this to not work. I have tested this at the time I wrote post #9, but I don't know what could have changed since then.
I find that I am now able to make it work if the comma is moved to before the serial number, so step 4 in my instructions should be:
Add the following content to the editor:
# serial-discovery uses the property name `serialNumber`, while dfu-discovery uses the name `serial`, so only one of the
# two properties will be defined. Thus an empty fallback definition is required.
# This also provides backwards compatibility with tool versions that don't generate port properties.
# These definitions are overridden when the tool generates the property.
tools.dfu-util.upload.port.properties.serialNumber=
tools.dfu-util.upload.port.properties.serial=
# Both properties are referenced to support uploading when a port of either protocol is selected.
# The leading comma causes the upload command to be valid even when neither property is defined, whether due to using a
# tool version that doesn't generate them, or when no port is selected.
tools.dfu-util.serial_number=,{upload.port.properties.serialNumber}{upload.port.properties.serial}
tools.dfu-util.upload.pattern="{path}/{cmd}" --device {vid.0}:{pid.0} -D "{build.path}/{build.project_name}.bin" -Q --serial {serial_number}
I updated the instructions in post #9 accordingly.
If you are using Arduino IDE 2.x, the comma is only needed in the fairly unusual case where you are performing an upload without having first selected a port from the Arduino IDE menus (a port selection is not actually required to upload to the Nano ESP32, so long as you only have one board connected to your computer). So you probably won't have any problems if you leave it as you have it now.