Add a flag (e.g., chartread -u -c list or a standalone utility) to query connected USB instruments and return a JSON array of device ports and names.
Rationale
Allows a host UI to automatically populate a "Select Instrument" hardware dropdown dynamically without relying on OS-level USB polling or brittle string parsing of chartread -?.
### Description
Add a flag (e.g., `chartread -u -c list` or a standalone utility) to query connected USB instruments and return a JSON array of device ports and names.
### Rationale
Allows a host UI to automatically populate a "Select Instrument" hardware dropdown dynamically without relying on OS-level USB polling or brittle string parsing of `chartread -?`.
### Proposed Output
```json
{
"event": "instruments",
"devices": [
{"port": 1, "name": "i1Pro 2", "type": "i1"}
]
}
```
gronod
added this to the v3.5.1 - UI Subprocess Integration milestone 2026-08-21 09:12:06 +01:00
### Implementation Completed
The standalone instrument enumeration tool `instlist` has been implemented and pushed to branch `feature/usb-enumeration` in commit `b2435a8`.
#### Summary of Deliverables:
1. **`spectro/instlist.c`**:
- Uses cross-platform `new_icompaths()` to discover USB and serial spectrophotometers and colorimeters across Linux, macOS, and Windows.
- Emits structured JSON array containing `port`, `name`, and `type`.
- Supports standard `-h`, `-?`, `--help`, `-v`, and `-D [level]` switches.
2. **`spectro/Jamfile`**:
- Added `instlist` to `Executables` and defined its `Main` compilation rule.
3. **Documentation**:
- Created `doc/instlist.html` with usage guide, switches, and schema.
- Registered `spectro/instlist.exe` in `doc/MinorTools.html`.
#### JSON Output Format:
```json
{
"event": "instruments",
"devices": [
{
"port": 1,
"name": "usb:/bus0/dev1 (X-Rite i1Pro)",
"type": "i1Pro"
}
]
}
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
Add a flag (e.g.,
chartread -u -c listor a standalone utility) to query connected USB instruments and return a JSON array of device ports and names.Rationale
Allows a host UI to automatically populate a "Select Instrument" hardware dropdown dynamically without relying on OS-level USB polling or brittle string parsing of
chartread -?.Proposed Output
Implementation Completed
The standalone instrument enumeration tool
instlisthas been implemented and pushed to branchfeature/usb-enumerationin commitb2435a8.Summary of Deliverables:
spectro/instlist.c:new_icompaths()to discover USB and serial spectrophotometers and colorimeters across Linux, macOS, and Windows.port,name, andtype.-h,-?,--help,-v, and-D [level]switches.spectro/Jamfile:instlisttoExecutablesand defined itsMaincompilation rule.doc/instlist.htmlwith usage guide, switches, and schema.spectro/instlist.exeindoc/MinorTools.html.JSON Output Format: