diff --git a/CHANGELOG.md b/CHANGELOG.md index a48da84..6bb286a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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