4 Commits
Author SHA1 Message Date
serversdownandClaude Opus 5 8f67608e0f feat(micromate): answer a RADIO RING the way THOR does -- SERIAL, immediately
THOR's ACH log exposed two differences between what it does on seeing a ring and
what we were doing, and either could explain why the unit never answered us:

              | ours              | THOR
  command     | POLL (0x5B)       | ReadSerialNumber (0x15)
  delay       | 8 s (grace window)| 36 ms

We sat silent for the whole grace window and then asked a different question.
The unit may well have given up long before we spoke.

So the grace window now ENDS THE MOMENT a RING is seen, and the ring is answered
with SERIAL first -- which is THOR identifying which unit rang before doing
anything else.  The push-vs-pull experiment the window was built for is
unaffected: silence still runs the full duration.

This does not change the bigger finding that mm_ach_server is built on the wrong
model for a PAD-connected unit -- THOR's working path is a POLLER holding an
outbound connection, not a listener.  But if a unit whose modem dials out can be
made to answer on the inbound path too, that is worth knowing before the rewrite,
and it costs two small changes to find out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ru8Lg9HkkYvX9VWWo65SmL
2026-10-14 18:12:14 -04:00
serversdownandClaude Opus 5 3fa2a4035e fix(micromate): the ACH server now names modem chatter, and flushes its output
Three things the first real call-in exposed.  UM12947's modem dialled in at
14:16:56 from 63.45.161.30 -- the network path works -- and sent 60 bytes of
"RADIO RING", space-padded and newline-separated, four times.

1. THAT IS MODEM CHATTER, NOT THE UNIT, and the server left it as a hex dump to
   interpret by hand.  CLAUDE.md already records that an RV50/RV55 "sends
   \r\nRING\r\n\r\nCONNECT\r\n over TCP to the caller even with Quiet Mode
   enabled"; an RX55 on AirLink OS says RADIO RING instead.  The server now
   recognises the known modem strings and says so.

   ⚠ The diagnostic value is in what was MISSING: four RINGs and NO CONNECT.
   RING means the modem is ringing the serial device, CONNECT means something
   answered.  Rings without a connect, plus no answer to POLL, means TCP is fine
   and the unit is not on the other end of the serial link.  The server now
   prints that conclusion and the three things to check -- cabled at all, cable
   chipset (FTDI/CDC-ACM only, never Prolific), and a cold boot with the cable
   attached, since the USB-A host port only enumerates at power-on.

2. STDOUT WAS BLOCK-BUFFERED.  With output redirected, every print sat in a
   buffer, so the log read EMPTY while a call was in progress and the session was
   only discoverable on disk afterwards.  For a tool whose whole job is to be
   watched during a one-shot event, that is close to useless.  Line-buffered now.

3. THE DOCSTRING PROMISED SCANNERS LEAVE NO TRACE ON DISK, AND THEY DID.  The
   failed-handshake path created a session directory unconditionally -- my own
   loopback sanity check produced one.  Now a connection that sends nothing AND
   fails the handshake is discarded with no directory; one that sent something
   unprompted is always kept, because that is the interesting case.

Also recorded in session.json: modem_chatter, ring_count and a diagnosis string,
so a session can be triaged without re-reading the raw bytes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ru8Lg9HkkYvX9VWWo65SmL
2026-10-14 14:21:42 -04:00
serversdownandClaude Opus 5 bdf4909d2a docs(series4): no Micromate has ever been observed calling home
Correcting an implication I made.  The 72 ach_inbound_* sessions in
bridges/captures/ are MiniMate Plus, and I framed the Series III ACH setup as
though it transfers to a Micromate.  It is not known to.

What we actually have for Series IV is prior, not observation:

- THOR manual 6.2 and the firmware's own strings
  (CMD_EXIT_CALL_HOME_DELETE_EVENTS_START_MONITORING, "Call Home Deleting
  Events") say the unit dials in and waits to be told what to do -- server-driven,
  the same shape as Series III's pull model.
- UM12947's 0x2C dial string reads literally "RADIO RING", which is modem ANSWER
  vocabulary rather than a destination.  With the RV50 debug string
  ATQ1 ATE0 ATS0=2 ... RADIO RING -- ATS0=2 being auto-answer-after-2-rings --
  that reads as the unit arranging to ACCEPT calls, i.e. the call-UP path.  Which
  argues the ACH destination lives in the modem, as it does for series III.

If both priors hold, mm_ach_server.py is just MicromateClient on an inbound
socket and the unknown evaporates.  But there is a specific failure mode worth
naming in advance:

THE MICROMATE DEMONSTRABLY TALKS AT TO ITS MODEM.  If it drives an AT dial for
call-home, that exchange happens on the SERIAL LINK and a TCP listener sees none
of it.  So the first experiment has an AMBIGUOUS NULL -- no connection could mean
the trigger did not fire, or that the interesting part is invisible from the
network.  The escalation is a serial-level capture between unit and modem, not
more fiddling with the server.

Recorded in both the protocol reference and the server's own docstring, so
whoever runs the experiment reads the caveat before being puzzled by a silence.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ru8Lg9HkkYvX9VWWo65SmL
2026-10-03 01:54:31 -04:00
serversdownandClaude Opus 5 4579896b6d feat(micromate): inbound ACH server -- and the push-vs-pull experiment
The inbound call-home session is the last unmapped part of the Series IV
protocol, and it may well not be a separate protocol at all.  Series III's
answer, from the 72 ach_inbound_* sessions on disk, is that the unit DIALS IN AND
THEN WAITS: ach_server.py accepts the socket, wraps it in SocketTransport ->
MiniMateClient, runs the ordinary handshake and drives with the ordinary command
set.  If Series IV behaves the same way, this file is just MicromateClient
attached to an inbound socket.

THE ONE QUESTION THAT MATTERS IS PUSH VS PULL, and no packet capture can answer
it -- you have to connect and keep quiet.  So the server says NOTHING for --grace
seconds after accepting.  Bytes in that window mean the unit speaks first, and it
reports the hex, the ASCII, and whether they parse as a response frame (series III
sends an "Operating System" banner on cold boot, so a banner is the likely shape).
Silence means pull, and the normal handshake follows.

READ-ONLY, and deliberately more so than its series III sibling: that one has
"rescue actions" that stop monitoring and disable ACH on a runaway unit, and
those are absent here.  No command has ever been originated against a unit by
this project, and an inbound session is the worst place to break that.  --depth
defaults to walking the event chain WITHOUT downloading.

Captures land as raw_bw_*/raw_s3_* so scratch/mm_frame_parse.py reads the pair
with no arguments, plus a session.json recording what was learned -- including
the push flag, which is the result worth keeping.  The session directory is
created only after the handshake succeeds, so a port scanner leaves nothing on
disk.

Smoke-tested both paths against a fake unit that dials in: PULL detected over
silence and driven to a full chain walk (33 frames, 0 bad checksums, parses with
the existing tool), and PUSH detected from a 10-byte banner with the frame-parse
attempt reported honestly as "none parsed".

Worth recording for the setup: for series III the call-home DESTINATION lived in
the MODEM's config (ACEmanager), not in the seismograph.  If that holds for the
RX55 then nothing on the instrument needs changing, which keeps the no-writes
line intact.  If it has to come from the unit, its 0x2C block holds a 40-byte
dial string -- and writing that is THOR's job, not ours.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ru8Lg9HkkYvX9VWWo65SmL
2026-10-03 01:25:53 -04:00