Skip to main content

baudhound

Find the UART on an unknown board from a logic-analyzer capture.

You probed a row of unlabelled test pads with a cheap logic analyzer and power-cycled the target. baudhound reads the capture and tells you which channel is the serial console, its baud rate and frame format (data bits, parity, stop bits, polarity), and prints the decoded boot log with the interesting lines (U-Boot autoboot prompt, kernel command line, login prompt, root shell) highlighted.

  • Reads sigrok/PulseView .sr sessions, sigrok CSV, Saleae Logic 1/2 digital CSV and raw binary samples; any number of channels.
  • Estimates the baud rate from edge timing, snaps it to standard rates (300 to 4 000 000, including 74880, 250000, 921600 and 1500000) and reports non-standard rates as such.
  • Tries 8N1, 7E1, 8E1, 8O1 and 8N2, normal and inverted, and ranks the candidates with a confidence score.
  • Tells UART TX apart from RX, clocks (SPI SCK, I2C SCL, PWM), idle lines and unrelated activity.
  • Text report with wiring hints, or --json for scripts.
  • gen subcommand that synthesizes captures for testing and demos.

Wiring safety

A wrong connection can destroy the target or your analyzer. Before you probe:

  • Common ground. Connect the analyzer GND to the target GND first. Without a shared ground the readings are meaningless and the probes may see large voltages.
  • Voltage levels. Board UARTs run at 1.8 V, 3.3 V or 5 V. Measure the idle pad voltage with a multimeter first. Many cheap analyzers (the common 24 MHz 8-channel clones) accept 0 to 5 V and switch at about 1.4 V, which reads 3.3 V and 5 V logic fine but can be marginal on 1.8 V lines. Never connect anything to pads that carry more than your analyzer's rated input (RS-232 ports swing to +/-12 V).
  • Listen first. Capturing only needs the analyzer inputs. When you later connect a USB-UART adapter, connect its RX to the target TX and GND to GND; only connect the adapter TX to the target RX after confirming that the adapter's logic level matches the target (a 5 V adapter can damage a 1.8 V or 3.3 V SoC).
  • Do not power the target from the adapter unless you know the board's supply requirements; leave the adapter's VCC pin disconnected.

Install

Prebuilt binaries are published on PyPI for Linux (x86_64 and aarch64, glibc and musl), macOS (Apple Silicon and Intel) and Windows (x86_64), so no Rust toolchain is needed:

pipx install baudhound        # or: uv tool install baudhound, or pip install baudhound

hwntools installs it together with the other Reflex tools with pip install "hwntools[tools]".

To build from source with Cargo:

# latest version from GitHub (works today)
cargo install --locked --git https://github.com/reflex-hs/baudhound

# from crates.io (once published)
cargo install --locked baudhound

# from a checkout
cargo install --locked --path .

Building from source requires Rust 1.89 or newer.

Usage

Capture all candidate pads while the target boots (a sample rate of at least 8 times the highest expected baud rate is best; 4 times still works), save the session, then:

baudhound capture.sr                       # PulseView / sigrok session
baudhound export.csv                       # sigrok or Saleae CSV export
baudhound dump.bin --samplerate 24M        # raw samples (sigrok-cli -O binary)
baudhound dump.bin -s 24M --unitsize 2     # 16-channel raw samples
baudhound capture.sr -c D3 -c D4           # only some channels (name or index)
baudhound capture.sr --baud 115200 --framing 8N1   # skip detection
baudhound capture.sr --json > result.json
baudhound capture.sr --no-text             # summary only
baudhound capture.sr --max-text 0          # print the whole decoded log

baudhound scan <files> is the same as baudhound <files>.

Generating test captures

baudhound gen -o demo.sr                                  # 115200 8N1 boot log
baudhound gen -o demo.sr --rx-text $'root\n' --clock 250k --floating
baudhound gen -o fast.csv --format saleae-csv --baud 921600 --framing 7E1 --invert -s 8M
baudhound gen -o noisy.sr --jitter 0.1 --skew -0.02 --glitches 50
baudhound gen -o raw.bin --baud 1500000 -s 24M --text "hello"

D0 is the target RX (idle, or --rx-text keystrokes), D1 the target TX; --clock adds an SPI-like bursty clock and --floating a channel with random toggles. Output format follows the extension (.sr, .csv = sigrok CSV, .bin = raw) unless --format is given.

Sample output

