usb-device-enumeration
Skill2 starsChanged 2 months agoMITView on GitHub
Use when a USB device is invisible on Windows.
In this repository58 other files it gives its agents.
- ad-hoc-script-verificationSkill
- architecture-diagramSkill
- blocked-page-recoverySkill
- cadquery-enclosure-designSkill
- canonical-thumbnailSkill
- circuit-designSkill
- competitor-news-monitorSkill
- component-alternativesSkill
- debugging-hermes-tui-commandsSkill
- docker-container-update-checkSkill
- document-to-action-itemsSkill
- docxSkill
- email-inbox-triageSkill
- embedded-porting-patternsSkill
- ephemeral-file-sharingSkill
- excalidrawSkill
- flash-game-researchSkill
- flutter-android-buildSkill
- flutter-content-renderingSkill
- github-code-reviewSkill
- githubSkill
- goatcounter-analyticsSkill
- google-oauth-file-pollSkill
- grounded-citationsSkill
- hermes-agent-skill-authoringSkill
- hermes-gateway-slash-commandSkill
- hermes-gateway-supervisionSkill
- jellyseerr-watch-suggestionsSkill
- maintained-fork-publishingSkill
- meeting-action-itemsSkill
- native-mcpSkill
- obsidian-mapsSkill
- pdf-flattenSkill
- pdfSkill
- pdf-surgical-editsSkill
- planSkill
- product-price-monitorSkill
- psp-developmentSkill
- psp-homebrew-testingSkill
- psp-prx-plugin-maintenanceSkill
- python-debugpySkill
- python-webapp-patternsSkill
- reddit-readingSkill
- retro-fansiteSkill
- reverse-proxy-websocket-debuggingSkill
- rss-feedsSkill
- simplify-codeSkill
- sketchSkill
- skit-thumbnailSkill
- spikeSkill
- subagent-driven-developmentSkill
- test-driven-developmentSkill
- weekly-review-planningSkill
- wiki-media-asset-pipelineSkill
- windows-c-build-toolchainSkill
- windows-crash-forensicsSkill
- writing-plansSkill
- yt-dlp-anti-botSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
No SD card / not booting (LED dark) → nothing enumerates either.
- Distinctive: line 40
Don't conclude "cable is fine" without the phone test — power-only cables are everywhere.
- Very specific: line 41
Don't retry PowerShell variants after a block.
- Distinctive: line 42
Don't plug the data cable into the Pi Zero's MIDDLE port expecting the PC to see the Pi.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
USB Device Enumeration & Gadget Mode (Windows host)
Class: making a USB-connected device (Raspberry Pi Zero, ESP32, Arduino, any SBC) visible to and reachable from the Windows PC — or diagnosing why it isn't.
Host side — is Windows seeing anything?
Rule: native exes only. Inline powershell -Command from terminal() trips the approval gate and times out silently on Telegram (the prompt can't render, so the call just dies — 3/3 PowerShell invocations failed in one session while native exes in the same batch ran fine). Verified-working order:
- COM ports:
reg query "HKLM\HARDWARE\DEVICEMAP\SERIALCOMM"— every\Device\SerialN REG_SZ COMxline is a live port. Baseline on this box: only COM1 (onboardACPI\PNP0501legacy port).modealone is NOT on git-bash PATH — usecmd //c mode. - Full PnP tree, filtered:
pnputil /enum-devices /connected | grep -iE -B2 -A3 '2e8a|raspberry|rndis|gadget|serial|com[0-9]'.2E8A= Raspberry Pi Foundation USB vendor ID (shows asUSB\VID_2E8A&PID_xxxx). - Network adapters (RNDIS/ECM gadget):
ipconfig /all | grep -iE 'adapter|rndis|ethernet|description'— an RNDIS gadget appears as its own adapter. (Get-NetAdapteris PowerShell → blocked.) - Baseline diff:
pnputil /enum-devices /connected | grep -iE 'instance id:.*usb'— snapshot the VID set, re-scan after plugging, diff. Known-good baseline on this gaming PC: VID_2174 (UAS enclosures), VID_1532 (Razer), VID_1B1C (Corsair), VID_214B + VID_067B (hubs). - Hot-plug watch:
scripts/watch-usb-hotplug.shvia terminal(background=true, notify_on_complete=true), and message the user what to do during the window (swap cable, direct port, check LED). Polls every 5s, exits on first hit.
Device side — Raspberry Pi Zero (and friends) over USB
- The Pi Zero's EDGE micro-USB port (labeled PWR/USB) carries data lines to the SoC — it IS the gadget port. The MIDDLE micro-USB is OTG for peripherals only. So "connected only to power" does NOT mean no data path exists — the physical data lines are in play.
- A stock Pi Zero shows NOTHING to the host, even on a data cable, unless USB gadget mode is enabled (standard Raspberry Pi recipe, paths vary slightly by Pi OS release):
/boot/config.txt: adddtoverlay=dwc2/boot/cmdline.txt: appendmodules-load=dwc2,g_serial(→ COM port) ormodules-load=dwc2,g_ether(→ Ethernet/RNDIS adapter) afterrootwait- Windows-side appearances: g_serial → "USB Serial Device (COMx)"; g_ether → "USB Ethernet/RNDIS Gadget"; g_mass_storage → "Linux File-Stor Gadget".
- Charge-only micro-USB cables are the #1 physical culprit — visually identical to data cables. Definitive test: same cable + a phone → if the PC sees the phone, the cable carries data.
- No SD card / not booting (LED dark) → nothing enumerates either. VID_2E8A absent from the PnP tree = the Pi isn't even attempting enumeration.
Pitfalls
- Don't conclude "cable is fine" without the phone test — power-only cables are everywhere.
- Don't retry PowerShell variants after a block; the gate is on inline
-Command, not the query. Pivot to native exes or write a.ps1and runpowershell -NoProfile -File(mirrors the proven.py-file pattern). - Don't plug the data cable into the Pi Zero's MIDDLE port expecting the PC to see the Pi.
- One scan isn't proof — run the watcher while the user fiddles with cables; timing issues fake "not connected".
Verification
Device is enumerated when it appears in reg query ...SERIALCOMM (g_serial), ipconfig /all (g_ether), or the PnP tree (VID_2E8A). LED lit + data-capable cable + gadget config = the three conditions; missing any one reproduces the "invisible Pi".
Support files
scripts/watch-usb-hotplug.sh— background poll loop: detects when a vendor ID (default 2E8A) or a new COM port appears; exits 0 on hit.references/usb-enumeration.md— full command walkthrough, worked example (invisible Pi Zero diagnosis), gadget-mode config detail and resulting device names.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

