Skip to main content

rpi-hwid — Raspberry Pi hardware identity

PyPI CI License

What is this Raspberry Pi wearing, what powers it, and what is soldered to it? rpi-hwid answers from the Pi itself, out of evidence the firmware and kernel already expose but nothing collects: HAT ID EEPROMs (including the ones the firmware never reads), the Pi 5's own verdict on its USB-C supply, the PMIC's input and RTC-cell voltages, the fan header, the USB tree, and which network interfaces are soldered down.

Around that probe: separate modules for an FPGA board (NeTV2, Acorn, Arty) or a Tiny Tapeout demo board attached to the Pi; a collector that runs the lot over ssh across a fleet, one JSON document per host; and a label generator that turns those documents into sticker sheets carrying only what cannot change — serial numbers, MAC addresses, Device DNA. The same probe runs unchanged on an Orange Pi PC.

The labels

rpi-hwid labels --data DIR --out labels.pdf lays out 63.5 × 38.1 mm labels, 21 to an A4 sheet (the Avery L7160 grid), from a directory of collected documents. Every label carries only what cannot change, and every identifier that might otherwise be typed is also a QR code. Cropped from a rendered sheet:

Pi 5, bare header
Pi 5, bare header
Pi 5 wearing a Waveshare PoE M.2 HAT+ (B); its radio is disabled so the wlan MAC cannot be read
Pi 5 with a Waveshare PoE M.2 HAT+ (B); the radio is disabled, so no wlan MAC
Pi 4 with a Digilent Pmod HAT Adaptor
Pi 4 with a Digilent Pmod HAT Adaptor
Pi 3B+; the wlan MAC is derived from the eth MAC
Pi 3B+; the wlan MAC is derived from the eth MAC
Pi Zero W with the Waveshare PoE-ETH-USB-HUB-HAT; the bonnet's RTL8152 is its eth MAC
Pi Zero W with the Waveshare PoE-ETH-USB-HUB-HAT; the bonnet's RTL8152 is its eth MAC
Orange Pi PC; eth MAC derived by U-Boot from the SoC serial, no radio
Orange Pi PC; eth MAC derived by U-Boot from the SoC serial, no radio
NeTV2
NeTV2, carrying the Device DNA and the name derived from it
Arty A7-35T
Arty A7-35T, with its Digilent serial and flash part
Acorn CLE-215+, DNA not yet read
Acorn CLE-215+, with a line to write the DNA on: it has not been read yet
TT06 chip on a TT06+ demo board
TT06 chip on a TT06+ demo board
TTIHP25a chip on a DBv3 demo board; no colours recorded for that shuttle yet
TTIHP25a on a DBv3 demo board; no colours recorded for that shuttle yet
ASIX AX88179 USB 3.0 gigabit adapter
ASIX AX88179 USB 3.0 gigabit adapter

Print at 100 % — "fit to page" shrinks the grid and every label lands off its sticker. The layouts band by band, the other options, the derived board names and the artwork are in docs/LABELS.md.

Install

uv tool install 'rpi-hwid[labels]'     # everything, including the label generator
pip install rpi-hwid                   # probe, collector, names: no dependencies at all

Or as a Debian package on Raspberry Pi OS or Debian bookworm, trixie or sid, from the signed apt repository at https://mith.ro/rpi-hwid/ (the page has the three-line setup for each suite):

sudo apt install python3-rpi-hwid      # provides the rpi-hwid command

Nothing needs installing on the Pi being probed. The probe is one dependency-free file that runs on any python3 3.5 or later, so it can be sent over ssh on stdin:

ssh pi@host 'python3 -' < src/rpi_hwid/probe.py
ssh pi@host 'python3 - --json' < src/rpi_hwid/probe.py

On the Pi it wants i2c-tools and passwordless sudo (for i2cdetect, i2ctransfer, dtparam and vcgencmd). Without them it still reports what it can.

Quick start

A Pi 5 powered through a PoE splitter, with a USB Ethernet adapter:

$ rpi-hwid probe
Raspberry Pi 5 Model B Rev 1.0  serial d88100008543dc30  rev c04170
  header : nothing identifiable on the header
  signal : USB-C as the firmware sees it: max_current 900 mA, no PD contract; 5 V input 4.83 V
  signal : fan header: disabled
  signal : RTC battery: none (0.00 V)
  signal : power port: throttled=0x0
  power  : external supply on USB-C advertising 900 mA by resistor: a PoE splitter or a USB-A lead
  onboard: eth    2c:cf:67:16:bd:98  macb
  onboard: wlan   2c:cf:67:16:bd:99  brcmfmac
  usb net: 0b95:1790 ASIX Elec. Corp. AX88179  00:0e:c6:82:b5:e1  ethernet

