Repository navigation
Releases
Releases · lukejenkins/diagmunge
diagmunge 2026.11.8
diagmunge 2026.11.8, the first release on PyPI: pip install diagmunge (extras: serial, libusb, decode, munge). The PyPI version is the same code as this tag.
Packaging
- The
decodeandmungeextras depend ondiaggrok>=2026.11.8from PyPI instead of a pinned git URL. Mixed installs no longer fail withResolutionImpossible. - The PyPI page carries the README, license and project links.
Changes
DiagClient.unlock_spc()sendsDIAG_SPC_F(0x41). It used to sendDIAG_PASSWORD_F(0x46), which answers success to any body, so aTruemeant nothing. 0x41 checks the code:Truenow means the modem accepted it.diagmunge-capture-dlfruns under the read-only request guard after its SPC step, so the capture itself cannot send a write-class request.- GSMTAP and EARFCNs of 16384 and up. GSMTAP v2's
arfcnfield is 14 bits with two flag bits above it. Band 41 EARFCNs used to set the PCS flag, and band 66/71 EARFCNs became channel 0. The header now gets 0 for any EARFCN of 16384+, and the full value rides onGsmtapFrame.earfcn. diagmunge-dlf-to-pcapwrites pcapng when the output path ends in.pcapng, with a per-packetearfcn=<n>comment that Wireshark shows and filters on. Classic.pcapoutput is unchanged.diagmunge-dlf-to-pcapsays when timestamps are synthetic: one stderr line when the capture holds no usable GNSS time anchor, instead of a pcap that looks calibrated.- One warning per DGE1 sequence gap per ingest, not one per stream-walking pass.
diagmunge 2026.10.31
diagmunge 2026.10.31. The decode and munge extras now pin diaggrok v2026.10.31.
New
diagmunge.diag_source, a pcap-native DIAG record source:open_diag_source,iter_dge1_payloads,open_f3_sourceanditer_packets_from_source. It reads DGE1-over-UDP pcap / pcapng captures (optionally.zst, single file or an ordered multi-part set) and yields DIAG records carrying both the modem clock and the host wire-arrival time. It moved here from diaggrok, because it is built on diagmunge's DGE1 transport, so diaggrok no longer depends on diagmunge at all. It needs diaggrok (thedecode/mungeextra), and reads capture files with diaggulp's container reader. It is whatdiaggulp --pcapreplay uses.- Opt-in read-only request guard.
DiagClient(..., guard="read_only")(or settingclient.guardafter a factory built the client) checks every request before a byte reaches the modem, and refuses write-class requests (memory poke, password, EFS write sub-commands and other write subsystems) withDiagRequestRefused. Survey, NV-scan and dump tools can make "read-only" a property of the transport.
Fixes
DiagClient.from_libusbreattaches the kernel driver it detached when the client closes, so a modem that also has a working tty keeps it after a libusb session.- F3 runtime-mask readback understands the 3-byte-header
GET_RT_MASKreply some SDX72 / SDX62 parts send. Read with the long header it lost the range's first SSID and read a single-SSID range as empty, so a mask restore drifted. diagmunge-hdlc-to-dlfnames an F3 extractor only when one is installed; otherwise it says to keep the raw HDLC capture.diagmunge-dlf-to-pcapgets GNSS-calibrated frame timestamps from the capture's own0x1476fixes, now that diaggrokv2026.10.31shipsts64_cal. A capture with no valid fix still falls back to a synthetic clock.
Install
pip install "diagmunge @ git+https://github.com/lukejenkins/diagmunge@v2026.10.31"
pip install "diagmunge[munge] @ git+https://github.com/lukejenkins/diagmunge@v2026.10.31"Install at a tag, not @main: pip compares direct-URL requirements by string, so @main in the same command as a tool pinning @v2026.10.31 fails to resolve. The README explains this.