From e5b47c9306471b41bd2d2ecbbe9ea8932028b380 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 16 Jul 2026 14:11:43 +0700 Subject: skill: add usb-sniffer — wire-level capture with the ataradov hardware tap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fourth view in the USB debugging toolset (usbmon = host URBs, usb-debug = host reasoning, usb-target-debug = device firmware, usb-sniffer = what actually crossed D+/D-). Covers the ataradov/usb-sniffer analyzer: headless pcapng capture (--speed ls/fs/hs, --fold, --limit self-exit), Wireshark/tshark analysis recipes, and the wire realities that bite: downstream broadcast, sniffer self-capture noise, xHCI devnum != wire address, tap-point-dependent reset visibility (hub choreography anchors), FS-behind-HS-hub splits. Every recipe hardware-validated on the rig, including the capture-window floor (a 3 s window provably misses the enumeration ladder; 3M packets minimum). Two udev files with distinct audiences, not one: - examples/device/99-tinyusb-examples.rules (renamed from 99-tinyusb.rules): the user-facing rules the examples need — cafe VID access, hidraw, the ModemManager blacklist, a couple of board probes. getting_started.rst, the webusb_serial README and its source comment point here. - tools/88-tinyusb.rules: the HIL rig's private probe/analyzer allowlist, now with the sniffer (6666:6620 + blank FX2LP 04b4:8613). Installed on the rig only; the usb-sniffer skill references it. --- docs/getting_started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/getting_started.rst') diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 7fcc2f5d1..7e1cd79f3 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -181,7 +181,7 @@ Some examples require udev permissions to access USB devices: .. code-block:: bash - $ cp `examples/device/99-tinyusb.rules `_ /etc/udev/rules.d/ + $ cp `examples/device/99-tinyusb-examples.rules `_ /etc/udev/rules.d/ $ sudo udevadm control --reload-rules && sudo udevadm trigger Next Steps -- cgit v1.3.1 From 277e61818638795b9d0f7b2ddc076036dda06d4e Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 18 Jul 2026 00:15:54 +0700 Subject: docs, udev: address Copilot review nits on PR #3775 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - getting_started.rst: the reST inline-link markup rendered literally inside the code-block (not a runnable command) and lacked sudo — use a plain `sudo cp examples/device/99-tinyusb-examples.rules ...`. - tools/88-tinyusb.rules: normalize the six MODE="666" entries to the 4-digit octal MODE="0666" used everywhere else in the file. --- docs/getting_started.rst | 2 +- tools/88-tinyusb.rules | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/getting_started.rst') diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 7e1cd79f3..bce028ccb 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -181,7 +181,7 @@ Some examples require udev permissions to access USB devices: .. code-block:: bash - $ cp `examples/device/99-tinyusb-examples.rules `_ /etc/udev/rules.d/ + $ sudo cp examples/device/99-tinyusb-examples.rules /etc/udev/rules.d/ $ sudo udevadm control --reload-rules && sudo udevadm trigger Next Steps diff --git a/tools/88-tinyusb.rules b/tools/88-tinyusb.rules index fedeb7468..e0c5215b0 100644 --- a/tools/88-tinyusb.rules +++ b/tools/88-tinyusb.rules @@ -44,7 +44,7 @@ SUBSYSTEMS=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666 SUBSYSTEM=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666" # CMSIS-DAP, vendor = ARM -SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", MODE="666" +SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", MODE="0666" # wch-link SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="8010", GROUP="plugdev" @@ -59,11 +59,11 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", MODE="0666" SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE="0666" # E2/E2 Lite/E1/E20/IE850A emulator -ATTR{idProduct}=="82a1", ATTR{idVendor}=="045b", MODE="666" -ATTR{idProduct}=="82a0", ATTR{idVendor}=="045b", MODE="666" -ATTR{idProduct}=="823b", ATTR{idVendor}=="045b", MODE="666" -ATTR{idProduct}=="823c", ATTR{idVendor}=="045b", MODE="666" -ATTR{idProduct}=="0250", ATTR{idVendor}=="045b", MODE="666" +ATTR{idProduct}=="82a1", ATTR{idVendor}=="045b", MODE="0666" +ATTR{idProduct}=="82a0", ATTR{idVendor}=="045b", MODE="0666" +ATTR{idProduct}=="823b", ATTR{idVendor}=="045b", MODE="0666" +ATTR{idProduct}=="823c", ATTR{idVendor}=="045b", MODE="0666" +ATTR{idProduct}=="0250", ATTR{idVendor}=="045b", MODE="0666" # Prevent E2/E2Lite/E1/E20/IE850A from being captured by modem manager service as E2/E2 Lite/E1/E20/IE850A is not a modem ATTR{idProduct}=="82a1", ATTR{idVendor}=="045b", ENV{ID_MM_DEVICE_IGNORE}="1" ATTR{idProduct}=="82a0", ATTR{idVendor}=="045b", ENV{ID_MM_DEVICE_IGNORE}="1" -- cgit v1.3.1