Skip to main content

diagtui

Part of the cellular diag* toolkit: start there for how the capture/decode pieces fit together.

A terminal app for people who know cellular modems: pick a modem plugged into this computer, read its details, download its qdb, and record DIAG logs while you reproduce a problem.

diagtui is only a screen. Everything it does is an ordinary Python function in the diagmunge, diaggrok and diaggulp packages, which a script can call directly without diagtui.

Install

pip install diagtui
diagtui            # open the screen
diagtui --resume   # reopen the modem and item you were on

It needs Python 3.11 or newer and runs on Linux. macOS support, through a DIAG serial bridge, has not been tried on a real Mac yet. Reading a modem's ports usually needs root or membership of the group that owns the serial devices (dialout on most Linux systems).

What it does

  • Finds modems on USB and PCIe and probes each serial port with read-only queries (AT, a DIAG version request, NMEA sentences) to learn what it is. A port that does not answer gets nothing more.
  • Reads the modem's details: identity, SIM state, registration, signal. Raw answers are shown after their meaning, e.g. registered, roaming [0,5].
  • Downloads the qdb: every file the modem's DIAG file server offers. The qdb is what turns the modem's terse debug messages into text.
  • Records DIAG logs with a preset: everything, signalling only, signalling plus debug messages (often ten times the size), debug messages only, or GNSS. When a capture stops, the logging it turned on inside the modem is turned back off and checked. While logging, it shows the data rate, free disk space and the time left, and it stops a capture before the disk fills.
  • Checks a finished capture: which log codes and versions it holds, and which of them the installed decoders can read.

Everything is saved under ~/diagtui/<Vendor>_<Model>_<serial>/<session>/ (set DIAGTUI_HOME to change it), including an activity log of what was done.

How it looks

A dark, keyboard-only screen in the style of an old DOS utility: arrow keys, Enter, Esc and letter keys; one tree from modems to what each modem has; the commands on the bottom line. Nothing asks a question away from the cursor, and slow work shows its progress in place.

Tests

pip install "diagtui[test]"
pytest

The tests use fake serial ports and fake device trees; no modem is needed.

License

Apache-2.0. See LICENSE and NOTICE.

Metadata

Release files for diagtui 2026.11.28

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

Source distribution (sdist)

Source distribution for diagtui 2026.11.28
File Size Uploaded Provenance Actions
diagtui-2026.11.28.tar.gz 55.7 kB Without provenance Details for diagtui-2026.11.28.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for diagtui 2026.11.28
File Interpreter ABI Platform Actions
diagtui-2026.11.28-py3-none-any.whl Python 3 none any Details for diagtui-2026.11.28-py3-none-any.whl

Total release size: 99.0 kB

Release files / diagtui-2026.11.28.tar.gz

Download URL diagtui-2026.11.28.tar.gz
Size 55.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dd61018c4b1abf8f41fb0297bd5a407c476e07d7c0b83eaf09df786b3d45270d
BLAKE2b-256 checksum
How to use checksums
671c070e8494f15d95ec2fa5e1cf5a7c1f689bd2f5992119890ebb2bfd752306
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / diagtui-2026.11.28-py3-none-any.whl

Download URL diagtui-2026.11.28-py3-none-any.whl
Size 43.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9eaac82ca3ccc5d1e45ec925b383837ca17703209d17528b3c508540c330e3b7
BLAKE2b-256 checksum
How to use checksums
41d2cc7ef3bb865e464d1b0492c183157578ca1358044009fe3c4dba0f06720d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for diagtui 2026.11.28

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

2026.11.28 This release

2 release files No 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