$ baudhound gen -o demo.sr --rx-text $'root\n' --clock 250k --floating --jitter 0.05 --glitches 10
$ baudhound demo.sr --max-text 330 --top 2
== demo.sr (sigrok .sr): 4 channel(s), 1 MHz, 0.112 s

  CH  NAME  ROLE       SUMMARY
  0   D0    uart-rx    115200 8N1, conf 73%, 5 bytes, 0 errors (less traffic than the main UART: likely the target's RX (your keystrokes))
  1   D1    uart-tx    115200 8N1, conf 94%, 1144 bytes, 0 errors
  2   D2    clock      ~250 kHz, duty 50%: bursty clock: SPI SCK or I2C SCL?
  3   D3    unknown    223 edges: irregular activity that does not decode as UART; a clock is on D2, so this may be SPI/I2C data

-- D0 (uart-rx): 115200 baud 8N1, normal polarity
   confidence 73%   measured 114796 baud   bytes 5   errors 0
   candidates:
     1.   115200 8N1 normal   score  73.0%  errors   0.0%  printable 100%
     2.   115200 7E1 normal   score  73.0%  errors   0.0%  printable 100%
   decoded text:
   | root

-- D1 (uart-tx): 115200 baud 8N1, normal polarity
   confidence 94%   measured 115198 baud   bytes 1144   errors 0
   candidates:
     1.   115200 8N1 normal   score  93.9%  errors   0.0%  printable 100%
     2.   115200 7E1 normal   score  71.0%  errors  50.9%  printable 100%
   interesting:
     [uboot-banner] line 7: U-Boot 2020.04 (Mar 12 2024 - 10:21:07 +0000)
       -> U-Boot version banner
     [uboot-autoboot] line 17: Hit any key to stop autoboot:  0
       -> U-Boot autoboot countdown: press a key during it to reach the U-Boot shell
     [kernel-start] line 24: Starting kernel ...
       -> U-Boot is handing over to the kernel
     [kernel-cmdline] line 28: [    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=squashfs init=/linuxrc mtdparts=sfc:320K(boot),3072K(kernel),10M(rootfs)
       -> kernel command line: check console=, root=, init=, mtdparts=
     [login-prompt] line 34: ipcam login:
       -> login prompt: try default credentials
   decoded text:
   |
   | U-Boot SPL 2020.04 (Mar 12 2024 - 10:21:07 +0000)
   | DRAM: 128 MiB
   | Trying to boot from SPI
   ...
   ... truncated at 330 chars (use --max-text 0 for all)

Next steps:
  - connect your USB-UART adapter RX to D1 and GND to the target GND; terminal at 115200 8N1, e.g. `picocom -b 115200 /dev/ttyUSB0`
  - target RX is probably D0: connect your adapter TX there to send keystrokes
  - U-Boot autoboot countdown seen: press a key during it to get the U-Boot prompt
  - match the adapter's logic level to the target (1.8 V / 3.3 V / 5 V) before connecting TX

(Some findings are omitted above for brevity.) With --json the same data is emitted as a JSON document: per file, per channel role, edges, idle_high, uart (baud, standard, framing, inverted, score, measured baud, error counts), ranked candidates, clock, text and findings.

How it works

  1. Load. Every format is turned into per-channel edge lists (initial level plus toggle positions), so memory scales with activity rather than capture length. Timestamped CSVs use 1 ns ticks unless --samplerate is given.
  2. Classify clocks. If nearly all high and low pulses have the same width (allowing idle gaps between bursts), the channel is a clock and its frequency and duty cycle are reported.
  3. Estimate the bit period. Pulses far shorter than the median are dropped as glitches. The shortest well-populated width cluster gives a first estimate; it is then refined GCD-style, because every pulse inside a frame is an integer number of bits: bit = sum(width) / sum(round(width / bit)).
  4. Generate candidates. The raw rate and its nearest standard rate (and the same for half and a third of the rate, in case no single-bit pulse was seen) are each combined with 8N1, 7E1, 8E1, 8O1, 8N2 and both polarities.
  5. Decode and score. A receiver-style decoder samples each bit at its centre with a three-point majority vote. Each candidate is scored on the share of frames without framing/parity errors, how close in-frame edges sit to bit boundaries (a wrong baud rate scatters them), the printable-ASCII ratio, and agreement with the observed idle level. A transmitter slightly off a standard rate is reported at the standard rate along with the measured rate. 8N1 and 8N2 decode identically when bytes have gaps; 8N2 is reported when back-to-back frames are consistently 11 bits apart.
  6. Report. The busiest UART is labelled TX; other UARTs (usually echoed keystrokes) RX; an idle-high line next to a TX is suggested as the target's RX input.

Limitations

  • Only logic channels are read; analog channels in .sr files are ignored. DSView .dsl files are not supported yet.
  • A UART that only ever sends 0x55 (U) is a square wave and is reported as a clock.
  • Very short captures (a few bytes) cannot separate framings that decode the same bytes identically; the more common framing is preferred and the confidence is lowered.
  • Below about 3 samples per bit no decoding is attempted.
  • Writers used by gen support up to 8 channels.

License

Licensed under either of

at your option.

Copyright (c) 2026 Reflex Hardware Security.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Metadata

Release files for baudhound 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for baudhound 0.1.0
File Size Uploaded Provenance Actions
baudhound-0.1.0.tar.gz 54.5 kB With provenance Details for baudhound-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for baudhound 0.1.0
File Actions
baudhound-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for baudhound-0.1.0-py3-none-win_amd64.whl
baudhound-0.1.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for baudhound-0.1.0-py3-none-musllinux_1_2_x86_64.whl
baudhound-0.1.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for baudhound-0.1.0-py3-none-musllinux_1_2_aarch64.whl
baudhound-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for baudhound-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
baudhound-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for baudhound-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
baudhound-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for baudhound-0.1.0-py3-none-macosx_11_0_arm64.whl
baudhound-0.1.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for baudhound-0.1.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 5.2 MB

Release files / baudhound-0.1.0.tar.gz

Download URL baudhound-0.1.0.tar.gz
Size 54.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7c3a621cc43af44c3055006904066881e1443af3cc427c9215c413d5e6381740
BLAKE2b-256 checksum
How to use checksums
9fd807ce648dbfd441392aa20884c7dbc006b28d0829e810cebbf397672bf02a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / baudhound-0.1.0-py3-none-win_amd64.whl

Download URL baudhound-0.1.0-py3-none-win_amd64.whl
Size 698.0 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
269e41169b3adc2a40cded18761c4c91091cddd240933f19730fe6636f64c99a
BLAKE2b-256 checksum
How to use checksums
e8fc24e2f48b782a5346a30e072e66182b9bb91ac6c73e8e2fbe4df4a9533387
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / baudhound-0.1.0-py3-none-musllinux_1_2_x86_64.whl

Download URL baudhound-0.1.0-py3-none-musllinux_1_2_x86_64.whl
Size 793.5 kB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
8f6f078bc2aa599611675f68f620d132d12d897a16aa7b594b6dfa1e554c5500
BLAKE2b-256 checksum
How to use checksums
19dec4cbe4660a843a821afb8d877c672129766d493d13834ed349badc9a4842
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / baudhound-0.1.0-py3-none-musllinux_1_2_aarch64.whl

Download URL baudhound-0.1.0-py3-none-musllinux_1_2_aarch64.whl
Size 761.6 kB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
667c21aca8dbfa62ae3eee6e70a02bf7438fd95dccdadead1a29b1a8c7622005
BLAKE2b-256 checksum
How to use checksums
842f0fb14a111307f29f7d1f5c4f803bf37b23db73d4750559bb83a4e37a2593
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / baudhound-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL baudhound-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 744.8 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9fed6a012d892db543496e2ff2fb7c0cf6a187cea8185f93110403a19b195be5
BLAKE2b-256 checksum
How to use checksums
710651148924838cee245b2c673980901651ce09632f4c87da8138fdd5ef68c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / baudhound-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL baudhound-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 718.7 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f73d7b46e7bae58974c311d8574343c0b3a60ed66ab63bfde41d10e1340c6d56
BLAKE2b-256 checksum
How to use checksums
988ee216de2152a1353fe062b4631458a1f97c8fa723543ef22a846205a838fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / baudhound-0.1.0-py3-none-macosx_11_0_arm64.whl

Download URL baudhound-0.1.0-py3-none-macosx_11_0_arm64.whl
Size 689.6 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7ab429b1d65311bc0440a17f15cc5dc11097b29cf3191c5dd20ffb04f1afa0c5
BLAKE2b-256 checksum
How to use checksums
d2bebb725e35295ef44eebdb9083f2af2f22412daeefbf55acb7cb77e1cb87c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / baudhound-0.1.0-py3-none-macosx_10_12_x86_64.whl

Download URL baudhound-0.1.0-py3-none-macosx_10_12_x86_64.whl
Size 718.7 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
caa1c32510980a271c6edb3fa4e157ecc3e650edb0b09f28674689288fcba494
BLAKE2b-256 checksum
How to use checksums
c9213c132d86c8da94f9a6abe633afc922e1d05fffbc35270fc779d415bc2b7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for baudhound 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for baudhound-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

8 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page