Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tigoe opened this issue Mar 29, 2021 · 4 comments · Fixed by #1328
Closed

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

tigoe opened this issue Mar 29, 2021 · 4 comments · Fixed by #1328
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@tigoe
Copy link
Member

tigoe commented Mar 29, 2021

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.

@per1234 per1234 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) Mar 29, 2021
@tjpetz
Copy link

tjpetz commented Mar 29, 2021

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
Copy link

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
Copy link

ubidefeo commented Apr 8, 2021

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

@tigoe
Copy link
Member Author

tigoe commented Apr 8, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants