Files
courier-emu/artifacts/dial-timing-01
Cryan209andClaude Opus 5 6b8d9a1671 The board says a digit period is exactly twice S11, and the chain runs at 536 Hz
artifacts/dial-timing-01, on the 20.16 MHz board. Blind-dial 4 to 40 digits, time
each to the result code, take the slope: every term but n*(tone+gap) is constant
in n, so the overhead never has to be known.

    S11 50   100.12 ms a digit   intercept 4024.3 ms
    S11 70   140.05 ms a digit   intercept 4023.7 ms
    S11 95   190.09 ms a digit   intercept 4024.7 ms

1.999 ms per S11 unit through a 0.1 ms intercept, and the fixed term holds to
1 ms across all three - the one number that must not move, and does not. So a
digit period is exactly 2 x S11: tone and gap are each S11 milliseconds, which
is S11's documented job, now measured instead of assumed.

That replaces the assumption the previous commit flagged as its weakest point.
The harness at 391 Hz took 2.739 ms per unit, 1.370x too slow, so the chain runs
at 536 Hz and MODELLED_FRAME_HZ is now that. At it the tone is 70.2 ms against
the board's 70.0 - right to 0.3% - and 302 still dials 6245 to ringback and
answer, with 117 DTMF blocks against 136. 403 plain is unchanged.

The gap does not come right with it, and is now isolated as its own fault: 56.9
ms against the board's 70.0, because the harness loads 28.4 interrupt periods
for the gap against 36.6 for the tone where the board makes them equal. No
choice of --frame-hz fixes that; it is the same clock counting a different
number, and it is the next thing to find.

2401/536 is 4.48. Whole dividers either side are ruled out by this data - 4
needs 2.006 ms per unit and 5 needs 2.230 against 1.999 measured - but 9/2 is a
strange thing for a gate array to do, and the honest reading is that one of the
two rates is not measured as exactly as it looks: the 2,401 rests on a 6.61 s
wall-clock window that includes the host's own write and abort. Both constants
stay separate rather than being reconciled into one.

dial_timing also grew a reopen: the USB serial device dropped mid-run on the
first attempt, one dial in, with the node still present and the modem answering
AT immediately after. A dropped dial now reopens, restores the volatile
settings and retries once, and a dial that fails twice is recorded and skipped
rather than ending the sweep.

44 tests green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-09 09:19:44 +12:00
..