Skip to content

Serial port re-enumerates after upload with SAMD boards (probably other USB native) #287

Closed
@tigoe

Description

@tigoe

When you upload a new sketch to a SAMD board, the serial port list drops your port choice and chooses the one above it when the board is reset for upload.

Steps:

  1. Open new sketch
  2. Choose board and port
  3. Upload to a SAMD board
  4. Note the serial port choice after upload. It will be the one above your port in the list.

This causes confusion when you try to open the serial port. You can open the port, but you have to re-choose it first.
MacOS Big Sur 11.2.3 20D91

This is related to an earlier issue, #271

NOTE: this only happens if the port above your board is a virtual port.
For example, if it is a BluetoothSerial port, it happens, but if you delete the reference to the BluetoothSerial device, and therefore the port, it doesn't happen. I tested using a BluetoothSerial HC-05 board.

Activity

changed the title [-]Serial power re-enumerates after upload with SAMD boards (probably other USB native)[/-] [+]Serial port re-enumerates after upload with SAMD boards (probably other USB native)[/+] on Mar 29, 2021
tjpetz

tjpetz commented on Mar 29, 2021

@tjpetz

I have this same problem with the mbed based Nano 33 BLE Sense. I’m also using MacOS Big Sur.

It’s a particular challenge when using 2 boards simultaneously as after upload the active window will switch to the other port. This makes it particularly difficult to see any serial data right after the load.

Also resetting the Arduino board will cause the same rescan and thus confusion on which port is to be used.

Xtreemtec

Xtreemtec commented on Apr 5, 2021

@Xtreemtec

Running a SAMD21 Zero all day on windows and while programming it enumourates a different port. ( but we are used to this as programming port always has a different comm port) but nicely jumps back for serial monitor. So i cant relate to this for windows 10 at this point.

ubidefeo

ubidefeo commented on Apr 8, 2021

@ubidefeo

@tigoe
what's the process to create such virtual serial port?
I'd like to replicate the setup to test

tigoe

tigoe commented on Apr 8, 2021

@tigoe
MemberAuthor

HI @ubidefeo,

All macOS, as I said:

  1. Get yourself a bluetooth serial module, like the HC-05, HC-04, etc. I was using this one from Sparkfun, but I've used others with similar results.
  2. Power it up
  3. Open Bluetooth Preferences and pair with it.
  4. open terminal and list your serial ports. You'll see something like /dev/tty.HC-05-XXXX
  5. Power it down. The OS will disconnect from it, but maintain the port in the list of ports until you "forget" the device in the Bluetooth system controls panel. Its existence in the list of ports should cause the problem I'm describing.

Hope that helps and you can duplicate it. If not, let me know.

1 remaining item

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @tigoe@cmaglie@ubidefeo@per1234@tjpetz

      Issue actions

        Serial port re-enumerates after upload with SAMD boards (probably other USB native) · Issue #287 · arduino/arduino-ide