A USB protocol analyzer is usually a box you buy, not a library you install. USBSnifferPIO_RP2040, an MIT-licensed Arduino library by Ângelo Moisés Alves, does the job on an RP2040 board such as the Raspberry Pi Pico. It passively captures USB 1.1 traffic at Low-Speed (1.5 Mbps) and Full-Speed (12 Mbps). The project isn't new: the GitHub repository was created on 2026-03-30. What's new is release v1.2.1, pushed on 2026-11-25. It finishes a move to dual-core decoding and fixes packets that were being dropped at buffer boundaries. The Adafruit blog covered the project on 2026-11-30, which brought it to a wider audience this week.

Every specification below comes from the project's own README, CHANGELOG and release notes unless another source is named.

What it does, and what it doesn't

The README describes the sniffer as a passive, high-impedance tap. It captures Low-Speed and Full-Speed USB traffic without interfering with the bus, and the README says the host and device never know the sniffer exists. Because it reads the D+ and D- lines directly, it records what crosses the cable rather than what a host program reports. The author's own benchmarks use Wireshark (via usbmon) on the host as the ground-truth count to compare against.

The scope is deliberately limited to USB 1.1 speeds: Low-Speed at 1.5 Mbps and Full-Speed at 12 Mbps. The README frames the project around USB HID protocol internals, PIO-based signal capture and hardware auditing. High-Speed (480 Mbps) traffic is outside the project's stated USB 1.1 scope.

An independent listing on OSRTOS, published April 28, 2026, says the hardware setup needs only a few 100 ohm series resistors between the Pico's GPIOs and the USB differential lines. The README's wiring diagram agrees on 100 Ω resistors, calls them mandatory, and warns not to connect VBUS (5 V) to the Pico. The OSRTOS listing describes an earlier version of the library: its architecture notes (a single DMA channel with manual restarts) no longer match the current README. Builders should treat the repository as the authoritative reference for wiring and configuration.

How the capture pipeline is built

The design spreads the work across the RP2040's PIO, DMA and both CPU cores, and that is why the project is interesting from an engineering point of view.

  • PIO front end: a hardware DPLL (digital phase-locked loop) written in 22 PIO instructions, running at 8x the bit rate. It uses one PIO state machine to recover bit timing from the incoming signal, so the clock recovery itself costs the CPU cores nothing.
  • DMA transport: two chained DMA channels ping-pong across four 8 KB ring buffers. The README describes a 0 ns gap between buffers, with an interrupt resetting the idle channel while the other one fills.
  • Decoder: an SRAM-resident decoder compiled at -O3. It handles NRZI decoding and bit-unstuffing, and checks CRC5 and CRC16 using lookup tables.
  • Idle handling: the README says the decoder skips all-J idle words in O(1) time, and the OSRTOS listing describes this as 0% CPU use while the bus is idle.
  • API: a callback interface delivers a USBPacket structure carrying the PID, address, endpoint and payload.

The README lists the resource budget as 1 PIO state machine, 2 DMA channels and about 35 KB of RAM. An optional Low-RAM mode (SNIFFER_DMA_BUF_WORDS=1024) brings that down to about 19 KB.

The OSRTOS listing from April describes a single DMA channel with manual restarts, where data could be at risk in the window while software re-arms the transfer. The current README describes two chained channels that hand off to each other in hardware. The v1.1.0 release notes, dated 2026-11-24, introduced the chained design.

The v1.2.x numbers

The CHANGELOG reports a hardware bench run on 2026-11-25 at a 200 MHz system clock with an -Os build, using a Raspberry Pi Pico 2 W as the packet generator and Wireshark as the reference. These are the author's own figures:

  • v1.2.1, dual-core: lost none of 183,913 packets with 2048-word buffers and none of 182,730 with 1024-word buffers (5 rounds each), with no CRC, SYNC, stuffing or overflow error. A confirmation run with the released sources also lost none of 109,640 and 73,005 packets.
  • v1.2.0, dual-core: lost 41 of 182,602 packets and 54 of 109,673. These are the buffer-boundary drops that v1.2.1 fixes.
  • Single-core at 200 MHz (v1.2.1): the README table shows 75% to 80% of Full-Speed packets captured from 10 to 5,000 packets per second, and 59.2% at about 10,000 packets per second.

The single-core figure is the most practical detail. At the default clock, one core can't decode Full-Speed traffic fast enough to keep up, and the README tells users to use dual-core mode for Full-Speed. In that mode Core 1 decodes the even DMA buffers and Core 0 decodes the odd ones, so both cores are busy with capture. Anyone planning to run a display driver, an SD-card logger or a USB-CDC uplink alongside it should plan for that, and the README has a coexistence guide for such cases. The zero-loss claim above is for the 200 MHz clock. The README also lists earlier v1.2.0 dual-core runs at 120 to 176 MHz, but those were measured against the host program's own packet count rather than Wireshark, and they show losses at the lower clocks, so we don't treat them as comparable.

The README says the current release requires arduino-pico 4.0 or later, the RP2040 Arduino core. The CHANGELOG notes that the library compiled on 4.0.0 and 6.3.1 but not on 3.9.5, which earlier README text had listed as supported.

Release status and where to get it

The library is available now as source code on GitHub under the MIT license. The latest tagged release is v1.2.1, dated 2026-11-25. Its Arduino Libraries index entry credits Ângelo Moisés Alves and lists the library as MIT-licensed, for the rp2040 architecture, in the Communication category. However, the index still shows 1.0.0 dated 2026-03-30 as its download. Anyone who wants the dual-core changes and the buffer-boundary fix should check which version their library manager actually installs, or install it from the repository.

The README also includes a legal disclaimer. It says the project is provided for educational purposes, authorized security research and legitimate hardware auditing, and asks users to use it only on devices they own or have written authorization to test.

What It Means for Makers

Who it's for: firmware developers writing USB device stacks on microcontrollers, people examining the protocol of a peripheral they own, educators who want to show NRZI encoding, bit-stuffing and CRCs on a real bus, and anyone debugging why a homemade HID device won't enumerate.

What it replaces or enables: for Low-Speed and Full-Speed work, OSRTOS positions it as an alternative to expensive protocol analyzers. It also works as a building block: because packets arrive through a callback as structured data (PID, address, endpoint, payload), a sketch can filter or react to specific transactions instead of only logging them. The architecture is also a documented case study in combining PIO, chained DMA and both cores on the RP2040.

What it doesn't do: High-Speed USB is outside its stated scope. According to the author's own numbers, single-core operation at 200 MHz captures only about 59% to 80% of Full-Speed packets.

Price and availability: the software is free and open source under the MIT license, available now on GitHub as v1.2.1 (2026-11-25). None of the sources lists a hardware kit or a price. The project runs on an RP2040 board, and the external wiring in the README is two 100 Ω series resistors, one per data line. The Arduino Libraries index currently lists only version 1.0.0.

Sources