Revision codes decode offline, on any machine:

$ rpi-hwid revision c04170 9000c1 a020d3
c04170: Raspberry Pi 5, 4 GB, Rev 1.0, BCM2712
9000c1: Raspberry Pi Zero W, 512 MB, Rev 1.1, BCM2835
a020d3: Raspberry Pi 3 Model B+, 1 GB, Rev 1.3, BCM2837

The commands

rpi-hwid probe [--json] [--fpga] [--jtag] [--flash] [--tinytapeout]
                                                      on a Pi: what is this?
rpi-hwid fpga [--json] [--jtag] [--flash]             on a Pi: which FPGA board?
rpi-hwid tinytapeout [--json] [--no-repl]             on a Pi: which Tiny Tapeout board?
rpi-hwid collect --out DIR [-J JUMP] [--fpga] [--tinytapeout] HOST…
                                                      over ssh: one JSON per host
rpi-hwid labels --data DIR --out labels.pdf           print-ready labels from that data
rpi-hwid name --netv2 DNA… | --arty SERIAL…           the derived board names
rpi-hwid revision CODE…                               decode Pi revision codes

Reference

  • docs/PROBE.md — what each signal proves, how the power verdict is reached, the Orange Pi, and the FPGA and Tiny Tapeout modules.
  • docs/COLLECT.md — collecting a fleet over ssh, the JSON document the rest of the package consumes, and reading it from Python.
  • docs/LABELS.md — the derived names, the five label layouts, the label options and the artwork.
  • docs/DEVELOPING.md — contributor notes.
  • RELEASING.md — how a version reaches PyPI and apt.

Development

uv sync --all-extras --group dev
uv run ruff check && uv run mypy && uv run pytest

The rest — the Python 3.5 rule for the probe files, what the tests need installed, regenerating the images, building the Debian package — is in docs/DEVELOPING.md, and how a version reaches PyPI and apt is in RELEASING.md.

Origin

Worked out on a fleet of Pi Zero W, 3B+, 4 and 5 hosts carrying NeTV2, Acorn and Arty boards, powered by a mix of Waveshare PoE HATs and external PoE splitters, plus Orange Pi PCs on the welland.fpgas.online pool, in September 2026. The rules above are what those boards showed; a board that behaves differently is a bug report. The Tiny Tapeout module was written from the SDK's public sources (tt-micropython-firmware, tt-demo-pcb, tt-support-tools) and tested against an emulated board; a report from a real demo board is welcome.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpi_hwid-0.0.post66.tar.gz (891.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rpi_hwid-0.0.post66-py3-none-any.whl (144.6 kB view details)

Uploaded Python 3

File details

Details for the file rpi_hwid-0.0.post66.tar.gz.

File metadata

  • Download URL: rpi_hwid-0.0.post66.tar.gz
  • Upload date:
  • Size: 891.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rpi_hwid-0.0.post66.tar.gz
Algorithm Hash digest
SHA256 bc8d3cf55f12d56887c901e8758d3b396e57ef29e50fb00554a643a8fba38566
MD5 034839f15543ca7a53dcbf8f0ab7ba19
BLAKE2b-256 d2acd429d2da3339d56700ef118765ef52cfdbf057e4319d1a66fa08038a31e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpi_hwid-0.0.post66.tar.gz:

Publisher: publish-pypi.yml on mithro/rpi-hwid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rpi_hwid-0.0.post66-py3-none-any.whl.

File metadata

  • Download URL: rpi_hwid-0.0.post66-py3-none-any.whl
  • Upload date:
  • Size: 144.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rpi_hwid-0.0.post66-py3-none-any.whl
Algorithm Hash digest
SHA256 92612d595a0dda08c62e614482731f0f29854d19b1fe8ff7f25dd2574f9c994a
MD5 fa7549ed2699724e6973bf10bd5a24e7
BLAKE2b-256 91fb5c28c3dad32272aff1468500c7a8874b4ca2244e870d889fbffd1b35442f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpi_hwid-0.0.post66-py3-none-any.whl:

Publisher: publish-pypi.yml on mithro/rpi-hwid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.post66 This release

2 files

0.0.post64

2 files

0.0.post62

2 files

0.0.post60

2 files

0.0.post55

2 files

0.0.post53

2 files

0.0.post51

2 files

0.0.post49

2 files

0.0.post47

2 files

0.0.post40

2 files

0.0.post30

2 files

0.0.post23

2 files

0.0.post19

2 files

0.0.post18

2 files

0.0.post17

2 files

0.0.post16

2 files

0.0.post13

2 files

0.0.post11

2 files

0.0.post9

2 files

0.0.post5

2 files

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