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

-p option does not work as expected #692

Closed
trombik opened this issue Oct 24, 2024 · 0 comments · Fixed by #693
Closed

-p option does not work as expected #692

trombik opened this issue Oct 24, 2024 · 0 comments · Fixed by #693
Assignees
Labels
bug Something isn't working

Comments

@trombik
Copy link

trombik commented Oct 24, 2024

Without --list-all-ports, detect_usb_serial_ports() returns only SerialPortType::UsbPort. When the device is not recognized as SerialPortType::UsbPort for some reasons, --port will not work.

The help says "--list-all-ports List all available ports" but it is confusing. It does not "list ports". Instead, the option does different things. When a port is specified in espflash.toml or with -p and the port is found, it uses the found port without asking users. If not specified, it asks users to choose ports found by an underlying library.

What I expect :

> espflash board-info -p /dev/cuaU0     

should work.

The actual result:

> espflash board-info -p /dev/cuaU0                 
Error: espflash::serial_not_found

  × The serial port '/dev/cuaU0' could not be found
  help: Make sure the correct device is connected to the host system

> ls /dev/cuaU0
/dev/cuaU0

The workaround is, always use --list-all-ports.

If you cannot change the behavior, there should be an entry for it in espflash.toml.

[connection]
serial = "/dev/cuaU0"
list_all_ports = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
2 participants