Port keeps switching after upload

I'm using the Arduino IDE 2.0 beta rc9.2 with an Adafruit Metro ESP32-S2. Overall it works well, but for one frustrating bug.

There are two board/port combos available in the dropdown at the top of the window: /dev/cu.Bluetooth-Incoming-Port and /dev/cu.usbmodem1101. That's true in the classic IDE as well. I want cu.usbmodem1101. In the classic IDE, when I select it and then upload my sketch, it remains selected (e.g., if I upload again it works). But in 2.0, after every upload it resets to cu.Bluetooth-Incoming-Port (e.g., I have to switch ports before uploading again).

Is this a known issue? Is there a workaround? Thanks!

Hi @dfeldman. This is a known issue:

The developers are working on a fix right now:

There is a workaround you can use immediately:

  1. Select Tools > Port > /dev/cu.Bluetooth-Incoming-Port from the Arduino IDE menus.
  2. Select Tools > Boards > Arduino AVR Boards > Arduino Nano from the Arduino IDE menus.
  3. Select the port of your Pico board from the Tools > Port menu.
  4. Select the board for your Pico board from the Tools > Board menu.

The "Arduino NG or older" board was picked arbitrarily. The problem is that Arduino IDE 2.x persistently associates a board with a port as soon as you select that combination. That can be helpful when the association is correct, but it is also very easy to inadvertently create an association between a board and some unrelated port such as /dev/cu.Bluetooth-Incoming-Port. The workaround is to change that port's association to any other board you don't use.

1 Like

This worked perfectly. Thank you so much!!

(And the 2.0 beta compile & upload process is so much faster than the 1.x one!)

You are welcome. I'm glad it is working now. Thanks for taking the time to post an update with your results.

Regards, Per

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