Skip to content

feat(cli): identify serial ports and add discover options #614

Open

Description

@nhschwab

Proposal

Make instro discover a renderer over instro.lib.discover.discover() and expose its knobs:

  • --serial usb|all|none (default usb): probe only USB serial adapters, every port, or none.
  • Serial settings for the one probe every serial port gets (library default is 9600 baud, 8N1, no flow control): --baud N, --data-bits 7|8, --stop-bits 1|1.5|2, --parity N|O|E|M|S, --flow-control none|xon-xoff|rts-cts|dtr-dsr. These build the SerialConfig passed as discover(serial_config=...); there is no sweep, so a port that does not answer stays in the serial table with the "set serial_config manually" hint, and the user re-runs with the right flags. The hint text should name these flags.
  • --timeout SECONDS per-probe timeout.
  • --exclude RESOURCE (repeatable) to skip ports that must not be probed.
  • Positional RESOURCE... extra addresses VISA does not enumerate (e.g. TCPIP0::10.0.0.5::5025::SOCKET).
  • Per-probe progress line driven by on_event.
  • Serial table shows identity, driver and the serial settings that answered; ports that did not answer keep the manual-settings hint.

Update docs/cli.md. Depends on the serial identification / providers issue.

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions