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

Automatic com port selection #1

Open
apla opened this Issue Feb 3, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@apla
Copy link
Owner

apla commented Feb 3, 2015

cli precondition:

cuwire is called with upload or console command along with board option but no port option.

and

User has either:

  • one mcu board with native USB plugged in
  • one board via USB UART adapter plugged in, and the board doesn't have native USB

gui precondition:

Application has Automatic port selection setting turned on

and

User has either:

  • one mcu board with native USB plugged in
  • one board via USB UART adapter plugged in, and the board doesn't have native USB

Flow for native usb board:

  1. A user selects a board.
  2. A configuration for this board contains a usb vendorId:productId
  3. Port list refreshes automatically
  4. The app sees that the list contains one and only one port with the corresponding vendorId:productId
  5. The app selects this port automatically for firmware upload.

Flow for board plugged in via USB UART adapter:

  1. A user selects a board.
  2. A configuration for this board doesn't contain a usb vendorId:productId
  3. Port list refreshes automatically
  4. The app sees that the list contains one and only one port with the vendorId:productId of known USB UART adapter (ftdi, max232, plc2303, cp210x, ch341 at least)
  5. The app selects this port automatically for firmware upload.

Special conditions:

This use case doesn't apply:

  • If user plugged in multiple boards with one vendorId:productId
  • If user selected non-default programmer

Implementation details:

  • api add vendorId:productId of usb uart
  • cli display board name along with port name for matching vendorId:productId e4f853b
  • gui display board name along with port name for matching vendorId:productId
  • cli guess port name if board name is provided f484adf
  • gui autoscan serial ports in 1 minute
  • gui should have option in settings to enable or disable automatic port selection
  • gui temporarily turn off autoselection if user select port manually after port autoselection (when to turn on?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.