docs(changelog): Series-4 config decoding -- get_setup(), the 0x1A map, and one checksum rule

Folded into the existing Unreleased sections.

Added: MicromateClient.get_setup() (verified line by line against UM20147's
screen), micromate.setup_block.crc_ok() for 0x1A/0x08/0x2E, the config diff
harness, and the decoded setup in mm_client_check.

Changed: the 0x1A field map; channel blocks 4/5/6 are the active mic and two
stored mic setups; 0x1A reads the edit buffer and a load replaces it
byte-for-byte; the unit's own conversion constants (3.2808, 2.21); 0x08 is
preferences; the geophone scale confirmed from the unit's config; the 0x1C
sub-second tick; the never-write-modem-baud rule; two corrected 16-byte slips;
and the Series III anchor hypothesis, flagged inferred with no code change.

Fixed: the watcher overwriting previous sessions, and two stale bench-tool
labels.

Migration stays None -- additive modules only, no codec/store/DB change, no
TOOL_VERSION bump, no backfill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-10-19 18:41:35 -04:00
1 parent fa017b0ee7
commit 618fcb7770
1 file changed
+79
+79
View File
@@ -71,6 +71,14 @@ All notable changes to seismo-relay are documented here.
`*.bin`/`*.log`/`*.set` specifically — **not** `/bridges/s3-bridge/`, which
holds tracked source.
- **The Series-4 config watcher overwrote the previous session's snapshots.**
`scratch/mm_config_diff.py watch` saved every run as `watch-000…NNN`, so each
session silently replaced the last -- harmless while they were clock ticks,
data loss once they were findings. Labels are now `watch-MMDD-HHMM-NNN`.
- **`mm_client_check.py` carried two stale labels.** It still printed `0x06`
content[4:8] as "unexplained" (it is very likely the monitor-log count -- see
*Changed*) and announced UM20147 as "the FIRST 11.0BD unit this code has met".
### Added
- **Diagnostics tab in the SFM standalone webapp.** Surfaces the device
@@ -204,6 +212,31 @@ All notable changes to seismo-relay are documented here.
`scratch/mm_frame_parse.py` reads the pair unchanged.
⚠ Implements the **listener** path only. See *Changed* — there are two.
- **🔑 `MicromateClient.get_setup()` -- a Micromate's setup, decoded.** One `SUB
0x1A` read returns a `MicromateSetup`: record mode, sample rate, histogram
interval, pre-trigger, stop mode, record time, auto-stop, active sensors,
trigger sources, the three geophone trigger levels, mic type and (linear) mic
trigger, job number, scaled distance, and the four notes. **Measured fields
only** -- anything the reference grades inferred stays in `.raw`. A failed
checksum raises `SetupChecksumError` (a `ProtocolError`) unless `verify=False`;
a short block raises either way. The decode lives in the new pure module
`micromate/setup_block.py`.
**Verified on hardware:** against UM20147, every decoded value matched the
unit's own screen. 69 tests on 15 real reads (14 UM20147, one UM12947 cut from
Thor's 9-24 capture), with expected values taken from the operator's screen,
never from the decoder.
- **One checksum rule for three config blocks** -- `micromate.setup_block.crc_ok()`.
`content[0:2]` is a length N; a CRC-16/AUG-CCITT over `[0:N-2]` is stored at
`[N:N+2]`. Holds for `0x1A` (setup, 48 distinct states), `0x08` (preferences)
and `0x2E`; `0x2C` has none. Thor's `0x71` write omits it -- the unit computes
it -- so it is a read-side integrity check, not a write obligation.
- **`scratch/mm_config_diff.py`** -- the config diff harness (`volatile` / `snap`
/ `watch` / `diff`), read-only. An operator changes one setting on the unit's
own keypad while `watch` reports which bytes moved; this is how the map below
was built. Checks the CRC on every change to a checksummed block.
- **`bridges/mm_client_check.py` prints the decoded setup**, laid out to be
checked line by line against the unit's screen.
### Changed
- **Connecting to a unit no longer walks its event chain.** `/device/events`
@@ -371,6 +404,45 @@ All notable changes to seismo-relay are documented here.
- **`CLAUDE.md`'s "Where things stand" refreshed** — it still claimed `micromate/`
had no live client, and that the call-home was the only protocol unknown.
- **🔑 The Series-4 setup block (`0x1A`) is mapped.** Two keypad passes on
UM20147 (10-17, 10-19), every moved byte attributed to a setting the operator
named: record mode `[5]` (`01` Waveform, `02` Manual, `03` Histogram, `04`
Combo -- S3's codes), sample rate `[6:8]`, histogram interval `[8:10]`,
pre-trigger `[12:16]` (f32, **negative** seconds), stop mode `[17]`, record
time `[18:22]`, auto-stop `[23]`, active-sensor / trigger-source bitmasks
`[25]`/`[29]`, scaled distance `[30:38]`, report flags `[39]`, job number
`[40:42]`, notes from `[122]`, trigger level at channel `+30`. Full map and
grades in `docs/micromate_protocol_reference.md`.
- **⚠ The six channel blocks are three geophones, the ACTIVE mic, and two stored
mic setups.** Switching mic type copies block 5 or 6 into block 4. Reading
the mic from 5 or 6 describes a mic that is not fitted.
- **⚠ `0x1A` reads the keypad's edit buffer, live**, and a discard reverts it.
Loading a setup replaces the active config **byte-for-byte**; the setup name
is the only link to the file, and its spelling varies (`.MMB` after a keypad
save, `.mmb` after a load).
- **⚠ The unit converts units with its own constants**: distance ft ÷ 3.2808 to
metres, charge weight lb ÷ **2.21** to kg (not 2.20462). Convert back with
them or 45 lb reads 44.89. Scaled distance is computed for display, not stored.
- **`0x08` is the preferences block, not an event index.** Display units live
there (`content[31]`); switching them moves nothing in `0x1A`.
- **The geophone scale is in the unit's own config.** Channel `+24` reads
`3.1030800342559814`; ÷ 10,000 it equals `_GEO_LSB_IPS` to 1.1e-8 -- an
independent confirmation of a value previously pinned only statistically.
- **`0x1C` content[6] is a ~64 ms sub-second tick**, not a status byte -- read
once a second it aliases into a tidy-looking slow counter. A `0x1C` block is
never byte-identical to itself; compare named fields, never whole blocks.
- **⚠ Rule recorded: never write modem baud rate or modem type remotely.** The
remote link *is* the modem port; a mismatch strands the unit until a site
visit. (Baud is in none of the six blocks we read; nothing writes it.)
- **⚠ Corrected in the reference:** two 16-byte slips in the 9-24 write map --
note labels at `0x7A` (not `0x8A`), channel blocks from `0x6AC` (not `0x6BC`).
- **🔶 Series III, inferred only:** S3's 6-byte "stable anchor"
`be 80 00 00 00 00` sits exactly where Series IV keeps pre-trigger (−0.25 s)
and stop mode (Fixed). An S3 unit in **Auto** stop mode would lose it and
decode no mode / rate / interval / record time. Production is unaffected
(Blastware file ingest). Recorded in `instantel_protocol_reference.md`;
**no code changed** -- one Blastware capture in Auto mode settles it.
### Migration
**None.** No codec change, no waveform-store change, no DB or schema change,
@@ -398,6 +470,13 @@ can already send `0xA2` as the last step of its erase sequence; nothing yet
prevents a future shared path from confusing the two meanings. A guard is
outstanding.
The Series-4 config work adds **one new module**, `micromate/setup_block.py`
(pure, no I/O), a `MicromateSetup` dataclass in `micromate/models.py`, and
`MicromateClient.get_setup()`. All additive; nothing under `sfm/` or
`minimateplus/` changed, and nothing shipped calls the new code. **No codec,
store or DB change, no `TOOL_VERSION` bump, no backfill.** Its 15 test fixtures
are force-added under the gitignored `tests/fixtures/micromate-setup/`.
---
## v0.31.0 — 2026-09-18