Skip to content

fbuild port scan misses all PJRC/Teensy (VID 16C0) serial ports + no vendor/product resolution for them #962

Description

@zackees

Summary

fbuild port scan does not list any PJRC/Teensy serial port. Windows enumerates several VID_16C0 serial ports, but the fbuild scanner shows none of them. A Teensy 4.x attached to the machine is therefore invisible to fbuild port scan, which breaks the "port-scan before declaring a board absent" workflow (FastLED agent-docs rule) for Teensy targets.

Two distinct gaps:

  1. Enumeration: 16C0 serial ports are omitted from the scan entirely.
  2. Resolution: even if listed, fbuild_core::usb::resolve should map the PJRC VID/PIDs to friendly names (it currently resolves ESP32-S3 → "WEMOS LOLIN S3" but has nothing for Teensy).

Repro (Windows 10, fbuild 2.3.24)

fbuild port scan output — note NO 16C0 ports:

COM25     303A:1001    USB Serial Device (COM25)    ser=80:F1:B2:D1:DF:B1
          └─ Espressif Systems / WEMOS LOLIN S3    cdc=unknown
COM22     303A:1001    USB Serial Device (COM22)    ...
COM9      303A:1001    USB Serial Device (COM9)     ...
COM11     10C4:EA60    Silicon Labs CP210x ...      └─ Arduino / NodeMCU 0.9 (ESP-12 Module)
4 USB ports, 3 non-USB ports

Windows PnP (Get-PnpDevice … VID_16C0) at the same moment DOES show the Teensy serial ports:

Status  Class FriendlyName              InstanceId
Unknown Ports USB Serial Device (COM20) USB\VID_16C0&PID_0483&MI_00\...   # Teensy USB Serial
Unknown Ports USB Serial Device (COM19) USB\VID_16C0&PID_0483&MI_00\...
Unknown Ports USB Serial Device (COM21) USB\VID_16C0&PID_0489&MI_00\...   # Teensy Serial+MIDI+Audio
Unknown Ports USB Serial Device (COM7)  USB\VID_16C0&PID_0489&MI_00\...
# plus USB\VID_16C0&PID_0478  (HalfKay bootloader, HID)

Likely root cause

The Teensy serial ports report Windows PnP Status = Unknown (they're multi-function composite / MI_00 interfaces, and/or CM_PROB_PHANTOM). It looks like the scanner filters ports whose status isn't OK (or only walks a subset of the SetupAPI device tree), which drops every 16C0 entry. The scan should include serial ports regardless of PnP "Unknown/phantom" status — an agent needs to see them to decide whether a Teensy is present, and to pick the right COM port for bash autoresearch teensy41 / the flexio/objectfled bench runners (which default to COM20).

Ask

  1. List 16C0 serial ports in fbuild port scan (do not filter on PnP Status == OK; a Teensy serial function commonly enumerates as Unknown/composite).
  2. Resolve the PJRC VID/PIDs in fbuild_core::usb::resolve (feat(cli): fbuild port scan — enumerate ports + resolve VID:PID to vendor/product via FastLED/boards #741 tiered resolver):
    • 16C0:0483PJRC / Teensy (USB Serial)
    • 16C0:0478PJRC / Teensy (HalfKay bootloader)
    • 16C0:0489PJRC / Teensy (Serial + MIDI + Audio composite)
    • 16C0:04D0..04D9 and other PJRC PIDs as appropriate (see the PJRC usb_desc.h PID table).
  3. Bonus: surface the MI_xx composite-interface index so the correct data-bearing COM port is obvious when a Teensy exposes multiple serial functions (Serial vs MIDI-serial).

Context

Downstream, FastLED's agent docs (agents/docs/cpp-standards.md → "Check if the target hardware might already be attached") now mandate fbuild port scan before any "board not attached" claim. That rule is only reliable if the scanner actually shows attached Teensies. Related: #741 (the fbuild port command + USB resolver), #686 (serial-probe mirror of ci/util/serial_probe.py, which has a richer PJRC fingerprint table worth porting).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions