Repository navigation
fix(tri): identify boards by vendor, and stop letting the tree hide them (Closes #2521) - #2522
Merged
Merged
Conversation
…hem (Closes #2521) tri fleet scan reported an empty bus with three AX7203 boards plugged in. Two independent bugs, both failing in the direction that costs most for a command whose whole job is to say whether hardware is attached. First, it matched device NAMES against ft232 / ftdi / usb serial / jtag. macOS calls these 'Digilent USB Device'. The board vendor brands the string; only idVendor says what the chip is -- 1027 is 0x0403 is FTDI. Second, ioreg draws its tree with pipes, so a nested node reads '| | +-o Digilent USB Device@...'. The probe did line.trim() then starts_with("+-o"), which matches only TOP-LEVEL nodes -- controllers and hubs. An FT232H on a hub port is always nested, so no board could ever match, whatever it was called. Either bug alone produces an empty bus. Also fixed: a device's interfaces repeat its vendor and serial, so a whole-tree walk counted one board as three. Now asks ioreg -r -c IOUSBHostDevice and accepts only nodes whose line carries that class. Verified against the live bench: 3 bridges, all reporting the documented serial collision 210512180081; --expect 3 exits 0 and --expect 4 exits 1.
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This was referenced Aug 23, 2026
Contributor
PR DashboardGenerated at: 2026-08-23 15:28:59 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tri fleet scanreported an empty bus with three AX7203 boards plugged in. Two independent bugs, both failing in the direction that costs most for this particular command: it exists to say whether hardware is attached, and it said no.1. It identified boards by their label
macOS calls these devices
Digilent USB Device— none of those substrings. The board vendor brands the string; onlyidVendorsays what the chip is.1027=0x0403= FTDI, which is the bridge every one of these carries.A name is a label; a vendor ID is an identity. The same distinction this repository keeps rediscovering elsewhere.
2. Tree-drawing characters hid every nested node
ioregdraws its tree with pipes, so a nested device reads:The probe did
line.trim()and thenstarts_with("+-o")— which matches only top-level nodes. Those are controllers and hubs. An FT232H on a hub port is always nested, so no board could ever match, whatever it was called.Either bug alone produces an empty bus. Both were present.
Also fixed: one board counted three times
The probe now asks
ioreg -r -c IOUSBHostDeviceand only accepts nodes whose line carriesclass IOUSBHostDevice. A device's interfaces repeat itsidVendorand serial, and an FT232H presents several — a whole-tree walk counted one board as three.Verified against the live bench
Three boards, all reporting the same serial — the documented FT232H serial collision on this bench, now visible rather than invisible.
🤖 Generated with Claude Code