fix(tooling): mm_client_check reported THOR's request count, not its own

The download line computed `size // 1024` -- THOR's chunk size -- while the
download used the 16 KB default.  So a 72,560 B event that took 5 requests was
printed as "71 chunks", and I nearly read a working 16 KB download as a broken
1 KB one.  A diagnostic that misreports what it did is worse than one that says
nothing.

Now prints the real count and the size used: "5 req @ 16384 B".

Verified by counting the frames in a capture of that run: 5 x SUB 0x5A at
offsets 0x4000 0x4000 0x4000 0x4000 0x1b70, summing to exactly 72,560.  That is
also the FIRST time the 16 KB chunk size has run through the real download loop
on hardware -- previously only the probe had issued 16 KB single requests, and
the loop itself had only been exercised at 1024 B against THOR's frames and at
16 KB against simulated responses.

Also recorded: USB identification for the Micromate's own ports.  Its PC port is
2504:0300 (Instantel Inc. MICROMATE COM PORT), appearing as CDC-ACM, against
0403 FTDI and 067b Prolific for the USB-A host-port cables.  Address it by
/dev/serial/by-id/ and not /dev/ttyACM<n>, because the number moves whenever
another CDC-ACM device appears -- which has already cost a session aimed at a
TMI-Seismo MCU by mistake.

And: passing one through to a Proxmox guest hot-plugs with no VM restart via
`qm set <vmid> -usb0 host=2504:0300`.  UM20147 is now on tmi-dev (10.0.0.44)
this way, which means the unit can be driven from the dev VM directly instead of
relaying commands.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ru8Lg9HkkYvX9VWWo65SmL
This commit is contained in:
serversdownandClaude Opus 5 committed 2026-10-14 12:46:01 -04:00
1 parent bdf4909d2a
commit 67de2c18da
2 files changed
+33 -4

No files matched your search

+22
View File
@@ -1662,6 +1662,28 @@ through a record-type discriminator (`0x2C` partial vs `0x46` full) *on its
event walk*, so partial records and events share one chain. Here the monitor
log has its own cursor and the event chain never sees it.
### USB identification — the Micromate's own ports
| device | VID:PID | appears as |
|---|---|---|
| **Micromate `PC` port (USB-B)** | **`2504:0300`** — *Instantel Inc. MICROMATE COM PORT* | `/dev/ttyACM*`, CDC-ACM |
| Sabrent cable (works on the USB-A host port) | `0403:*` — FTDI | `/dev/ttyUSB*` |
| Benfei cable (does **not** work) | `067b:*` — Prolific PL2303 | `/dev/ttyUSB*` |
⚠ **Address the unit by `/dev/serial/by-id/`, not `/dev/ttyACM<n>`.** The number
shifts whenever any other CDC-ACM device is plugged in, and this has already cost
a debugging session — the tool was aimed at a TMI-Seismo MCU and timed out
looking like a dead unit. The stable name is
`usb-Instantel_Inc._MICROMATE_COM_PORT_V1.00-if00`.
The `PC` port is a USB **device** port, so it is safe to plug and unplug freely.
The cold-boot requirement applies only to the USB-A **host** port, where the
modem cable goes.
**Passing one through to a Proxmox guest** works and hot-plugs, no VM restart:
`qm set <vmid> -usb0 host=2504:0300`. Bind by VID:PID rather than bus-port so it
survives a replug.
#### 🔑 Every response has an 11-byte prefix — and its length byte lies
**Content starts at `data[11]`.** One rule, every command.