7.7 KiB
7.7 KiB
Changelog
All notable changes to seismo-relay are documented here.
v0.6.0 — 2026-04-02
Added
- True event-time metadata via SUB 5A bulk waveform stream —
get_events()now issues a SUB 5A request after each SUB 0C download, reads the A5 response frames, and extracts theClient:,User Name:, andSeis Loc:fields as they existed at the moment the event was recorded. Previously these fields were backfilled from the current compliance config (SUB 1A), which reflects today's setup, not the setup active when the event triggered.build_5a_frame(offset_word, raw_params)inframing.py— reproduces Blastware's exact wire format for SUB 5A requests: raw (non-DLE-stuffed)offset_hi, DLE-stuffed params, and a DLE-aware checksum where10 XXpairs count onlyXX.bulk_waveform_params()returns 11 bytes (extra trailing0x00confirmed from 1-2-26 BW wire capture).read_bulk_waveform_stream(key4, *, stop_after_metadata=True, max_chunks=32)inprotocol.py— loops sending chunk requests (counter increments0x0400per chunk), stops early whenb"Project:"is found, then sends a termination frame._decode_a5_metadata_into(frames_data, event)inclient.py— needle-searches A5 frame data forProject:,Client:,User Name:,Seis Loc:,Extended Notesand overwritesevent.project_info.
get_events()sequence extended — now1E → 0A → 0C → 5A → 1Fper event.
Fixed
- Compliance config (SUB 1A) channel block missing — orphaned
self._send(build_bw_frame(SUB_COMPLIANCE, 0x2A, _DATA_PARAMS))before the B/C/D receive loop had no correspondingrecv_one(), shifting all subsequent receives one step behind and leaving frame D's channel-block data (trigger_level_geo, alarm_level_geo, max_range_geo) unread. Removed the orphaned send. Total config bytes received now correctly ~2126 (was ~1071). - Compliance config anchor search range —
_decode_compliance_config_into()searchedcfg[40:100]for the sample-rate/record-time anchor. With the orphaned-send bug fixed the 44-byte padding it had been adding is gone, and the anchor now appears atcfg[11]. Search widened tocfg[0:150]to be robust to future layout shifts. - Removed byte-content deduplication from
read_compliance_config()— was masking the real receive-ordering bug.
Protocol / Documentation
- SUB 5A frame format confirmed —
offset_hibyte (0x10) must be sent raw (not DLE-stuffed); checksum is DLE-aware (only the second byte of a10 XXpair is summed). Standardbuild_bw_frameDLE-stuffs0x10incorrectly for 5A — a dedicatedbuild_5a_frameis required. - Event-time metadata source confirmed —
Client:,User Name:, andSeis Loc:strings are present in A5 frame 7 of the bulk waveform stream (SUB 5A), not in the 210-byte SUB 0C waveform record. They reflect the compliance setup as it was when the event was stored on the device.
v0.5.0 — 2026-03-31
Added
- Console tab in
seismo_lab.py— direct device connection without the bridge subprocess.- Serial and TCP transport selectable via radio buttons.
- Four one-click commands: POLL, Serial #, Full Config, Event Index.
- Colour-coded scrolling output: TX (blue), RX raw hex (teal), parsed/decoded (green), errors (red).
- Save Log and Send to Analyzer buttons; logs auto-saved to
bridges/captures/console_<ts>.log. - Queue/
after(100)pattern — no UI blocking or performance impact.
minimatepluspackage — clean Python client library for the MiniMate Plus S3 protocol.SerialTransportandTcpTransport(for Sierra Wireless RV50/RV55 cellular modems).MiniMateProtocol— DLE frame parser/builder, two-step paged reads, checksum validation.MiniMateClient— high-level client:connect(),get_serial(),get_config(),get_events().
- TCP/cellular transport (
TcpTransport) — connect to field units via Sierra Wireless RV50/RV55 modems over cellular.read_until_idle(idle_gap=1.5s)to handle modem data-forwarding buffer delay.- Confirmed working end-to-end: TCP → RV50/RV55 → RS-232 → MiniMate Plus.
bridges/tcp_serial_bridge.py— local TCP-to-serial bridge for bench testingTcpTransportwithout a cellular modem.- SFM REST server (
sfm/server.py) — FastAPI server with device info, event list, and event record endpoints over both serial and TCP.
Fixed
protocol.pystartup()was using a hardcodedPOLL_RECV_TIMEOUT = 10.0constant, ignoring the configurableself._recv_timeout. Fixed to useself._recv_timeoutthroughout.sfm/server.pynow retries once onProtocolErrorfor TCP connections to handle cold-boot timing on first connect.
Protocol / Documentation
- Sierra Wireless RV50/RV55 modem config — confirmed required ACEmanager settings: Quiet Mode = Enable, Data Forwarding Timeout = 1, TCP Connect Response Delay = 0. Quiet Mode disabled causes modem to inject
RING\r\nCONNECT\r\nonto the serial line, breaking the S3 handshake. - Calibration year confirmed at SUB FE (Full Config) destuffed payload offset 0x56–0x57 (uint16 BE).
0x07E7= 2023,0x07E9= 2025. "Operating System"boot string — 16-byte UART boot message captured on cold-start before unit enters DLE-framed mode. Parser handles correctly by scanning for DLE+STX.- RV50/RV55 sends
RING/CONNECTover TCP to the calling client even with Quiet Mode enabled — this is normal behaviour, parser discards it.
v0.4.0 — 2026-03-12
Added
seismo_lab.py— combined Bridge + Analyzer GUI. Single window with two tabs; bridge start auto-wires live mode in the Analyzer.frame_db.py— SQLite frame database. Captures accumulate over time; Query DB tab searches across all sessions.bridges/s3-bridge/proxy.py— bridge proxy module.- Large BW→S3 write frame checksum algorithm confirmed and implemented (
SUM8of payload[2:-1]skipping0x10bytes, plus constant0x10, mod 256). - SUB
A4identified as composite container frame with embedded inner frames;_extract_a4_inner_frames()and_diff_a4_payloads()reduce diff noise from 2300 → 17 meaningful entries.
Fixed
- BAD CHK false positives on BW POLL frames — BW frame terminator
03 41was being included in the de-stuffed payload. Fixed to strip correctly. - Aux Trigger read location confirmed at SUB FE offset
0x0109.
v0.3.0 — 2026-03-09
Added
- Record time confirmed at SUB E5 page2 offset
+0x28as float32 BE. - Trigger Sample Width confirmed at BW→S3 write frame SUB
0x82, destuffed payload offset[22]. - Mode-gating documented: several settings only appear on the wire when the appropriate mode is active.
Fixed
0x082Amystery resolved — fixed-size E5 payload length (2090 bytes), not a record-time field.
v0.2.0 — 2026-03-01
Added
- Channel config float layout fully confirmed: trigger level, alarm level, and unit string per channel (IEEE 754 BE floats).
- Blastware
.setfile format decoded — little-endian binary struct mirroring the wire payload. - Operator manual (716U0101 Rev 15) added as cross-reference source.
v0.1.0 — 2026-02-26
Added
- Initial
s3_bridge.pyserial bridge — transparent RS-232 tap between Blastware and MiniMate Plus. s3_parser.py— deterministic DLE state machine frame extractor.s3_analyzer.py— session parser, frame differ, Claude export.gui_bridge.pyandgui_analyzer.py— Tkinter GUIs.- DLE framing confirmed:
DLE+STX/DLE+ETX,0x41= ACK (not STX), DLE stuffing rule. - Response SUB rule confirmed:
response_SUB = 0xFF - request_SUB. - Year
0x07CB= 1995 confirmed as MiniMate factory RTC default. - Full write command family documented (SUBs
68–83).