Release v0.32.0 — event times you can trust, and Series 4 mapped #54

Merged
serversdown merged 124 commits from dev into main 2026-10-27 11:01:01 -04:00
Showing only changes of commit 90ac7ff76a - Show all commits
+88 -1
View File
@@ -2308,7 +2308,94 @@ events (already solved — `0x08`/`0x1E`/`0x0A`/`0x5A`), keep our own high-water
mark, and *optionally* erase. **The erase opcodes are the only genuinely missing
piece**, and they remain on the unsafe list.
### ✅ OBSERVED 2026-10-14 — THOR's ACH side, and it is POLL
### 🔑🔑 SOLVED 2026-10-14 — call-home is an IN-BAND WAKE SIGNAL, not a dial-out
From THOR's own ACH log (1.5.0.29, 4,414 lines, UM12947 over an RX55). **This
overturns the model this document has carried since the beginning**, and it
explains every confusing result of the preceding weeks.
**A Micromate does not dial anybody.** It emits the ASCII string `RADIO RING`
over its serial port, and that text travels up a TCP connection **the server
already has open to the unit**. The server recognises it and starts a session
*on that same connection*.
```
17:18:17,268 TcpClientSystemNet #1: RADIO RING IS RECEIVED FROM IP:63.45.161.30 and Port:9034
17:18:17,268 ListenerAchRadioRing #2 RADIO RING IS DETECTED BY Serial ListenerAchRadioRing
17:18:17,304 ConnectorWorkerThread Process Request: ReadSerialNumber <- who is this?
17:18:18,489 ListenerAchRadioRing #3 RADIO RING UNIT SERIAL NUMBER = UM12947
17:18:18,490 ListenerAchRadioRing #4 NOTIFICATION IS SENT TO ACH MANAGER
17:18:18,499 ACHManager #8 RADIO RING STARTED A NEW SESSION
```
⚠ **`TcpClientSystemNet` is THOR's outbound TCP *client*.** The ring arrives on
the connection THOR itself opened to `unit:9034` — the ordinary call-*up* path.
There is no inbound connection, no dial, nothing to accept.
**THOR keeps that connection alive deliberately.** `UnitWatchDogTimer` reconnects
to every unit continuously — 1,039 lines of it in 37 minutes. The call-home
mechanism depends on that connection existing.
#### THOR has a second, unused ACH path
`ListenerAchTcp` logs `Waiting for a ACH connection on :: Port 12346` — and in
4,414 lines **it never accepted one**. All twelve ACH events came through
`ListenerAchRadioRing`. So the inbound-TCP ACH listener exists (presumably for
units that genuinely dial, on some other modem arrangement) but is not what a
PAD-connected Micromate uses.
#### What this means for a homebrew receiver
⚠ **`bridges/mm_ach_server.py` is built on the wrong model for this deployment.**
It listens for an inbound connection, which is `ListenerAchTcp`'s model — the one
THOR never exercises here. The right shape is:
1. **Hold an outbound connection to each unit** (`unit:9034`), reconnecting as
needed — this is a poller, not a listener
2. **Watch the byte stream for `RADIO RING`**
3. On seeing it, identify the unit (THOR sends `ReadSerialNumber`) and run an
ordinary session on the same socket
That also explains the single-session contention that dogged every experiment:
**the receiver must hold the modem's one session slot permanently**, so anything
else probing that unit will be met with silence. Those are not separate
problems; holding the slot *is* the design.
#### The ACH session, from THOR's state machine
```
InitializeState ReadEventRecordCount, ReadOperatingMode
CheckEventsCount
DownloadEventState ReadUnitACHStatus, ReadEventAddressFirst/Next,
SaveEventByAddress
DownloadMonitorLogState ReadMonitorLogRecordCount
DownloadScheduler
SetDateTimeState
DeleteEventState / DeleteAllEventsState / DeleteMonitorLogState
CheckEventWhileMonitoringBeforeEndingState / ...AfterDownloadingState
LoopState
EndWithSuccessState / EndWithCommunicationErrorState / EndState
```
Request counts over the log: `ReadUnitACHStatus` 53, `SaveEventByAddress` 47,
`ReadEventAddressNext` 43, `ReadOperatingMode` 10, `ReadEventRecordCount` 10,
`ReadEventAddressFirst` 4, `StartMonitoringAfterCallhome` 3,
`ReadMonitorLogRecordCount` 3.
`StartMonitoringAfterCallhome` matches the firmware string
`CMD_EXIT_CALL_HOME_DELETE_EVENTS_START_MONITORING` found by static analysis in
September — independent corroboration that the unit resumes monitoring when the
server finishes.
✅ **`ReadEventRecordCount` returned `Event count: 19`** — corroborating the
`SUB 0x06` event-count finding from a completely different direction.
⚠ Events are addressed as `90000001` here (`length: 4076`), where the chain walk
we implemented returns `055d4a81` for an event of exactly that length. Same
event, different address space — unexplained, and worth care before assuming our
keys and THOR's addresses are interchangeable.
### Superseded 2026-10-14 — "THOR's ACH side is POLL"
First capture of THOR's half of a Micromate call-home, via `ach_mitm.py` between
UM12947's modem and a THOR 1.5.0.29 ACH server on port 8070.