From e02f93158cc602ba6f20945a187172abf2546718 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 13 Jul 2026 17:53:34 +0700 Subject: test/hil: usbtest fleet enablement, shuffled scheduling, unique PIDs Pool/config: - record real uids (ra8m1_ek), enable usbtest for espressif s3/p4, then park ra6m5_ek and ra8m1_ek in boards-skip (ra6m5's usbtest/MSC traffic can kill the uPD720201 host on its ROM firmware; ra8m1 USBHS bring-up pending); max32666/nrf54lm20 stay enabled - their MosChip flakiness never wedges - re-enable device/usbtest on HS boards (mimxrt1064, ch32v307) now that uPD720201 firmware 2.0.2.6 fixes the command-ring death; mimxrt1015 stays skipped - its HS battery killed the controller on both ROM and 2.0.2.6 firmware (board-specific); match the moved host-test bundles (f723 <-> rt1064); skip never-passing tests on the new nrf5340dk/nrf54lm20dk boards and the detached pico host bundle, each documented with a comment Host-controller quirk gating in usbtest.py (auto-skip, self-heals on a healthy xHCI): - MosChip MCS9990 EHCI: case 25 (int-OUT never scheduled, FRINDEX bug) and case 11 (unlinked reads complete short/EREMOTEIO) - Renesas uPD720201 xHCI: firmware-gated. The card must run firmware >= 2.0.2.6 (RAM-uploaded - it reverts to ROM on every power cycle): on older firmware the command ring dies under unlink stress (a Configure Endpoint command stops completing; the hub worker deadlocks holding the device lock; only a host power cycle recovers; three boards reproduced it). usbtest.py reads the FW version register (PCI config 0x6c) and refuses to run at all on older firmware - hil_test surfaces that as a failed test with the reason. On current firmware the full 30-case battery runs (validated FS+HS: metro_m4, f723, f723-DMA all 30/30). Scheduling (hil_test.py): - Shuffle each (board, variant)'s test order with a seeded RNG (HIL_SHUFFLE_SEED to replay) so usbtest batteries and flash churn spread across the timeline instead of convoying on one controller. - Per-controller usbtest + flash semaphores: HIL_USBTEST_PARALLEL (default 4) concurrent usbtest batteries and HIL_FLASH_PARALLEL (default 8) concurrent flashes per host controller. Profiled on uPD720201 firmware 2.0.2.6 across 8/1..12/8: wall time falls 22.2/14.3/12.5/10.8 min at usbtest width 1/2/3/4 and plateaus there; zero controller errors everywhere; first battery case failures (leaf-hub bandwidth stretch) appear at 12/8, and flash width 12 only amplifies flasher-hub contention flakes - so 8/4 is the optimum. A separate battery-window flash throttle was profiled and dropped. - Give every example a unique hardcoded USB PID (0x4001-0x4022, usbtest keeps 0x4010) instead of the PID_MAP interface bitmap: different examples now always re-enumerate back-to-back, even on boards whose CPU reset does not drop D+ (WCH CH58x), so the EXAMPLE_PID table and same-PID adjacency reordering in hil_test.py are gone; only the variant-boundary same-example repeat needs a swap. - Report matrix: stable columns with the metric-bearing tests pinned first (usbtest, cdc_msc_throughput, msc_file_explorer[_freertos]), the rest alphabetical. Fail fast: - enum wait budget 8 s on the first attempt, 4 s on retries; dfu waits are deadline-based so dfu-util's own runtime counts against the budget. A device-absent failure now costs ~3-5x a passing test (20-30 s) instead of 10-30x (47-150 s). - CI runs hil_test with --retry 1 and no in-run second pass: a broken fixture fails the job fast instead of holding the self-hosted runner for hours and blocking other PRs' HIL jobs. hil_test still writes the .skip sidecar, so a manual re-run attempt only retests what failed. Review fixes (multi-agent adversarial review of this commit): - tinyusb_win_usbser.inf: the PID rework moved five CDC examples onto even PIDs the INF's odd-only DeviceList never matched (legacy-Windows usbser binding) - appended 0x4006/4008/400a/4020/4022 to both lists. - usbtest example: USBTEST_TIER is now overridable and the descriptors and pumps are tier-conditional, so a board whose DCD cannot serve a tier lowers it instead of skipping the whole example - RA2A1 (RUSB2 with no isochronous pipe) builds at tier 3 via its BOARD_ define; the host battery follows the tier advertised in bcdDevice. Tier-4 output verified byte-identical after the refactor. - dynamic_configuration's second config derived USB_PID + 11 = 0x4018, colliding with net_lwip_webserver - now USB_PID + 0x0100, outside the per-example space. tools/check_example_pids.py (pre-commit hook) enforces PID uniqueness incl. derived and literal idProduct values. - usbtest.py firmware gate: matched by device ID (uPD720201/720202, both use the 0x6c FW register), and an unreadable version (setpci missing/denied) now refuses with its own message instead of masquerading as "firmware 0x00000000"; noted the gate is necessary but not sufficient (board-specific kills stay per-board skips). - hil_test: deadline waits use time.monotonic(); multiprocessing context pinned to fork (raw semaphores in Pool initargs); flash and usbtest permits unified into one fail-closed, exception-safe ctrl_permit (unknown controller takes every slot and logs a warning instead of silently borrowing slot 0); an all-skipped battery reports as skip, not "0/0" failure; slow-body polls (mtp, printer, disk read) go through a shared deadline-based wait_until so their bodies count against the enum budget; throughput's FS detection compares serials case-insensitively like every other walk; a missing MSC read-speed line now fails the host msc_file_explorer test instead of passing with an empty metric. Hardening: - fail fast (15 s) when a driver-registry sysfs write blocks: a wedged device otherwise turns every subsequent battery into an unkillable D-state writer and silently hangs the whole run - usb-recover skill: a VM reboot is not a reliable cure (MosChip hubs latch up across the PCIe reset); full host power cycle is Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg --- examples/device/webusb_serial/src/usb_descriptors.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'examples/device/webusb_serial/src') diff --git a/examples/device/webusb_serial/src/usb_descriptors.c b/examples/device/webusb_serial/src/usb_descriptors.c index 527837161..5986bffdf 100644 --- a/examples/device/webusb_serial/src/usb_descriptors.c +++ b/examples/device/webusb_serial/src/usb_descriptors.c @@ -27,15 +27,8 @@ #include "tusb.h" #include "usb_descriptors.h" -/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug. - * Same VID/PID with different interface e.g MSC (first), then CDC (later) will possibly cause system error on PC. - * - * Auto ProductID layout's Bitmap: - * [MSB] MIDI | HID | MSC | CDC [LSB] - */ -#define PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0) -#define USB_PID (0x4000 | PID_MAP(CDC, 0) | PID_MAP(MSC, 1) | PID_MAP(HID, 2) | \ - PID_MAP(MIDI, 3) | PID_MAP(VENDOR, 4) ) +// Unique PID per example: guarantees re-enumeration on re-flash and a fresh host driver match. +#define USB_PID 0x401f //--------------------------------------------------------------------+ // Device Descriptors -- cgit v1.3.1 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. --- .claude/skills/usb-sniffer/SKILL.md | 147 ++++++++++++++++++++++++++++++ docs/getting_started.rst | 2 +- examples/device/99-tinyusb-examples.rules | 22 +++++ examples/device/99-tinyusb.rules | 21 ----- examples/device/webusb_serial/README.md | 2 +- examples/device/webusb_serial/src/main.c | 2 +- tools/88-tinyusb.rules | 93 +++++++++++++++++++ 7 files changed, 265 insertions(+), 24 deletions(-) create mode 100644 .claude/skills/usb-sniffer/SKILL.md create mode 100644 examples/device/99-tinyusb-examples.rules delete mode 100644 examples/device/99-tinyusb.rules create mode 100644 tools/88-tinyusb.rules (limited to 'examples/device/webusb_serial/src') diff --git a/.claude/skills/usb-sniffer/SKILL.md b/.claude/skills/usb-sniffer/SKILL.md new file mode 100644 index 000000000..e9f2d08f2 --- /dev/null +++ b/.claude/skills/usb-sniffer/SKILL.md @@ -0,0 +1,147 @@ +--- +name: usb-sniffer +description: Use when you need wire-level USB evidence that host-side capture can't provide — a device that never enumerates (usbmon shows nothing or only Submits), suspected NAK storms/STALL/babble/bad handshakes, bus-reset or enumeration timing, split-transaction issues, or a usbmon-vs-device-log disagreement the wire must arbitrate. Captures LS/FS/HS packets (PIDs, tokens, handshakes, SE0/line states) with the ataradov usb-sniffer hardware into Wireshark pcapng. +--- + +# usb-sniffer — wire-level capture with the ataradov hardware analyzer + +Extends the debugging trio with the layer below URBs: + +| Skill | Answers | +|---|---| +| `usbmon` | what the host software exchanged (URBs) | +| `usb-debug` | why the host acted (dmesg / dynamic debug) | +| `usb-target-debug` | what the device firmware did | +| **`usb-sniffer`** | **what actually crossed D+/D-** (PIDs, handshakes, resets, timing) | + +Reach for it when usbmon can't see (device never binds, pre-enumeration +failures) or can't be trusted (URB completed but did the wire really ACK?). +For everything visible in URBs, usbmon is cheaper — no hardware, no locks. + +## Rig inventory — find the sniffer and what it taps + +```bash +lsusb -d 6666:6620 # sniffer present? (github.com/ataradov/usb-sniffer) +``` + +The sniffer is a passive tap: host-side and device-side connectors pass +through, the capture port is a separate USB device. What it taps is a cabling +fact you must confirm, not assume: start a capture (below), provoke known +control traffic to a candidate (`lsusb -v -s : >/dev/null`), and +see whether those requests appear on the wire. As of 2026-07 the sniffer is +on htpc tapping the hub-3-2 upstream, with `mimxrt1010_evk` (HS) behind it. + +The tapped board is rig hardware: hold its board lock for any session that +resets or reflashes it (`hil` skill). The sniffer itself is not lockable and +capture alone perturbs nothing. + +## Capture + +The tool is `usb_sniffer` (installed in `~/.local/bin`, extcap-symlinked so +Wireshark's GUI also shows a "USB Sniffer" interface). Headless recipe: + +```bash +timeout 15s usb_sniffer --capture --fifo /tmp/cap.pcapng --speed hs # or fs / ls +``` + +- `--speed` MUST match the DUT's link speed (default is fs!). Wrong speed = + no USB packets, only Syslog pseudo-packets ("Line state: SE0", "VBUS ON"). + If you see only those, fix `--speed` before doubting the hardware. +- ALWAYS bound the capture: `timeout` and/or `--limit N` (packets). HS runs + 15–20 MB/s even with `--fold` when any device on the bus is busy (`--fold` + only collapses truly empty frames). Unbounded HS captures reach GB fast. +- The output is valid pcapng the moment the process dies; a plain file path + works (no FIFO needed). `--trigger low|high|falling|rising` arms capture + on the external trigger pin instead of starting immediately. +- Tool diagnostics: `USB_SNIFFER_LOG=/tmp/sniffer.log usb_sniffer ...` + +Start the capture FIRST, then trigger the event you care about. The proven +one-pass enumeration recipe (`--limit` makes the tool exit by itself; on a +busy HS bus ~470k packets/s ≈ 20 MB/s, so 3M packets ≈ 6–7 s ≈ 120 MB — do +NOT capture for 20+ s "to be safe", the raw balloons and every later tshark +pass pays for it; but do NOT go below ~3M either: J-Link connect latency +varies run-to-run (0.5–4 s) and a 3 s window has provably missed the ladder): + +```bash +usb_sniffer --capture --fifo raw.pcapng --speed hs --fold --limit 3000000 & +sleep 1 +# trigger: full ladder incl. SET_ADDRESS (needs board lock; J-Link resets the MCU): +printf 'r\ng\nqc\n' | JLinkExe -device $JLINK_DEVICE -SelectEmuBySN \ + -if swd -speed 4000 -autoconnect 1 -nogui 1 +wait # tool prints "Capture limit reached" and exits +``` + +No-probe trigger alternative — kernel-side re-enumeration (may reuse the +xHCI address and skip parts of the ladder; fine for descriptor reads, weak +for reset timing): +`echo 0 | sudo tee /sys/bus/usb/devices//authorized; sleep 1; echo 1 | sudo tee ...` + +## Reading the capture + +```bash +tshark -r cap.pcapng -Y 'usb.bmRequestType' # the control ladder +tshark -r cap.pcapng -Y 'usb.bDescriptorType == 1' \ + -T fields -e usb.idVendor -e usb.idProduct # VID:PID off the wire +tshark -r cap.pcapng -Y 'usbll.pid' # raw token/handshake level +editcap -r cap.pcapng slice.pcapng - # trim huge captures +``` + +On a capture >100 MB, make exactly ONE filtered pass (the ladder filter +above) to find the frame numbers of your event window, `editcap -r` to that +window, and do all further analysis on the slice — repeated broad tshark +passes over a 300 MB raw are what turn a 5-minute job into 15. + +Find the DUT's wire address from the capture, not from lsusb: the +SET ADDRESS request payload carries it (`00 05 00 ...`), and all +subsequent traffic goes to `.` (`usbll.addr`). **On xHCI hosts the +lsusb device number is NOT the wire address** — they diverge routinely. +Filter analysis to the DUT: `-Y 'usbll.addr contains "4."'`. + +## What the wire really shows (read before concluding anything) + +- **Downstream is broadcast.** Tokens, SETUP and OUT data addressed to EVERY + device on the tapped bus segment appear in the capture; upstream (DATA in + response to IN) appears only from devices on the tapped branch. Lone + IN→ACK pairs without DATA to some other address are normal, not corruption. +- **The sniffer can capture its own upload.** If its capture port shares the + host controller bus with the tap, its bulk-IN polling floods the capture + (easily >90% of packets) — filter it out by address; for surgically clean + captures move the capture cable to a different host controller. +- **Port-reset visibility depends on the tap point.** Tapping the DUT's own + cable: a reset reaches the sniffer PHY and you get explicit + `--- Bus Reset ---` / `Detected speed:` Syslog records. Tapping a hub + upstream (current htpc wiring): the hub isolates the port reset — no + marker appears. Anchor reset timing on the hub choreography instead: + SetPortFeature(PORT_RESET) to the hub's address = reset start, + ClearPortFeature(C_PORT_RESET) = reset end (start the capture before + triggering, or the initiating SetPortFeature is missing from the file). + The DUT's silence gap corroborates, but do not read every gap as a + reset — idle captures contain benign multi-ms gaps. +- **FS device behind an HS hub**: the upstream tap shows SPLIT transactions, + not native FS packets. Tap the DUT's own cable and capture at `fs` for + clean full-speed traffic. + +## One-time setup (already done on htpc) + +udev rules (repo copy: `tools/88-tinyusb.rules` — the rig-only probe/analyzer +allowlist, distinct from the user-facing `examples/device/99-tinyusb-examples.rules`; +installed as `/etc/udev/rules.d/88-tinyusb.rules`; covers 6666:6620 + unconfigured +FX2LP 04b4:8613 along with the rig's other boards/probes), binary from upstream `bin/` to +`~/.local/bin/usb_sniffer`, extcap symlink into +`~/.local/lib/wireshark/extcap/`. Wireshark ≥4.x decodes the payloads. +The tool also has `--mcu-eeprom` / `--fpga-flash` / `--fpga-erase` firmware +commands: those are for bringing up NEW sniffer hardware — never run them +against the rig's working sniffer. + +## Warnings + +- **Bound every capture** (`timeout` / `--limit`) and delete or `editcap`-trim + multi-hundred-MB raws before handing off; a forgotten capture process fills + the disk at HS rates. +- The tap is passive — capturing, or unplugging the capture port, does not + disturb the DUT's link. Unplugging the pass-through DOES. +- Answers must come from packet payloads (SETUP/DATA hex), not from host-side + logs — that is the whole point of being on the wire; if an answer isn't in + the capture, say so rather than approximating from sysfs/dmesg. +- Release the board lock and leave no capture processes running at session + end (`pgrep -a usb_sniffer`). 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 diff --git a/examples/device/99-tinyusb-examples.rules b/examples/device/99-tinyusb-examples.rules new file mode 100644 index 000000000..e7a399345 --- /dev/null +++ b/examples/device/99-tinyusb-examples.rules @@ -0,0 +1,22 @@ +# udev rules for running the TinyUSB device examples as a non-root user. +# Copy this file to the location of your distribution's udev rules, for example on Ubuntu: +# sudo cp 99-tinyusb-examples.rules /etc/udev/rules.d/ +# Then reload udev configuration by executing: +# sudo udevadm control --reload-rules +# sudo udevadm trigger + +# Check SUBSYSTEM +SUBSYSTEMS=="hidraw", KERNEL=="hidraw*", MODE="0666", GROUP="dialout" + +# Rule applies to all TinyUSB example +ATTRS{idVendor}=="cafe", MODE="0666", GROUP="dialout" + +# Rule to blacklist TinyUSB example from being manipulated by ModemManager. +SUBSYSTEMS=="usb", ATTRS{idVendor}=="cafe", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Xplained Pro SamG55 Device +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" + +# TI Stellaris/Tiva-C Launchpad ICDI +SUBSYSTEM=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666" diff --git a/examples/device/99-tinyusb.rules b/examples/device/99-tinyusb.rules deleted file mode 100644 index d306bada5..000000000 --- a/examples/device/99-tinyusb.rules +++ /dev/null @@ -1,21 +0,0 @@ -# Copy this file to the location of your distribution's udev rules, for example on Ubuntu: -# sudo cp 99-tinyusb.rules /etc/udev/rules.d/ -# Then reload udev configuration by executing: -# sudo udevadm control --reload-rules -# sudo udevadm trigger - -# Check SUBSYSTEM -SUBSYSTEMS=="hidraw", KERNEL=="hidraw*", MODE="0666", GROUP="dialout" - -# Rule applies to all TinyUSB example -ATTRS{idVendor}=="cafe", MODE="0666", GROUP="dialout" - -# Rule to blacklist TinyUSB example from being manipulated by ModemManager. -SUBSYSTEMS=="usb", ATTRS{idVendor}=="cafe", ENV{ID_MM_DEVICE_IGNORE}="1" - -# Xplained Pro SamG55 Device -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" - -# TI Stellaris/Tiva-C Launchpad ICDI -SUBSYSTEM=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666" diff --git a/examples/device/webusb_serial/README.md b/examples/device/webusb_serial/README.md index 5ca70f909..15837e59e 100644 --- a/examples/device/webusb_serial/README.md +++ b/examples/device/webusb_serial/README.md @@ -51,4 +51,4 @@ make BOARD=raspberry_pi_pico all After flashing, open the landing page (`https://example.tinyusb.org/webusb-serial/index.html`) in a WebUSB-capable browser such as Chrome, click **Connect**, and select the device — the on-board LED lights solid once connected. Characters typed in the web page are echoed back, and are also mirrored to the CDC serial port (e.g. `/dev/ttyACM0`) and vice versa. -On Linux/macOS you may need to install the udev rules from `examples/device/99-tinyusb.rules` for the browser to access the device. +On Linux/macOS you may need to install the udev rules from `examples/device/99-tinyusb-examples.rules` for the browser to access the device. diff --git a/examples/device/webusb_serial/src/main.c b/examples/device/webusb_serial/src/main.c index 4be5e4db4..e200c334c 100644 --- a/examples/device/webusb_serial/src/main.c +++ b/examples/device/webusb_serial/src/main.c @@ -39,7 +39,7 @@ * is done automatically by firmware. * * - On Linux/macOS, udev permission may need to be updated by - * - copying '/examples/device/99-tinyusb.rules' file to /etc/udev/rules.d/ then + * - copying 'examples/device/99-tinyusb-examples.rules' file to /etc/udev/rules.d/ then * - run 'sudo udevadm control --reload-rules && sudo udevadm trigger' */ diff --git a/tools/88-tinyusb.rules b/tools/88-tinyusb.rules new file mode 100644 index 000000000..fedeb7468 --- /dev/null +++ b/tools/88-tinyusb.rules @@ -0,0 +1,93 @@ +# Copy this file to the location of your distribution's udev rules: +# Then reload udev configuration by executing: +# sudo cp 88-tinyusb.rules /etc/udev/rules.d/ && sudo udevadm control --reload-rules && sudo udevadm trigger + +# Check SUBSYSTEM +SUBSYSTEMS=="hidraw", KERNEL=="hidraw*", MODE="0666", GROUP="dialout" +SUBSYSTEM=="usbmon", MODE="0640", GROUP="wireshark" + +# Rule applies to all TinyUSB example +ATTRS{idVendor}=="cafe", MODE="0666", GROUP="dialout" + +# Rule to make Trinket/Pro Trinket/Gemma/Flora programmable without running Arduino as root. +# Tested with Ubuntu 14.04 and 12.04. Other distributions might need to update GROUP="dialout" +# to another group value like "users". +SUBSYSTEM=="usb", ATTRS{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout" + +# Rule to blacklist Adafruit USB CDC boards from being manipulated by ModemManager. +# Fixes issue with hanging references to /dev/ttyACM* devices on Ubuntu 15.04. +ATTRS{idVendor}=="239a", ENV{ID_MM_DEVICE_IGNORE}="1" + +# All Adafruit boards +ATTRS{idVendor}=="239a", MODE="0660", GROUP="adm" + +# All Espressif boards +ATTRS{idVendor}=="303a", MODE="0660", GROUP="adm" + +# All RaspberryPi boards +ATTRS{idVendor}=="2e8a", MODE="0660", GROUP="adm" + +# All NXP Boards +ATTRS{idVendor}=="1fc9", MODE="0660", GROUP="adm" + +# All ST +SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", GROUP="adm" + +# Rule to blacklist TinyUSB example from being manipulated by ModemManager. +SUBSYSTEMS=="usb", ATTRS{idVendor}=="cafe", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Xplained Pro SamG55 Device +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" + +# TI Stellaris/Tiva-C Launchpad ICDI +SUBSYSTEM=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666" + +# CMSIS-DAP, vendor = ARM +SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", MODE="666" + +# wch-link +SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="8010", GROUP="plugdev" +SUBSYSTEM=="usb", ATTR{idVendor}=="4348", ATTR{idProduct}=="55e0", GROUP="plugdev" +SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="8012", GROUP="plugdev" + +# Pxlogic +SUBSYSTEM=="usb", ATTRS{idVendor}=="2a0e", MODE="0666" +SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", MODE="0666" + +# Arduino Renesas +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" +# 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" +ATTR{idProduct}=="823b", ATTR{idVendor}=="045b", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTR{idProduct}=="823c", ATTR{idVendor}=="045b", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTR{idProduct}=="0250", ATTR{idVendor}=="045b", ENV{ID_MM_DEVICE_IGNORE}="1" + +#TI MSP430UIF +ATTRS{idVendor}=="2047",ATTRS{idProduct}=="0010",MODE="0666" +ATTRS{idVendor}=="2047",ATTRS{idProduct}=="0013",MODE="0666" +ATTRS{idVendor}=="2047",ATTRS{idProduct}=="0014",MODE="0666" +ATTRS{idVendor}=="2047",ATTRS{idProduct}=="0203",MODE="0666" +ATTRS{idVendor}=="2047",ATTRS{idProduct}=="0204",MODE="0666" +ATTRS{idVendor}=="0451",ATTRS{idProduct}=="f432",MODE="0666" + +# fomu +ATTRS{idVendor}=="1209",ATTRS{idProduct}=="5bf0",MODE="0666" + +# FTDI +ATTRS{idVendor}=="0403", MODE="0660", GROUP="adm" + +# Sipeed Slogic16 +SUBSYSTEM=="usb", ATTRS{idVendor}=="359f", MODE="0666", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + +# ataradov usb-sniffer (github.com/ataradov/usb-sniffer): programmed unit + blank FX2LP +ATTRS{idVendor}=="6666", ATTRS{idProduct}=="6620", MODE="0666" +ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="8613", MODE="0666" -- cgit v1.3.1