sigrok / PulseView
Open-source logic-analyser stack: capture digital signals with sigrok-cli or PulseView, then decode the edges into UART, SPI, I2C, or JTAG bytes.
sigrok / PulseView is an open-source logic-analyser stack. sigrok-cli is the command-line front end and PulseView is the GUI; both capture raw digital signals from a logic analyser and run protocol decoders that turn edges into readable UART, SPI, I2C, or JTAG traffic. It is the bridge between "there are wires on this board" and "here are the bytes on them."
What it is
A logic analyser samples a set of digital lines at a fixed rate and records whether each was high or low at every sample. sigrok is the capture-and-decode software behind that hardware. It drives dozens of devices, from cheap FX2-based 8-channel clones (fx2lafw) to higher-end kit, into a common capture format, then layers stacked decoders on top. The decoders are the real value: instead of eyeballing a waveform, you tell it "this is UART at 115200 on channel 0" and it prints the ASCII, or "this is SPI" and it prints the MOSI/MISO bytes.
Why it matters
On a hardware target the interesting traffic is on the board, not on a network. A debug UART, an SPI flash being read at boot, an I2C EEPROM holding config, a JTAG scan chain, all of it is just edges on a pin until you decode it. sigrok lets you confirm what an unlabelled header actually is, recover the baud rate of a silent console, watch what a flash chip streams out during power-on, and capture the exact bytes for offline analysis. Finding the debug UART and sniffing an SPI flash in-circuit are both classic sigrok jobs.
How to use it
sigrok-cli -d fx2lafw --scan # confirm the analyser is seen
sigrok-cli -d fx2lafw --samples 1M -c samplerate=4mhz -o cap.sr # capture 1M samples at 4 MHz
sigrok-cli -i cap.sr -P uart:baudrate=115200:rx=0 -A uart # decode UART on channel 0
sigrok-cli -i cap.sr -P spi:clk=1:mosi=0 -A spi # decode SPI from a capture
The GUI workflow mirrors this: capture in PulseView, then add a decoder from the toolbar and set its parameters (baud, clock channel, chip-select). When you do not know the baud rate, capture a burst of console output and let PulseView's UART decoder auto-hint from the shortest pulse, or bisect the common rates. Decoders stack: run an I2C decoder to get the byte stream, then put an EEPROM decoder on top of it to see addresses and page reads as structured records.
Pitfalls
- Undersampling aliases edges. Sample at least 4x the signal's fastest clock; an SPI flash at 20 MHz needs well above 80 MSa/s, which cheap FX2 clones cannot reach.
- No shared ground, no valid capture. Always tie the analyser's GND to the target's GND before probing, or you read noise.
- The decoder parameters must match reality. A wrong baud, an inverted line, or the wrong channel mapping produces plausible-looking garbage. Verify one known byte first.
- Cheap 8-channel FX2 analysers top out around 24 MSa/s in practice. For fast buses you need a faster analyser, not more channels.
What it pairs with
sigrok tells you which lines carry what and at what rate; you then act on that with the right tool. A confirmed UART goes to picocom/screen or emon for an interactive console. A mapped SPI flash goes to a flashrom/CH341A read. A live JTAG scan chain goes to openocd. The captures themselves are plain files you can archive and re-decode later.