Nano Esp32, IDE2 keeps using DFU-port, which doesnt work

I just got my hands on the Nano ESP32 and that works just fine, but there's a bit of a problem. IDE2 detects two ports the Com, through which i connected the Nano, and a DFU 2-1.4 port.
The com-port works just fine but the DFU 2-1.4 doesnt connect saying:

"No monitor available for the port protocol dfu. Could not connect to 2-1.4 dfu port." When I try to upload. (The upload itself works but it doesnt run)

To get the code to run I have the close and re-open the IDE, select the Com-Port and it'll work.
When uploading my sketch it always says this in the Output:

pening DFU capable USB device...
Device ID 2341:0070
Device DFU version 0101
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0101
Device returned transfer size 4096
Copying data from PC to DFU device
//The download//
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!

To make things clearer I want the IDE to not select the DFU Port so that it'll run without me having to restart the IDE.

Hi @disbelive. We are aware of this bug that can cause Arduino IDE to unexpectedly change the port selection from the serial port to the "DFU" port after an upload to the Nano ESP32 board under certain conditions.

There is work in progress now to fix this:

The fix should be in the next release of Arduino IDE so you shouldn't have to wait too long. Unfortunately I don't know a good fix for the problem so for now you'll need to remember to switch the port selection back to the COM port after uploading.

I'll provide instructions for using the beta tester build just in case you would like to give it a try. Please note that this is a work in progress so you can expect to encounter some bugs if you do give the beta tester build a try.

  1. Sign in to your GitHub account.
    (GitHub only allows downloads of the tester builds when you are signed in.)
  2. Open this page in your browser:
    https://github.com/arduino/arduino-ide/actions/runs/5751252146?pr=2149#artifacts
  3. Click the "Windows_X86-64_zip" link under the "Artifacts" section of the page.
  4. Wait for the download to finish.
  5. Unzip the downloaded file.
  6. Unzip the ZIP file you find inside the unzipped file.
    (yes, there are two layers of ZIP files :upside_down_face:)
  7. Run the Arduino IDE.exe file from the unzipped folder.

When you install the IDE via this ZIP file, it will not interfere with any other installations of Arduino IDE on your computer so you are welcome to have both beta tester versions as well as the release version of Arduino IDE installed on your computer at the same time.

Well good to know that it's already being worked on!
It's mostly just annoying having to restart the IDE, because after the upload it can't manage to connect anymore because of a "busy port".

not yet fixed????
when i try to upload via ide : Sketch uses 784441 bytes (24%) of program storage space. Maximum is 3145728 bytes.
Global variables use 60244 bytes (18%) of dynamic memory, leaving 267436 bytes for local variables. Maximum is 327680 bytes.
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/

Cannot open DFU device 2341:0070 found on devnum 60 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available
Failed uploading: uploading error: exit status 74

Hi @lmateev

It was fixed nine months ago and that fix released in Arduino IDE 2.2.0. The error you are encountering is completely unrelated to the outdated subject of this topic.

I see you also reported your problem over on the relevant topic here:

The forum helpers will assist you over there. This topic should be used exclusively for any discussion of the original subject matter of Arduino IDE unexpectedly switching the port selection from the serial port to the DFU port.