Extend Courier firmware, line transport, and diagnostics

Add captured 3453 flash boot and modem data-path support, a local browser
console, and an Apple USB Modem line backend. Improve I-modem and Quad
firmware timing, UART framing, and SIP/RTP media handling.

Include regression tests, compact hardware evidence, and documentation
for the measured link behavior. Keep pytest discovery scoped to tests/.
This commit is contained in:
Cryan209 committed 2026-11-23 12:17:28 +13:00
1 parent f1ccd929fa
commit d138dc27b5
430 files changed
+66403 -636

No files matched your search

+233 -8
View File
@@ -1,5 +1,74 @@
# Courier XMF emulator harness
The captured **3453 B/C and C normal firmware and bootmodem now boot and answer
AT commands**. The loader accepts split bootmodem transfers and private 1 MiB
whole-flash images; `--power-on` executes the real reset loader and its CRC checks,
`--firmware-mode` selects a direct entry, and the guest `ATZ!!` handlers switch modes. See [3453 flash boot](docs/3453-flash-boot.md) for commands,
regression evidence and hardware-model limitations. This does not establish
working V.92 negotiation.
Two unchanged B/C peers now exchange distinct **32-byte ASCII payloads exactly
in both directions over native Bell-103 PCM**, after an explicit terminal typing
delay. A single-sided external DTR drop also produces genuine `NO CARRIER` on
both peers and on-hook cleanup. See the [3453 data-path evidence](artifacts/3453-bell103-data-path-20261015/README.md)
for the original firmware, register/IRQ fixes, and limits of this control.
An experimental [Apple USB Modem line backend](docs/apple-usb-line.md) now
streams real hardware PCM directly at the Courier codec grid, with USB hook/ring
control and verified native polling. Corrected unity output gain lets the ATA
collect full extension numbers: Asterisk now routes 6312/6313 and records them
answered. Native 7200 Hz, rate-retune and reset-continuity probes also pass.
A physical-line call into a SIP-backed Courier-emu I-modem now exchanges
**180-byte ASCII payloads exactly both ways at 9600 bps with V.32/LAPM**, using
required error correction and an explicit 200-ms SIP reserve. See the
[advanced modem controls](artifacts/apple-advanced-sip/README.md), including the
earlier [Bell 103 control](artifacts/apple-courier-sip/bell103-fair-clock-180-buffer200/README.md).
Normal-mode calls still expose corruption; sustained reliability and V.34
operation remain unresolved. A subsequent [original-driver hook fix](docs/apple-firmware-hook-fix.md)
replaces host-timed raw-register seizure with the Apple firmware hook command.
Two fresh V.32/LAPM calls pass with timestamp-aware RTP playout (200-ms deadline
plus the 200-ms bearer reserve), zero active USB/playout losses, and identical
RTP packets/payloads at simultaneous local and PBX capture points. Protection
remains enabled; the older intermittent network loss is not claimed repaired.
The new [sustained binary/ASCII validator](docs/apple-sustained-traffic.md) exposes
long asymmetric stalls beyond those short messages. Real firmware diagnostics
show substantial LAPM block errors, retransmissions and a retrain; 20-second
controls fail despite unchanged observed RTP forwarding. Sustained reliability
is **not fixed**, and no 60-second binary soak is claimed passing. The follow-up
adds phase-specific media telemetry, explicit physical release before reporting,
and an opt-in asynchronous USB status monitor; a captured control verifies clean
transport/shutdown while the modem traffic stall still fails acceptance.
The [7910 training diagnosis](docs/apple-7910-training.md) decodes actual
V.90 requests/V.34 fallback and correlates packet-sized Apple RX corruption
with **ATA-reported incoming RTP loss**, despite clean PBX forwarding.
Restoring VLAN-70 IGMP querying stopped the multicast flood; one unchanged call
now reaches **CONNECT 19200/V34/LAPM**, with zero loss in eight ATA RTCP reports.
V.90 and sustained throughput remain unqualified. Ordered mailbox recording is
preserved across DSP reset.
A separate [Linux I-modem call to RasFinder 6312](docs/imodem-rasfinder-v90-20261025.md)
now reaches **CONNECT 49333/ARQ/V90/LAPM**, delivers the readable MULTITECH
login prompt, and reports **12000/49333** in ATI6. It uses a 230400-bps saved
DTE profile, S54=0, 200-ms media buffers, and an opt-in paced native live poller
in an isolated vmhost container. The [live timing correction](docs/imodem-v90-live-timing-fix-20261025.md)
fixes a wrong native DSP clock rate and supervisor catch-up that triggered the
firmware IRQ13 watchdog, while preserving port-read protections. The later
[UART starvation correction](docs/imodem-v90-uart-starvation-fix-20261025.md)
completes **60-second idle/banner holds followed by ten ATI6 queries on both
6312 and 6313**, both at 49333/V90/LAPM, with zero TX rebuffers or RX loss
across the complete sessions and no watchdog abort. A subsequent
[receive-latency improvement](docs/imodem-v90-faster-return-path-20261025.md)
adds `--bri-sip-tx-buffer-ms`: keeping a 200-ms TX reserve while reducing RX
reserves to 20 ms plus 40-ms RTP delay qualified **31200/49333 on 6312 and
28800/49333 on 6313**, again with clean 60-second holds and ten ATI6 queries.
These are I-modem receive/transmit rates; it is the digital V.90 endpoint,
so the improved return direction uses V.34 and the 49333 direction is its
PCM transmit direction. The low-delay preset requires a low-jitter path and
host CPU headroom; conservative defaults remain unchanged. Sustained payload
throughput and long-run repeatability are not certified. ATI6's
half-scale call time is traced to firmware arithmetic. These are not Apple USB
results; the live scheduler remains experimental and disabled by default.
The I-modem's AT interface answers. `isdn-run` now models the 386EX SIO's
receive side - RBR, IIR, MSR and the IRQ3 line its own ISR at `0xb2aa2`
names - so commands can be typed at the firmware and its replies read back:
@@ -23,7 +92,23 @@ The [I-modem/analogue Courier pair](docs/imodem-analog-pair.md) establishes
native Bell 103 carrier at 300 bps and transfers terminal data in both
directions with the paired probe's `--protocol bell103` preset. The I-modem's
six-word ASIC data window and acknowledgements now carry the payload through
the original DSP firmware. V.34 carrier remains unresolved.
the original DSP firmware. The later [analog UART starvation fix](docs/imodem-v34-uart-starvation-fix-20261026.md)
passes repeated 20-second **512-byte ASCII payload** duplex gates at
14400/21600 V.34/LAPM and a **60-second 14400 V.34/LAPM** gate, with zero
reported UART overruns, BLERs, retransmissions or link timeouts. It corrects
RX/TX request coupling, serial request ordering and zero-time TX completion.
The [x2 follow-up](docs/imodem-x2-s39-headroom-20261027.md) traces the
upstream CRC failure to the captured profile's invalid S39=0 transmit level.
Explicit `--analog-tx-level 8` removes the dominant upstream corruption and
permits one 20-second 52000/x2 duplex pass, but other calls—including a
60-second run—still stall downstream. The [downstream boundary trace](docs/imodem-x2-downstream-output-boundary-20261027.md)
finds an FCS-valid frame before analog DSP HDLC processing with three octets
missing from its host-bank output. A true 53333 ceiling and finer service
cadences still fail; one corrected call also has a residual upstream BLER.
The [IRQ/lane follow-up](docs/imodem-x2-irq-lanes-20261027.md) confirms an actual
48000/x2 CONNECT and output loss merging two valid input frames. Finer interrupt
polling improves delivery but still fails; 53333 is not a hard-coded rate limit.
**Sustained x2 and arbitrary-binary throughput remain unqualified.**
The captured 20.16 MHz DSP boot ROM is now integrated for the 302/403
firmware under `--with-dsp`. The DSP executes reset and downloads its resident
@@ -166,6 +251,117 @@ The DSP area is a segmented program image rather than one flat load:
| `0x0eea4..0x101ff` | `de83..e830` | service overlay; entry at `de89` |
| `0x10200..0x1b5df` | `8000..d9ef` | resident high bank |
## Browser GUI
```sh
./courier gui
```
Opens a local browser interface with firmware selection, start/stop controls,
an AT-command console, live front-panel LEDs, transcript download, and worker diagnostics. It uses the
existing CLI workers and adds no dependencies. XMF and ROM images use the analog
console; NAC images use the ISDN terminal. External analog backends and
non-disconnected simulated lines enable DSP automatically. For a disconnected
simulated line, **Enable DSP** is optional.
The analog panel displays live AA, CD, OH, MR, CS, SYN, and ARQ/FAX states
from the emulator's existing latch model. Bright red means on, dark red means
off, and a grey `?` means unknown. HS, RD, and SD are not mapped yet and remain
unknown; NAC/ISDN sessions do not currently provide panel telemetry. Stopped
sessions show an idle panel rather than stale lit LEDs. The terminal's **Text
display** defaults to **8-bit text (Latin-1)**, preserving all eight bits.
**7-bit text (strip parity, opt-in)** is available for inspecting a known 7E1
stream, but masking the display is not a fix for UART framing. Separately, the
GUI now defaults the actual **DTE format** to **8N1**: its byte-oriented attention
adapter publishes the selected format to the firmware's active setting when AT
is accepted, after startup/profile loading. `ATI4` therefore reports
`PARITY=N WORDLEN=8` (spacing varies). Choose **Preserve stored framing** under
Analog board settings to leave that setting untouched. This does not emulate
raw-pin autobaud timing or replace other EEPROM settings.
This changes only the display and Save transcript conversion, not the firmware's
UART settings or transmitted input; original console bytes remain in the bounded
session buffer, so switching views also works on existing output. Binary terminal
sessions are not exposed yet.
The GUI lists `.xmf`, `.rom`, and `.nac` files directly in the current directory.
Use `./courier gui --directory /path/to/firmware --port 8765 --no-browser` to
choose another directory or suppress automatic browser launch. The server binds
only to `127.0.0.1`; Ctrl-C stops the server and its emulator session. Closing
the browser does not stop the modem. Terminal and diagnostic history are each
limited to the latest 200,000 characters.
### Calling from the GUI
Choose a **Connection** before starting an analog XMF/ROM modem:
| Connection | Configuration | What it connects to |
| --- | --- | --- |
| Simulated analog line | Disconnected, quiet, dial tone, or ringing | Local line state only; no external calls |
| SIP / PBX | Server, username, password (or environment fallback), optional destination URI template, G.711 codec and local ports | Outgoing UDP/IPv4 SIP INVITE and RTP through the existing SIP backend |
| Another emulator | UNIX socket path, Listen/Connect role, matching PCM-only setting | A separately running local emulator |
| Physical line | Apple helper path, sample rate, transmit gain and explicit hardware confirmation | Experimental macOS Apple A1082 USB modem FXO bridge |
Once the firmware is ready, enter the number and click **Dial · ATDT**. **Answer ·
ATA** answers at the modem, not at the SIP signaling layer; incoming SIP calls
are not exposed by these controls. These buttons send real serial commands and
do not manufacture modem results. In online data mode, first use **Escape · +++**,
wait for the firmware's `OK`, then **Hang up · ATH**. Escape sends no carriage
return and pauses terminal input for the selected guard on each side. Increase
the guard if you changed S12. `ATH` itself is not an out-of-band disconnect.
Use **Stop** to end the worker session rather than send another command.
**SIP:** select SIP / PBX and fill in the server, username, and masked password
field. The entered password applies to that start only and takes precedence over
the environment fallback. It is passed to the child through its environment,
never command-line arguments; it is not saved to disk, returned in API state,
or included in diagnostics. The field clears after a successful start, so
re-enter it for the next session. This is a localhost interface, not a remote
credential-management service.
Alternatively, leave the password blank to use `COURIER_SIP_PASSWORD` (or another
inherited variable named in the fallback field), set before launching the GUI:
```sh
export COURIER_SIP_PASSWORD='your-password'
./courier gui
```
A target such as
`sip:{number}@{server}` substitutes the dialed number and configured server.
This minimal analog backend does not REGISTER; use a PBX that accepts direct
INVITEs, optionally with Digest authentication. SIP/RTP success alone is not a
trained modem connection.
**Peer:** launch a second server with `./courier gui --port 8766`. Two tabs of the
same server share one modem, so use separate server ports. On both, choose the
same short socket path (for example `/tmp/courier-gui-line.sock`); use Listen on
one and Connect on the other. Start both within 30 seconds. Socket role does not
choose caller/answerer: dial on one and use Answer on the other. PCM-only is the
GUI default and must match both ends; it disables modeled training/carrier
events and supplies no generated dial tone (`ATX0` may be needed before dialing).
Unchecking it enables the existing modeled call helpers, not proof of DSP-only
training. A stopped listener may leave its socket behind: choose a fresh path
or remove the stale socket **only after both workers stop**. The GUI never
unlinks an existing path automatically.
**Physical:** see [Apple USB Modem line backend](docs/apple-usb-line.md) for
building `.build/apple_line`, macOS audio permissions, hardware selection, and
qualified firmware/settings. This is not a generic USB/serial modem driver.
Connect the A1082 FXO to a powered FXS/PBX analog line, not directly to another
unpowered modem. Dial may place a real, billable call; the GUI requires explicit
confirmation each start. **Analog board settings** exposes board ID, EEPROM
fixture, DTE format and tick source. For the documented captured 4.03 setup, use its ROM
directory with `--directory`, board 7, `idsdl403`, and the default timer. Do not
apply that fixture to unrelated firmware. Stop first requests normal console
cleanup; helper safety messages and final on-hook readback appear in Worker
diagnostics. A forced shutdown or failed readback requires checking the line
and, if necessary, unplugging the modem; a host crash cannot guarantee release.
These controls expose existing backends, not new DSP capability. `main211.xmf`
completes idle ATI11 but still has known call-training limitations. Other
firmware/backend combinations have their own qualifications in the linked
documentation. NAC sessions retain their existing ISDN terminal; these external
analog controls are disabled for NAC.
## Usage
Everything runs through the `./courier` launcher. There is nothing to install
@@ -199,7 +395,11 @@ Measure firmware execution with `python tools/benchmark_x86.py Ie030002.nac`
or `python tools/benchmark_x86.py IDSDL302.ROM --with-dsp`. Add `--profile-exits`
to identify native fallback addresses (with profiling overhead), or `--python`
for the reference engine. See [interpreter performance](docs/interpreter-performance.md)
for measured workloads and remaining limits.
for measured workloads and remaining limits. Eligible native-worker runs also
use native batch-call setup and empty post-run cleanup; see
[native worker wrapper measurements](docs/native-worker-wrapper-performance.md).
`COURIER_X86_NATIVE_WRAPPER=0` retains the Python wrapper without disabling
native CPU execution.
It uses `uv` when that is on `PATH` and falls back to `venv` plus `pip`
otherwise. `PYTHON=<interpreter>` chooses the interpreter it builds the
@@ -1465,6 +1665,21 @@ signals into a clean CLI failure rather than crashing the controlling process.
## Current boundary
**Live hardware status (10 November 2026):** the analog 403 firmware can
negotiate V.34/LAPM and genuine V.90/LAPM over SIP and carry exact PPP payloads.
Sustained reliability is still open: the latest V.90 series passed only one
60-second call, and no 600-second-target attempt established V.90. Separate
V.34 LAN controls show sender-side sample-clock excursions despite zero RTP
sequence loss. The immediate priority is timely sample production and a
matched 600-second V.34 qualification, not relaxed buffers or PPP checks.
See [disconnect investigation](docs/analog-disconnect-investigation.md),
[V.90 repeated tests](docs/v90-7930-repeated-tests.md), and the
[TX timing measurement plan](docs/tx-timing-investigation.md).
The older 2.1.x implementation boundaries below and the "Minimal SIP dial-out"
section above describe historical bring-up, not the current 403 SIP feature
set or evidence that all firmware variants share the same remaining blockers.
The 80186 and C51 are lock-stepped at their recovered 20/25 MHz ratio. The
supervisor's DSP bootstrap is reconstructed from ports `0x40..0x4e`, verified
byte-for-byte against the XMF C51 boot segment, and published to the native DSP
@@ -1483,10 +1698,19 @@ boot-time NVRAM profile load in this firmware to model.
### Quad CPU AT terminal
For the current server answer attempt, see
[Quad server bring-up](docs/quad-server-bringup.md). The probe can now boot
from the QF archive and records the watchdog-induced `NO CARRIER` path.
CPU/DSP call control remains incomplete; it is not yet a negotiation peer.
The Quad now connects to the original I-modem over **V.34/LAPM and symmetric
x2/LAPM**, with bidirectional ASCII data. Both modems genuinely report
**64000/x2/LAPM** in the symmetric control, with zero PCM underruns or UART
drops. See [Quad server bring-up](docs/quad-server-bringup.md) for working
commands, genuine chassis feature provisioning, setup/handoff fixes and evidence.
Asymmetric **server** x2 also passes against an analog Courier client at
52000/33333, with both payloads intact and carrier retained at a shared
60-second media boundary. Run `tools/probe_quad_analog_pair.py --check-x2` with
an `--output` directory. A **three-minute paced V.34 traffic soak passes at
9600**. The default **31.2/33.6k** pair also passes 60 connected seconds after
fixing a packet-boundary PCM sample insertion in the media harness.
Full-rate application throughput, x2 soaks and binary DTE remain
unverified. The vendor documents Quad client mode as unsupported.
The QF060003 modem now executes `AT` → `OK` with an explicit byte-terminal
adapter. Run `PYTHONPATH=. .venv/bin/python tools/probe_quad_at.py` to boot the
@@ -1509,8 +1733,9 @@ measure all sixteen stock keypad tones.
The captured resident also contains QF's own G.711 expander and compressor.
The component runner executes its DTMF generator, either compressor branch,
and its byte serial ISR, producing raw 8 kHz `.g711` streams without a host
codec. The chassis call-control request that arms this path remains unfinished;
see `docs/quad-dsp-pcm-path.md`.
codec. Chassis arming and answer now execute through the original mailbox;
see `docs/quad-server-bringup.md` for the paired call and
`docs/quad-dsp-pcm-path.md` for the component measurements.
Its stock answer-signal family is executable as well: 2100 Hz ANS, ANS with
periodic phase reversals, ANSam with the resident's 15.05 Hz amplitude
@@ -0,0 +1,99 @@
# Native serial controls and audio-buffer tracing (offline)
No attached hardware was accessed. The private B/C whole-flash capture is
executed unchanged, with modeled External straps, a quiet DAA and exchange.
No settings/RAM dump or credentials are included in these evidence files.
## Corrected native hook-pin wiring
The original runs below omitted `CodecBringUp`, exposing a bridge bug: only
that optional Python model updated the native Si3034 external hook input.
The DAA was seized, but the native line-side pin remained at its reset value.
`CourierDspBridge._service_exchange()` now updates the real modeled board
inputs independently of that optional model. No guest reply or RAM is forced.
`bc-blind-dial-hook-fixed.json` repeats the blind probe without `CodecBringUp`
after this correction. It ends in **NO CARRIER**, not NO DIAL TONE. Accepted
register-17 writes include `1160`, `1120`, then `1100`: the guest really pulses
MCAL one/zero and re-enables automatic calibration. The prior absence of that
pulse was not evidence that the unchanged guest cannot initiate calibration.
ADC offset estimation and calibration intervals are still not modeled.
Transmit peak remains zero, with no decoded digits or overlay downloads.
The exchange analyzed 301 DTMF blocks; this is not a working call. Six
resident readback cases verify connected/disconnected and on/off-hook inputs,
both directly and through the board path without a Python codec.
Post-fix aggregate: **105 tests passed** (`test_3453*`, `test_machine_map.py`,
`test_cli_link.py`, `test_native_machine.py`); compilation and diff checks passed.
## Transmit-path and tone-library follow-up
[Independent PCM / original-library diagnosis](../../docs/3453-audio-path-diagnosis.md)
now validates nonzero DSP DXR -> Si3034 DIN/DAC -> line-resampler output.
In a separate DSP test, the unchanged tone library produces a decoded **5**.
The historical supervisor trace `bc-output-processing.json` shows an
incomplete low-program library: tag-13 handler `0413` contains zero and
output callback `039A` remains idle. The cause is now identified and fixed:
a relocated delay hook was firing on B/C's timer ISR and corrupting CX.
`bc-library-transfer-before-fix.json` shows 101 groups instead of 1023;
`bc-hot-hook-fixed-dial.json` shows the complete guest transfer and **5551212**
decoded from real guest audio, peak 32331. It still ends in `NO CARRIER`.
No library is preinstalled into calls; see the linked diagnosis for details.
Post-delay-hook-fix aggregate: **108 tests passed** (3453/map/CLI/native).
## Historical findings (before hook-pin correction)
`bc-dial-serial-and-rings.json` runs `ATX3S7=3` then `ATD5551212` for 24 million
instructions with DSP-paced ticks. It ends in `NO DIAL TONE`, with 4550 ticks,
one line seizure/release, no digits, no overlays, and zero transmitted audio.
The new native trace records words **accepted as secondary codec controls**,
not guesses based on mailbox messages or DXR values. Register-17 writes are
`11A0` (CALD set, MCAL clear). There is no accepted MCAL one/zero pulse in the
recorded run. Trace capacity is 4096 and this run records 298 words. DSP cycles
restart at guest DSP resets; do not treat them as one monotonic timebase.
`event_pc` identifies the frame acceptance context, not the DXR writer.
The receive path is not entirely silent:
* Native codec receive peak reaches 5656.
* Before the reset at CPU instruction 15799899, the original DSP serial ISR
writes 21920 words to its audio-ring range at PC `1185`; 21144 are nonzero,
peak 5656. The code at `1184..1185` reads DRR and stores it into the ring.
* Input processing writes at `11C4` and `11DF` also become nonzero.
* Output-ring operations at `1194` and `111E` remain zero in that epoch.
The resulting line audio also stays zero. This is not just a final
post-hangup sample count: cumulative line-service peaks remain zero too.
This narrows the investigation to guest DSP processing / supervisor dial
state and their board handshakes. Missing electrical calibration is still a
model gap, but this trace does **not** establish it as the cause of silence.
## Controls and limitations
`bc-blind-dial.json` puts `ATX0D5551212` in the dial command itself. It still
ends in `NO DIAL TONE`, zero output and no digits. The native receive peak is
5656; serial DRR reads and frame interrupts occur. Why the guest behaves this
way remains unresolved; no reply code is changed to hide it.
`bc-real-delays-40m.json` disables accelerated waits. At 40 million CPU
instructions it has emitted no AT reply, delivered no CPU codec-control
messages, seized no line and delivered zero supervisor ticks. It is an
unfinished startup control, **not** a realistic-timing call result.
The native tracing feature is diagnostic-only: `trace_codec_controls()` uses
the existing register-trace buffer exclusively with selector -2. Disabled
tracing leaves codec behavior unchanged. The original resident's register-12
readback test now verifies that its accepted secondary word is `2CFF`.
Reproduce:
```
.venv/bin/python tools/probe_3453_calibration.py "$PRIVATE_BC_FLASH"
.venv/bin/python tools/probe_3453_calibration.py "$PRIVATE_BC_FLASH" --dial-command ATX0D5551212
.venv/bin/python tools/probe_3453_calibration.py "$PRIVATE_BC_FLASH" --real-delays --instructions 40000000
```
Validation: 56 focused tests passed (`test_3453_product_ids.py`,
`test_3453c*`, `test_native_machine.py`); compilation and diff checks passed.
No working call or full calibration fidelity is claimed.
@@ -0,0 +1,139 @@
# B/C Bell-103: exact bidirectional terminal payload
Two unchanged B/C supervisors (2.2.09, DSP 2.0.34), opposite dedicated-line
DIP presets, `AT&M0&N1&U1`, `AT&L1`, and a **PCM-only** peer connection deliver
these distinct 32-byte terminal payloads exactly:
- A sends `A0a1b2c3d4e5f6g7A0a1b2c3d4e5f6g7`; B receives exactly that.
- B sends `B9z8y7x6w5v4u3t2B9z8y7x6w5v4u3t2`; A receives exactly that.
Both print their own original `CONNECT`. `result.json` records the selected
terminal results and zero original outbound-ring drops. This control types
payload at instruction 28,000,000, after both peers settle, and runs to
35,000,000 instructions / 95 requested common frames. It does **not** prove
lossless typing immediately after one local CONNECT, binary transfer,
long-run throughput, dialed ringing, or complete electrical UART fidelity.
The harness's online TX counter starts at the CONNECT keyword and includes its
trailing CR/LF: 34 counted writes in the steady control are 32 payload bytes
plus that terminator, not duplicated payload. Assertions compare the actual
UART tail after `CONNECT\r\n`, not this coarse counter.
The input delay is an explicit external DTE stimulus, not an emulator change
to readiness, carrier, calibration, or training. Immediate local-CONNECT
stimulus can still lose initial characters. CLI controls
`--a-send-delay-ms` / `--b-send-delay-ms` independently delay terminal typing;
the public-image regression uses 1500 ms on each side.
## First unmet conditions and fixes
Independent decoding recovered both full payloads from receiver input PCM,
DSP hard decisions, ASIC holding words, and the words actually passed to the
original CPU receiver. Nevertheless its live output was corrupted. Replaying
those **same words** through original `6EBD9` and original ring sink `6878A`,
in both CPU engines without interrupts, recovered all 32 bytes.
The missing condition was interrupt ownership:
- The byte-front-end UART request entered INT2 (`0E`) without joining the
controller EOI stack. Its EOI therefore removed the interrupted INT0.
- The periodic mailbox request also bypassed INT0's shared in-service state.
- Another data ISR could enter while the original, non-reentrant CPU framer
was updating `1ECC..1ED3`. Correct word delivery was not enough.
All request paths now record their actual controller interrupt. INT0 requests
share its in-service state; UART EOI no longer releases an interrupted data
ISR. Selected before/after call-pair and state-continuity counts are in
`result.json`; raw register/stack context is deliberately not published.
This removed corruption but left one terminal byte missing in each direction.
The original foreground transmitter kick writes that byte to **EB S0TBUF
`FF6A`** (B/C `5C943`). The old printf-PC capture missed the online kick;
later byte-front-end interrupts use `OUT 0A`. The 2.x capture now observes the
actual S0TBUF register instead of the printf PC, preserving byte order and
7-bit/parity handling without double-capturing command replies.
No guest callback, program, receive ring, or modem decision is replaced in the
real peer calls. No decoded byte crosses the line connection. Offline decoding
and isolated original-code replay are controls only.
## Reproduce with public captures and erased synthetic settings
The paired regression assembles the captured public B/C normal/recovery images
with an erased settings area; it does not need the private whole-flash image.
From the repository root:
```sh
.venv/bin/python -m pytest -q tests/test_3453c_call_delays.py \
tests/test_3453c_uart_framer.py tests/test_3453c_irq_ownership.py \
tests/test_3453c_dtr_monitor.py tests/test_cli_link.py
```
[Final validation](VALIDATION.md): **199 tests passed**, including both real
public-image peer regressions.
Full probe output belongs under `/tmp` or the private archive, not in this
selected-evidence directory.
## Selected controls
- `a-receiver-input.wav`, `b-receiver-input.wav`: receiver-input samples at
original DSP `4538`, data `038F`, nominal 7200 Hz. These precede the IRQ fix;
both already contain their complete far-end payload. They are not an
electrical ADC-pin capture. A receives 1270/1070 Hz; B receives 2225/2025 Hz.
- `carrier-loss-control.json`, `carrier-loss-word-control.json`: selected
public-image loss timing and original-framer NUL replay; no raw CPU context.
- `received-word-controls.json`: run-length-encoded three-sample words actually
presented to the original CPU framer before the fix. Only known synthetic
payload/idle bit words (0..7) are retained, not board settings or CPU context.
- `tests/test_3453c_uart_framer.py`: ideal phase controls and both captured-word
replays, using both CPU engines and the original byte-ring sink.
- `tests/test_3453c_irq_ownership.py`: nested UART/data EOI ownership controls.
- `tests/test_3453c_uart_status.py`: actual register writes, parity, external
terminal timing, and DTR-pin controls.
- `tests/test_3453c_dtr_monitor.py`: original DTR-lost predicate in both CPU
engines, checking both active-low inputs without inventing a response.
- `tests/test_3453c_call_delays.py`: unchanged public-image peers with erased
synthetic settings; asserts exact far-end terminal output, not just ingress.
## Genuine DTR disconnect
`dtr-disconnect.json` records a separate call with `AT&D2&M0&N1&U1` and the
physical DTR-override DIP open. Both exact 32-byte payloads arrive first. Only
**A's external DTR** drops, 5000 ms after its own CONNECT (instruction
40,943,424). B's terminal remains attached and its DTR stays asserted.
Both original supervisors then print `NO CARRIER`; both native codec/DAA hook
states finish on hook, with no errors or outbound queue drops. B therefore
responds to far-end loss, not a second artificial DTR drop. The control runs
to 55 million instructions / 145 requested common frames. No hangup command,
carrier flag, guest callback, or codec hook state is forced.
### Carrier-loss bytes and leased-line retry are preserved
The public erased-settings control (`carrier-loss-control.json`) verifies
**all 32 terminal bytes exactly before A's DTR edge**. B subsequently emits a
NUL during loss, about 432 ms after that edge, before `NO CARRIER`. The NUL is
already present at the original CPU ring sink; replaying the captured words
through the original framer and sink reproduces it in **both CPU engines**.
`carrier-loss-word-control.json` and the framer tests retain this control.
It is not UART corruption and is not filtered out to make a test pass.
B also releases its hook and later seizes again to retry the dedicated line.
A, whose DTR remains deasserted, stays on hook. The paired test checks exact
**pre-drop** payload, original post-drop bytes, both `NO CARRIER` results and
hook-release transitions—not a byte-clean carrier-loss interval or permanent
far-end on-hook state. The clean 55-million-instruction ending above is one
control, not a guarantee for every carrier-loss phase/settings combination.
The first DTR control exposed missing input transport: the original kind<6
monitor at `5AC91/5ACC4` samples **EB P1.6 (`FF5A`, bit 40)** as well as
selector `0104` (ASIC port `14`, bit 0, queried through `5A91D`). Set means
DTR lost. Driving only port `12`, or driving port `14` with the older front
end's opposite polarity, did not satisfy the original predicate. The 2.x
pin model now drives both actual inputs; the original `&D2` handler stores
its option at `0979`, not the legacy `094E` cell.
Full flash/settings and full register/stack traces stay private. The audio
and bit-word controls retained here contain only explicitly selected synthetic
payload diagnostics. No hardware was accessed for these runs.
@@ -0,0 +1,27 @@
# Validation
Final aggregate, including the public erased-settings PCM-only payload and
single-sided DTR-loss regressions:
```sh
.venv/bin/python -m pytest -q tests/test_3453* tests/test_machine_map.py \
tests/test_cli_link.py tests/test_native_machine.py tests/test_c5x_disasm_moves.py
```
**199 passed in 618.13 s.**
Focused IRQ ownership, UART register/status/scheduling, original DTR predicate,
original framer (including carrier-loss NUL), and CLI forwarding controls:
**64 passed in 0.68 s.** Python compilation and scoped diff checks passed.
The DTR regression checks exact terminal output before the external drop,
original post-drop receiver bytes, both original `NO CARRIER` results, and
native hook-release transitions. An initially stricter ending assertion exposed
B's native loss-period NUL and later leased-line retry. Timed traces and
original-code replay in both engines established those behaviors; neither is
filtered out or disabled to obtain a pass.
This does not establish immediate-local-CONNECT losslessness, long-run/binary
transfer, dialed ringing, or complete startup/electrical fidelity. All runs were
offline. Raw traces and full flash/settings remain outside these selected
public diagnostics.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,65 @@
{
"firmware": "B/C supervisor 2.2.09, DSP 2.0.34",
"normal_image_sha256": "6c3271782955f837fe23db7712f090cc84854e49cc43c2f4396cd1cc211371fc",
"transport": "native PCM only; no decoded-byte peer channel",
"commands": [
"AT&M0&N1&U1",
"AT&L1"
],
"external_terminal_input_instruction": 28000000,
"instruction_budget": 35000000,
"requested_common_frames": 95,
"scope": "32 printable ASCII bytes each way after both peers settle; not immediate-CONNECT or binary/long-run proof",
"peers": {
"a": {
"sent_ascii": "A0a1b2c3d4e5f6g7A0a1b2c3d4e5f6g7",
"received_ascii": "B9z8y7x6w5v4u3t2B9z8y7x6w5v4u3t2",
"serial_text": "\r\nOK\r\n\r\nOK\r\n\r\nCONNECT\r\nB9z8y7x6w5v4u3t2B9z8y7x6w5v4u3t2",
"terminal_input_bytes": 32,
"terminal_payload_bytes": 32,
"error": null,
"queue_drop_counts": {}
},
"b": {
"sent_ascii": "B9z8y7x6w5v4u3t2B9z8y7x6w5v4u3t2",
"received_ascii": "A0a1b2c3d4e5f6g7A0a1b2c3d4e5f6g7",
"serial_text": "\r\nOK\r\n\r\nOK\r\n\r\nCONNECT\r\nA0a1b2c3d4e5f6g7A0a1b2c3d4e5f6g7",
"terminal_input_bytes": 32,
"terminal_payload_bytes": 32,
"error": null,
"queue_drop_counts": {}
}
},
"framer_control": {
"a": {
"before_irq_ownership_fix": {
"input_words": 3860,
"completed_call_pairs": 3845,
"state_discontinuities_between_calls": 133
},
"after_irq_ownership_fix": {
"input_words": 3862,
"completed_call_pairs": 3862,
"state_discontinuities_between_calls": 0
},
"receiver_input_wav_exact_payload": true,
"receiver_input_wav_sha256": "e332bcba2f8b4f0d4d7e322669f4e9f47757b63961f4497b0259e6246ca83c7d",
"isolated_original_cpu_replay_expected_ascii": "B9z8y7x6w5v4u3t2B9z8y7x6w5v4u3t2"
},
"b": {
"before_irq_ownership_fix": {
"input_words": 3861,
"completed_call_pairs": 3836,
"state_discontinuities_between_calls": 158
},
"after_irq_ownership_fix": {
"input_words": 3861,
"completed_call_pairs": 3861,
"state_discontinuities_between_calls": 0
},
"receiver_input_wav_exact_payload": true,
"receiver_input_wav_sha256": "59fd4637df579986ab3d1cb834034cd648cf940a09e7d312161b281b955781d9",
"isolated_original_cpu_replay_expected_ascii": "A0a1b2c3d4e5f6g7A0a1b2c3d4e5f6g7"
}
}
}
@@ -0,0 +1,78 @@
# 3453 B/C on-hook recovery download corruption
Offline unchanged-firmware peers; no hardware access, firmware/RAM patches,
forced acknowledgments, or disabled transfer verification. Settings/full flash
remain private. These files contain selected DSP transport/control diagnostics,
not standard PC traces or settings dumps.
## Demonstrated failure
The previous call-only timing correction stopped preserving semantic waits when
DAA off-hook became false. During normal firmware recovery after a failed call,
that re-enabled the queue-deadline shortcut and flooded the outgoing ring.
Both peers read the original download table correctly and requested an
origin-zero library: the BX register at the download strobe is `0000`, and row 7
in the immutable table is `(0000,1FF4,0000)`.
Nevertheless, the guest's individual-word enqueue rejects the destination word:
| Peer | Guest instruction count | PC | AX (dropped word) | BX / CX |
| --- | ---: | --- | --- | --- |
| A | 35,269,760 | `67D5A` | `0000` | `02E8 / 02EA` |
| B | 34,779,072 | `67D5A` | `0000` | `02E8 / 02EA` |
The subsequent actual CPU port writes deliver header `0002`, data `1200`.
Specifically, the CPU writes low byte `00` to `5C` and high byte `12` to `5E`;
this is not a host latch inventing a destination. The DSP therefore attempts to
install the origin-zero payload at `1200`, overwriting resident code. The later
payload mismatch / missing acknowledgment is a consequence, not evidence that
verification or the physical memory mask should be relaxed.
The 48-byte ring and both original enqueue guards remain unchanged. In
particular, a six-byte request can pass the packet guard with 42 bytes used,
then lose its final word when the individual-word guard encounters the read
pointer. Preserve the original queue-drain wait rather than modifying the ring
or retrying a rejected request.
## Correction and controls
`CourierMachine._clocked_3453_runtime()` preserves the three existing waits
(timer, calibrated busy loop, queue drain with deadline) during off-hook calls
**and after the firmware frontend has started**, including on-hook recovery.
Cold startup before frontend service retains its previous handling. The guard
still requires a verified 3453 profile, DSP-paced ticks, and a finished resident
bootstrap.
`after-*-transport.json` and `after-*-summary.json` cover 50 million instructions
and 130 requested common frames using the same dedicated-line commands. Both
workers finish without download errors; no packet/word drops or destination
`0002:1200` appear. Original `0002:0000` loads and the B `0002:7658` loads remain.
A separate reproducible regression uses only public boot/normal captures and
erased settings: blind dial with `S7=1`, an exchange configured not to answer,
then genuine firmware `NO CARRIER` and on-hook recovery. The corrected run has
zero queue drops and at least two original origin-zero loads. Restoring only the
old off-hook-only emulator guard reproduces a word drop and:
```
3453C overlay did not acknowledge at 12C8, PC=1133
```
This correction does **not** establish a negotiated connection. In this control,
A line TX peak is 10299 and RX peak is 0; B line RX peak is 1962 and TX peak is 0.
Later native processing traces show a short Bell-103 transmit burst before
reset, which is not the same as delivered reverse wire audio. The subsequent
post-carrier mailbox ISR transition is being investigated separately.
## Reproduction
```
.venv/bin/python tools/probe_3453_download.py "$PRIVATE_BC_FLASH" \
--instructions 50000000 --frames 130 --output /tmp/bc-download-control
```
Add `--processing-trace` for bounded originate-state captures and unique DSP
status reports. The tool supports hash-guarded B/C normal 2.2.09 only. CPU table
bytes, transfer-control flags and selected registers are explicitly scoped;
worker stdout and standard PC traces are not published.
@@ -0,0 +1,121 @@
# B/C line-control disassembly and unchanged peer tests
Offline only. No physical modem, settings writes, guest patches, forced carrier,
or synthetic training. `result.json` contains whitelisted call diagnostics,
not settings or whole-memory dumps. **There is still no negotiated connection.**
Follow-up: [the originate-queue trace](../3453-originate-queue-trace-20261015/README.md)
resolves the missing transition described below: firmware already requests
command 0017, but its full outbound software ring drops it. This document's
unresolved-transition discussion describes the earlier investigation.
Regenerate the disassembly:
```
.venv/bin/python tools/audit_3453_line_control.py \
dumps/3453bc-firmware-read-2.2.09/firmware.bin > line-control.asm
```
The tool checks the public capture's hash. Crucially, it does **not** concatenate
all overlapping DSP modules: the later 1DC9 overlay replaces resident line-control
instructions. For example, the active answer entry 1F64 is `SPLK @6D,#1F7C`, not
the unrelated instruction found there after applying the later overlay.
## Executed controls
Common command prefix:
```
./courier link "$PRIVATE_BC_FLASH" --with-dsp --line-audio-only --tick-source dsp
```
`bc-line-decomp`: 24 million instructions, 60 requested frames, commands
`AT&N1&U1` then `AT&L1` on each side, `--audio-dir /tmp/bc-line-decomp-audio`.
DSP trace range 1D60..20E8. Native waveform recordings were examined with a
4096-point Hann-windowed FFT, at the WAV's declared 8000 Hz sample rate:
| file / interval start | dominant frequency |
| --- | --- |
| a-tx.wav / 1 s | 2099.6 Hz |
| a-tx.wav / 2 s | 2099.6 Hz |
| a-tx.wav / 3 s | 2250.0 Hz |
| a-tx.wav / 4 s | 2250.0 Hz |
| b-rx.wav / same intervals | same peaks |
A transmit peak was 10332. B transmitted silence. RX WAVs record the peer's
transmit waveform **before** the existing modeled pair loss; do not confuse
these with the codec ADC amplitude. This establishes the waveform, not its
successful protocol interpretation. The names `input-callback` / `output-callback`
in this first report were probe labels: 039A is the transmit generator and 039B
is receive processing.
`bc-classifier`: 32 million instructions, 65 requested frames, same leased-line
commands, `--mem-watch 0x1d68:0x1d79`. This small region contains call-progress
state, not settings. Reports include some earlier guest RAM-test writes; the
late B writes at 6DC4B/6DC4E record 0009 in 1D6C/1D6D. The supervisor really
consumes the DSP's status. Therefore a wholly broken receive mailbox is **not**
the explanation. Both 02DA callback pointers are 627D at the endpoint.
`bc-manual-pair`: 60 million instructions, 160 requested frames, commands
`AT&N1&U1S7=20X0D5551212` on A and `AT&N1&U1S7=20A` on B. The combined manual
answer command intentionally does not enable the CLI's wait-for-ring gate.
Manual ATA is a guest command, not a fabricated ring. Both peers exchanged
nonzero audio (A's includes dialing); both returned `NO CARRIER`. They reached
134 frames, not the requested 160.
`bc-factory-pair`: 30 million instructions, 65 requested frames, commands
`AT&F0&M0&N1&U1X0` then `AT&L1` on both ends. These are volatile guest
configuration commands; no `&W` or other settings save was issued. Clearing
stored runtime configuration and disabling ARQ did not change the endpoint:
A RX=2208/state=2030, B RX=2127/state=0/TX idle. B still transmits zero.
## Narrowed failure
* Answer setup 1F64 installs state callback 006D=1F7C; 21D7 installs RX 039B=2208.
* Monitor setup 20E9 clears 006D/006E and installs RX 039B=2127, TX 039A=1173
(idle). The silent leased-line originator remains in precisely this state.
* Monitor processing emits header 8008 and its qualified flag word at 21C8..21CF.
The host sees tag 0008. Status 0809 really reaches the supervisor.
* Supervisor 6DB86 rejects AL bits 003C from its generic-energy qualification;
it sets 1D6B bit 0001 only after 20 eligible reports via 6DB92..6DBCC. Thus
receiving nonzero PCM or seeing status bit 0001 alone is not carrier.
* The answerer progresses to state callback 2030, but the originator never
receives a handshake-mode command in these traces. The control transition
from monitor reports to originate setup remains unresolved.
### Partial decompilation (not replacement firmware)
The monitor's decision at 6DB6C..6DBD1 is approximately:
```c
if (settle_reports != 0) {
--settle_reports;
previous_mask = 0xff;
goto store_report;
}
if (flags & 0x003c) {
previous_mask = 0xfe;
} else {
flags &= previous_mask;
if (flags & 1) {
// Original code increments/saturates two byte counters and performs
// additional X-mode handling before this threshold test.
increment_energy_counters();
if (eligible_report_count >= 20)
qualified_progress |= 1;
}
}
process_other_progress_flags();
store_report:
last_flags = flags & 0x3f;
```
This is **not** a carrier detector replacement and does not mean twenty
consecutive reports. Notably 0809 contains bit 0008: those reports take the
first branch, not the energy-qualification increment. Clearing that bit or
setting `qualified_progress` in the emulator would hide, not solve, the
control-path issue. The remaining receive filters and handshake transitions
are retained as addressable original instructions in `line-control.asm`.
These findings do not yet establish an emulator fault, a valid handshake,
calibration accuracy, or the correctness of the existing analog loss model.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,82 @@
# Original 3453 B/C firmware: bidirectional PCM and CONNECT
Follow-up: [exact terminal data and DTR disconnect](../3453-bell103-data-path-20261015/README.md)
are now demonstrated with settled peers. This artifact records the earlier
PCM/carrier/CONNECT milestone.
Offline control using two unchanged B/C normal 2.2.09 firmware peers, original
DSP code, opposite dedicated-line DIP presets, and a PCM-only socket. No forced
carrier/training/ACK, guest RAM/callback patches, or fabricated CONNECT result.
No hardware access or settings writes. Private settings/full flash are excluded.
## Result
Both guests print their own `CONNECT` after `AT&N1&U1`, `AT&L1`:
```
OK
OK
CONNECT
```
Both reach the instruction limit without errors (50 million each, 130 requested
common frames). Native codec RX peaks are A=3014 and B=3068. Line TX peaks are
A=11087 and B=10102. The four WAVs demonstrate actual audio in both directions;
RX WAVs tap peer TX before pair loss, not native ADC amplitude.
This establishes a firmware-driven low-rate carrier/control transition and
bidirectional wire audio. **It does not by itself establish bidirectional DTE
bytes or disconnect.** The first separate small-payload control left the data
queued at the DTE harness; investigation continues without sending payloads
outside the firmware/DSP path.
## Newly demonstrated interrupt fault
After the originate DSP qualifies the answering waveform, it enters original
Bell-103 setup at `4486`, installs TX/RX callbacks `45F2/4538`, and emits status
`003D`, `0004`, `0028`. These reports are not all failures. Before the correction,
native TX produced a short burst but the connection reset before reverse wire
audio was delivered.
The original supervisor's tag-28 handler at BC `6D877` changes the mailbox
interrupt vector to `675B:774E` (physical `6ECFE`). This handler returns at
**BC `6ED9A` / C `6EEFA`**, rather than the initial mailbox ISR's return. The
emulator failed to release its in-service latch at this new return and stopped
servicing the mailbox normally. Registering the genuine return, with the guarded
B/C-to-C PC mapping, restores service and both firmware-generated CONNECTs.
Neither vector nor callback is injected by the emulator; the original guest
chooses them. The unchanged handler ends `POP ES; POPA; MOV [FF02],8000; IRET`,
which is checked against both public normal captures by regression tests.
The preceding independent correction for origin-zero recovery downloads is
in [the recovery trace](../3453-download-recovery-trace-20261015/README.md).
Transfer verification remains strict throughout.
## Evidence and reproduction
`result.json` explicitly selects control/serial/DSP/codec/line-service fields
from the paired result. Raw standard PC traces and stack/SI memory-like fields
are deliberately excluded. `audio-analysis.json` is a 4096-point Hann FFT of
selected WAV windows, reproducible without third-party numerical libraries:
```
.venv/bin/python tools/analyze_3453_peer_audio.py \
artifacts/3453-native-bell103-link-20261015
```
A TX changes from about 2100 Hz (1 s) to 2250 Hz (3 s), then the later FSK
waveform. B TX is nonzero by 5 s with a dominant 1269.53-Hz component. Each
corresponding peer RX recording has the same dominant component.
```
./courier link "$PRIVATE_BC_FLASH" --with-dsp --line-audio-only \
--tick-source dsp --instructions 50000000 --line-frames 130 \
--a-at 'AT&N1&U1' --a-at 'AT&L1' \
--b-at 'AT&N1&U1' --b-at 'AT&L1' \
--socket /tmp/courier-bc-online.sock --audio-dir /tmp/bc-online-audio --summary
```
The 3453/map/CLI/native aggregate after the recovery/ISR corrections passed
**120 tests in 493.60 seconds**. A further online-UART correction and public-image
paired regression are under validation; this count does not cover those later
changes yet. No commit is claimed.
@@ -0,0 +1,342 @@
{
"control": {
"instructions": 50000000,
"requested_common_frames": 130,
"a_commands": [
"AT&N1&U1",
"AT&L1"
],
"b_commands": [
"AT&N1&U1",
"AT&L1"
],
"line_audio_only": true,
"synthetic_training_or_carrier": false
},
"peers": {
"a": {
"status": "main-loop",
"error": null,
"instructions": 50000000,
"serial_text": "\r\nOK\r\n\r\nOK\r\n\r\nCONNECT\r\n",
"timer_interrupts": 10543,
"dsp_bridge": {
"bootstraps": 1,
"runtime_message_counts": {
"0001:0000": 5,
"0002:0000": 2,
"0004:0000": 1,
"000f:0600": 1,
"000f:1200": 3,
"0014:5140": 1,
"0015:0000": 1,
"0019:020d": 1,
"001a:32dc": 2,
"001c:0008": 1,
"001d:0014": 1,
"001f:0000": 1,
"002a:0006": 1,
"0042:0191": 1,
"0043:003f": 1,
"0046:0010": 1,
"0048:7fff": 1,
"0049:8885": 1,
"0050:00c1": 1,
"0050:0105": 1,
"0050:0210": 1,
"0050:0310": 1,
"0050:040d": 1,
"0050:0500": 1,
"0051:21ff": 1,
"0052:1ef8": 2,
"0053:0000": 1,
"005b:0101": 1,
"0067:0000": 2,
"0068:0000": 1,
"0069:000a": 1,
"006b:0000": 1,
"0071:0001": 1,
"0076:0000": 1,
"0077:0000": 1,
"007c:0000": 37,
"007c:0001": 9,
"007c:0002": 10,
"007c:0004": 10,
"007c:0008": 8,
"007c:0010": 9,
"007c:0020": 8,
"007c:003f": 3,
"007d:0028": 2,
"0080:0000": 37,
"0080:0001": 14,
"0080:0002": 5,
"0080:0004": 9,
"0080:0008": 12,
"0080:0010": 6,
"0080:0020": 8,
"0080:003f": 3,
"0082:0000": 2,
"0082:0020": 1,
"0082:0060": 1,
"0082:00a0": 2,
"0083:0002": 2,
"0084:0502": 1,
"0084:1408": 2,
"0084:1468": 2
},
"line_service": {
"budget_frames": 130,
"buffer_left": 21,
"call_state": "idle",
"calls": 0,
"cut_through_at": -1,
"drained_frames": 0,
"fallback_frames": 0,
"final_tx_burst_count": 2,
"final_tx_bursts": [
[
2126,
16525,
9892
],
[
17102,
78428,
10796
]
],
"final_tx_first_nonzero": 2126,
"final_tx_nonzero": 74909,
"final_tx_peak": 10796,
"final_tx_total": 78428,
"no_codec_clock": 0,
"originate_return": 0,
"peer_ring_bursts": 0,
"peer_ring_frames": 0,
"peer_ring_runs": [],
"resets": [
{
"frame": 2,
"instructions": 1415808,
"tx_written": 1494
},
{
"frame": 4,
"instructions": 2612736,
"tx_written": 1459
}
],
"ring_frames": 0,
"tx_consumed": 80732,
"tx_index": 77779,
"tx_peak_codec": 10796,
"tx_peak_line": 11087
},
"serial_port": {
"line_tx_nonzero": 74909,
"line_tx_writes": 78428,
"codec_rx_peak": 3014,
"dxr_writes": 78559
},
"core_codec": {
"sample_rate": 7200.0,
"primary_frames": 78431,
"registers": [
0,
0,
3,
0,
0,
2,
96,
4,
63,
17,
0,
3,
0,
76,
2,
0,
40,
0,
2,
0,
8,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
}
},
"b": {
"status": "main-loop",
"error": null,
"instructions": 50000000,
"serial_text": "\r\nOK\r\n\r\nOK\r\n\r\nCONNECT\r\n",
"timer_interrupts": 10507,
"dsp_bridge": {
"bootstraps": 1,
"runtime_message_counts": {
"0001:0000": 5,
"0002:0000": 1,
"0002:7658": 1,
"0004:0000": 1,
"000f:0600": 1,
"000f:1200": 3,
"0015:0000": 1,
"0017:5040": 1,
"0019:020d": 2,
"001a:32dc": 2,
"001c:0008": 1,
"001d:0014": 1,
"001f:0000": 2,
"002a:0006": 1,
"0042:0191": 1,
"0043:003f": 1,
"0046:0020": 1,
"0048:7fff": 1,
"0049:8885": 1,
"0050:00c1": 1,
"0050:0105": 1,
"0050:0210": 1,
"0050:0310": 1,
"0050:040d": 1,
"0050:0500": 1,
"0051:21ff": 1,
"0052:1ef8": 2,
"0053:0000": 1,
"005b:0101": 1,
"0067:0000": 2,
"0068:0000": 1,
"0069:000a": 1,
"006b:0000": 1,
"0071:0001": 1,
"0076:0000": 1,
"0077:0000": 1,
"007c:0000": 36,
"007c:0001": 9,
"007c:0002": 10,
"007c:0004": 9,
"007c:0008": 9,
"007c:0010": 8,
"007c:0020": 10,
"007c:003f": 3,
"007d:0028": 2,
"0080:0000": 35,
"0080:0001": 10,
"0080:0002": 10,
"0080:0004": 8,
"0080:0008": 9,
"0080:0010": 10,
"0080:0020": 8,
"0080:003f": 4,
"0082:0000": 2,
"0082:0020": 1,
"0082:0060": 1,
"0082:00a0": 2,
"0083:0002": 2,
"0084:0502": 1,
"0084:1408": 2,
"0084:1468": 2
},
"line_service": {
"budget_frames": 130,
"buffer_left": 21,
"call_state": "idle",
"calls": 0,
"cut_through_at": -1,
"drained_frames": 0,
"fallback_frames": 0,
"final_tx_burst_count": 1,
"final_tx_bursts": [
[
22369,
78415,
10100
]
],
"final_tx_first_nonzero": 22369,
"final_tx_nonzero": 56039,
"final_tx_peak": 10100,
"final_tx_total": 78415,
"no_codec_clock": 0,
"originate_return": 0,
"peer_ring_bursts": 0,
"peer_ring_frames": 0,
"peer_ring_runs": [],
"resets": [
{
"frame": 2,
"instructions": 1415808,
"tx_written": 1494
},
{
"frame": 4,
"instructions": 2607360,
"tx_written": 1459
}
],
"ring_frames": 0,
"tx_consumed": 80732,
"tx_index": 77779,
"tx_peak_codec": 10100,
"tx_peak_line": 10102
},
"serial_port": {
"line_tx_nonzero": 56039,
"line_tx_writes": 78415,
"codec_rx_peak": 3068,
"dxr_writes": 78546
},
"core_codec": {
"sample_rate": 7200.0,
"primary_frames": 78418,
"registers": [
0,
0,
3,
0,
0,
2,
96,
4,
63,
17,
0,
3,
0,
76,
2,
0,
40,
0,
2,
0,
8,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
}
}
}
}
@@ -0,0 +1,155 @@
# Originate transition: requested by firmware, dropped by its software ring
Offline, unchanged B/C firmware. No hardware access, flash writes, settings
save, forced DSP commands, callback patches, carrier or CONNECT. All published
fields are explicitly selected call diagnostics; arbitrary SI/stack/memory
contents from the temporary raw reports are excluded.
**The previously missing transition is now explained. Negotiation is not yet
working. The corrected quiet-line regression has zero setup drops; the
live peer path is now blocked by later DSP download failures.**
## Decompilation and executed branch
The expanded [line-control disassembly](../3453-line-control-decomp-20261014/line-control.asm)
contains these original supervisor routines:
* 635A1..6360D: configure originate, select command, enter call wait.
* 638AD: return the OR condition of RAM 1C06 bit 02, 0912 bit 01, 0A12 bit 01
through ZF. These were all zero in the measured run.
* 6405B: special/extended originate commands; the zero condition skips command
0010, taking 64066 -> 640B4. This skip is an intentional firmware choice,
not evidence of a missing driver prerequisite.
* 640B8: fallback selection. The measured path reaches 640C2 and requests
command 0017 with the mode word at 02C2 (5040).
* DSP dispatch table 131B maps command 0017 to **1DE4**, the original originate
setup. Command 0014 maps to answer setup 1F64; 0015 maps to monitor setup 20E9.
The critical transport routine is 67D5F, approximately:
```c
save_flags();
disable_interrupts();
used = write_pointer_02de - read_pointer_02dc;
if (borrow) used += 0x30;
if (used > 0x2a) {
restore_flags();
return; // no command queued, no automatic retry
}
enqueue_word(0xff00);
enqueue_word(tag_ax);
enqueue_word(data_bx);
restore_flags();
```
The helper 67D33 implements individual word insertion and ring wrap. The
pseudocode above is explanatory, not replacement firmware and not a proposed
fix to the guest's bounds checks.
## Before: exact first divergence
`bc-origin-branch` executes the expected control branches. `bc-queue-drop`
then watches the queue-occupancy comparison at 67D6F, rejection at 67D89,
and command-0017 selection at 640C2.
On B, at CPU instruction 2,992,832:
* The guest reaches 640C2.
* It calls its own enqueue routine with **AX=0017, BX=5040**.
* The measured queue occupancy is **CX=002E** (46 bytes).
* The guest takes its rejection path, **67D89**.
* The native DSP never receives command 0017 and remains RX=2127, TX=1173,
state callback 006D=0.
This disproves the earlier hypothesis that the supervisor was waiting for a
missing tone report before deciding to originate. It had already decided.
Status 0809 qualification was downstream monitoring, not the missing request.
Other setup commands were also rejected during the compressed burst.
## Emulator change and controls
`CourierMachine._clocked_3453_call()` limits the correction to a verified 3453
profile, DSP-paced ticks, a finished resident bootstrap, and an actually
asserted guest hook relay. In that state, fast-delay hooks no longer:
* write the timer byte at 0152 to manufacture completion of a timer wait;
* shorten the calibrated CX delay loop to one iteration.
It also preserves **queue-drain waits with timer deadlines** at B/C
59CC3/59CEC/59D12 (canonical C addresses 59CD9/59D02/59D28). These are the
remaining setup-drop cause, not just elapsed-time helpers:
```c
deadline = (timer_014e - 2 + 200) % 200;
while (timer_014e != deadline && read_02dc != write_02de) {
// Original guest loop; board interrupts service the queued words.
}
```
The old hook wrote `timer_014e = deadline`, immediately taking the timeout exit
without waiting for the queue. Simply preserving the other two waits recovered
command 0017 but still lost setup words. Preserving this condition recovers all
six 0050 setup words with **zero** queue rejections in the quiet-line regression.
The original guest code and board service perform the waits. The emulator
neither enlarges the ring nor inserts/retries a missing command. Startup
acceleration remains as before: disabling every timer wait immediately after
bootstrap prevented the initial firmware setup from completing (24-million
instruction control, no AT replies), so this is deliberately a call-time fix,
not a claim of complete reset-clock fidelity.
`bc-call-queue-fixed` is an intermediate control preserving timer waits only:
B really delivers **0017:5040**, produces native transmit PCM with peak
**10471**, then returns **NO CARRIER**. A's received line peak remains zero,
so this is **not** proof of bidirectional PCM on the wire or a connection.
Eleven other B setup commands still take the rejection path.
`bc-all-delays` is a second intermediate control: timer and busy-loop waits
preserved, but queue-drain timeout shortcuts not yet corrected. This live peer
control exposes a later transport failure:
```
3453C overlay did not acknowledge at 1278, PC=1133
```
The diagnostic 1278 is the **pre-interrupt BMAR**, not a verified payload
destination. PC 1133 belongs to the resident idle/wait helper. The workers do
not produce a complete paired JSON result on this exception. No later carrier
or successful transfer is inferred. The quiet-line regression using the
current implementation independently verifies genuine delivery of command
0017 and all six 0050 setup words, with **zero** queue rejections.
`bc-drain-fixed` is the final live control, preserving all three kinds of wait:
40 million instructions and 100 requested frames. It reaches later download
failures on both sides: A reports an overlay mismatch at FFFE; B reports no
acknowledgment with pre-interrupt BMAR=124C and PC=1133. The run aborts without
a complete paired result. This is not a successful call, and the existing
transport verification was neither bypassed nor weakened. These failures need
request/transfer/reset-epoch tracing before changing the loader.
## Reproduction
Use the private, unchanged assembled B/C image as `$PRIVATE_BC_FLASH`. Baseline
commands common to the peer controls:
```
./courier link "$PRIVATE_BC_FLASH" --with-dsp --line-audio-only \
--tick-source dsp --a-at 'AT&N1&U1' --a-at 'AT&L1' \
--b-at 'AT&N1&U1' --b-at 'AT&L1' --summary
```
The before controls used 9/10 million instructions and 12/15 requested frames;
add `--trace-pc 0x67d6f=queue-used --trace-pc 0x67d89=queue-drop
--trace-pc 0x640c2=orig-command17`. The corrected controls used 30 million
instructions, 70 requested frames, and WAV recording under temporary paths.
Each used a distinct `--socket` path. Retain raw reports privately; the
standard PC trace can include arbitrary data at SI.
Validation: **22 tests passed**, covering call-delay gating, real firmware
originate-command delivery, zero queue rejections and all six setup words with
public captures/erased synthetic settings, line-control audit, complete tone download, independent PCM/tone controls,
codec readback, CLI link and machine map. The full 3453/map/CLI/native-machine
aggregate subsequently passed **116 tests in 389.09 seconds**.
Next: trace the later download request/readiness/INT1/reset sequence on both
live peers before making transport changes. Do not fabricate ACKs or skip the error.
File diff suppressed because it is too large. Load diff
+118
View File
@@ -0,0 +1,118 @@
# Audio-path audit: fixed ADC source clock and a missing analogue loop
## Reconnected-line retry
After the user restored the line, `reconnected/6313` passes the seizure guard
(`status=4a`, nonzero loop current), exchanges V.8 menus and independently
CRC-valid INFO0 both ways, and crosses 7200 → 8641.234462 → 9600 Hz. The ADC
empty counter remains **143 before and after retune**, instead of the previous
143 → 188 increase. There are **zero active output gaps/input overflows** over
29.99 seconds off-hook PCM. The worker exits 0 with **NO CARRIER**, and hook
release is verified. Thus the retune starvation fix now has live evidence, but
training still fails. This short retry does not rule out the earlier separate
late underrun after 44.9 seconds. See `reconnected/audio-timeline.txt`, frame
captures and read-only DSP snapshots.
## Earlier blocker: raw input is not modem audio
The final controlled A/B attempts have **zero off-hook loop current**:
`hook=09 status=40 aux=02 sense=0`. The earlier answered calls had `status=49`
(nonzero current code). A valid isolation-link bit (`40`) alone is insufficient.
Both A/B captures contain **308,000 consecutive hardware RX samples equal to
-32768**, across all 29.94 seconds off-hook. The 8-Hz DC blocker removes that
constant and makes the downstream recording look quiet; this is not evidence
of a healthy silent line. No call INVITE or RTP stream appears in the PBX capture.
The two modes send **byte-identical post-resampler/post-gain hardware TX**:
SHA-256 `0543276929ccf502fd66e9ef6a238fd1e47b4ce772e40c0aebabbfedcf5c1d6f`.
The waveform contains the firmware's four DTMF digits at the same timing and
levels as before. Switching back to the original RX path does not restore
routing. See `ab/verification.json`, each `hardware.log`, wire PCM captures,
`ab/sip.log`, and `ab/rtp-summary.txt`.
Short **on-hook, zero-output** probes at 10286 → 7200 → 10286 Hz find strong
50-Hz interference/clipping rather than a stable healthy line. Rate switching
does not clear it. No USB reset or gateway configuration changes were made.
The cause of the missing loop (lead, FXS power/port, or another physical fault)
still requires checking. SIP registration of 6004 remains available; that does
not establish analogue line power or continuity.
`native/apple_line.m` now checks for a valid, nonzero, non-overload current code
when seizing, with 250 ms for settling. It refuses a missing loop **before
dialing**, and cleanup releases the hook. The silent seizure probe in
`rail-check/seizure-guard.*` reproduces this guard in ~0.74 s, without dialing;
`after-guard-status.json` independently confirms on-hook afterward. Callback
self-tests cover the status classifier. No sample-loss checks or buffers were
relaxed.
## Separate software flaw: preconverted RX can change speed at retune
The old hardware bridge converted each returned input block to the current
codec rate, then queued it with `queue_codec_rx`. If the firmware changed its
ADC clock before consuming those samples, the queue retained the old sample
spacing but was consumed at the new rate. A 144-sample service target could
also expand to 192 samples in flight, starving the old-rate receive reserve.
The preceding live diagnostic recorded **45 additional empty ADC frames**
around the 7200 → transient 8641.234462 → 9600 Hz transition.
The corrected physical path:
- keeps RX queued on the fixed hardware clock (normally 10286 Hz);
- reconstructs input at each actual native ADC edge, retaining source time
through arbitrary codec clock changes;
- generalizes the existing native clocked-input converter's source rate,
**without an 8-kHz hop or double resampling**;
- inserts **zero extra receive-cushion samples**;
- prewarms immutable native FIR tables before hardware startup and fails closed
on unknown live ratios;
- yields native polling at retunes and services the boundary instead of
extending the outstanding batch.
The old socket path retains its 8-kHz source and original 32-sample cushion.
DSP firmware, negotiation decisions and real modem result codes are unmodified.
## Offline verification
`adc-clock-benchmark.json` / `tools/benchmark_apple_adc.py` demonstrate the
clock-label hazard: a deliberately queued 2400-Hz old-rate waveform appears at
**3200 Hz** after a 7200 → 9600 Hz ADC change. Keeping the source on the hardware
clock preserves **2400 Hz**, with zero empty ADC frames. That control uses an
intentionally long queued waveform; it is **not** a claim about live FIFO size
or proof of the exact cause of the earlier training failure.
`tests/test_apple_adc_grid.py` independently checks 1200/2400/3000-Hz waveforms
through 7200 → one transient frame → 9600 Hz. All achieve **>60 dB absolute
waveform agreement**, including transition samples, with no gain/phase fitting,
no empty ADC frames and bounded occupancy. Other tests cover unknown-ratio
rejection, source-grid immutability, hardware RX counts, retune service bounds,
and full-rail input becoming quiet after DC blocking.
The full regression selection passes **111 tests** with the optional NumPy
analysis dependency available. Native polling on/off remains equivalent in the
lossless fake-hardware test.
## Earlier live limitations (superseded by the reconnected retry above)
`call/6313` (S7=40), `retry/6313` (S7=20), and the two `ab/` attempts return
NO CARRIER with no active transport loss and verified hook release. They do
**not** validate the V.34 retune fix: none reaches V.34 in the now-faulty analogue
line state. The original late training underrun also remains unverified after
this change. The earlier answered calls had nonzero loop current; this later
physical fault does not retrospectively explain their negotiation failures.
Restore a healthy loop before another negotiation comparison.
`trace_worker.py` now records the actual helper-bound TX and raw helper-returned
RX in `codec-hardware-{tx,rx}.s16`, with `codec-hardware-frames.jsonl`. Codec-side
RX records carry their own `rx_rate`, since the new receiver stays on the
hardware grid. Both traces exclude invented carrier/audio. A diagnostic
`--rx-grid codec` restores the old receive architecture for A/B only.
```sh
# Offline: opens no hardware
../v90modem/.venv/bin/python tools/benchmark_apple_adc.py
# Analyse actual wire PCM after a deliberately requested call
../v90modem/.venv/bin/python tools/analyze_apple_call.py \
artifacts/NEW-CAPTURE/6313 --boundary hardware
```
@@ -0,0 +1,129 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331330d"
],
"exit_code": 0,
"wall_seconds": 52.624550624983385,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": false,
"native_worker_polls": 90832,
"off_hook": false,
"off_hook_pcm_seconds": 29.943612677425627,
"output_gap_samples": 0,
"preparation_ms": 777.3435420822352,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -18758.232519197558,
"raw_rx_near_rail_samples": 352641,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514779,
"samples_sent": 514779,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 76,
"status": 64,
"sense": 236,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,129 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331330d"
],
"exit_code": 0,
"wall_seconds": 52.264273833017796,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 92062,
"off_hook": false,
"off_hook_pcm_seconds": 29.943612677425627,
"output_gap_samples": 0,
"preparation_ms": 753.0227509560063,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -18759.894088531197,
"raw_rx_near_rail_samples": 352613,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514779,
"samples_sent": 514779,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 11,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1 @@
{}
@@ -0,0 +1,18 @@
{
"codec": {
"off_hook_hardware_tx_sha256": "0543276929ccf502fd66e9ef6a238fd1e47b4ce772e40c0aebabbfedcf5c1d6f",
"off_hook_hardware_tx_samples": 308000,
"raw_rx_samples": 308000,
"raw_rx_all_negative_rail": true,
"loop_status_log": "status=40 / zero loop current",
"worker_exit": 0
},
"hardware": {
"off_hook_hardware_tx_sha256": "0543276929ccf502fd66e9ef6a238fd1e47b4ce772e40c0aebabbfedcf5c1d6f",
"off_hook_hardware_tx_samples": 308000,
"raw_rx_samples": 308000,
"raw_rx_all_negative_rail": true,
"loop_status_log": "status=40 / zero loop current",
"worker_exit": 0
}
}
@@ -0,0 +1,129 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"450000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"4500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d34304454363331330d"
],
"exit_code": 0,
"wall_seconds": 94.65036400000099,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 4500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 190288,
"off_hook": false,
"off_hook_pcm_seconds": 56.46616760645538,
"output_gap_samples": 0,
"preparation_ms": 771.5837908908725,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": 203.81661080347175,
"raw_rx_near_rail_samples": 201843,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 928757,
"samples_sent": 928757,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 49,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,232 @@
[
{
"rate": 10286,
"off_hook": false,
"samples": 12360,
"minimum": -32768,
"maximum": 32767,
"mean": 2133.3637540453074,
"most_common": [
[
-32768,
1440
],
[
32767,
1222
],
[
18769,
14
],
[
18752,
13
],
[
18765,
13
]
],
"status": {
"backend": "apple-usb-modem",
"connected": false,
"sample_rate": 10286,
"codec_direct": true,
"native_receive": false,
"codec_rates": [
10286
],
"frames": 60,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"preparation_ms": 742.9874590598047,
"live_filter_misses": [],
"off_hook": false,
"ringing": false,
"resetting": false,
"control_updates": 0,
"samples_sent": 12360,
"samples_received": 12360,
"off_hook_pcm_seconds": 0.0,
"output_gap_samples": 0,
"input_overflow_samples": 0,
"raw_rx_peak": 32768,
"raw_rx_near_rail_samples": 2662,
"raw_rx_mean": 2133.3637540453074,
"tx_gain": 1.0,
"error": null
}
},
{
"rate": 7200,
"off_hook": false,
"samples": 8640,
"minimum": -30069,
"maximum": 30067,
"mean": 2132.0653935185187,
"most_common": [
[
-30069,
1045
],
[
30067,
915
],
[
-7173,
8
],
[
18687,
7
],
[
18717,
7
]
],
"status": {
"backend": "apple-usb-modem",
"connected": false,
"sample_rate": 7200,
"codec_direct": true,
"native_receive": false,
"codec_rates": [
7200
],
"frames": 60,
"prepared_codec_rates": [
7200.0
],
"preparation_ms": 0.17349899280816317,
"live_filter_misses": [],
"off_hook": false,
"ringing": false,
"resetting": false,
"control_updates": 0,
"samples_sent": 8640,
"samples_received": 8640,
"off_hook_pcm_seconds": 0.0,
"output_gap_samples": 0,
"input_overflow_samples": 0,
"raw_rx_peak": 30069,
"raw_rx_near_rail_samples": 0,
"raw_rx_mean": 2132.0653935185187,
"tx_gain": 1.0,
"error": null
}
},
{
"rate": 10286,
"off_hook": false,
"samples": 12360,
"minimum": -32768,
"maximum": 32767,
"mean": 2124.8249190938513,
"most_common": [
[
-32768,
1439
],
[
32767,
1239
],
[
18753,
14
],
[
18757,
11
],
[
-7299,
11
]
],
"status": {
"backend": "apple-usb-modem",
"connected": false,
"sample_rate": 10286,
"codec_direct": true,
"native_receive": false,
"codec_rates": [
10286
],
"frames": 60,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"preparation_ms": 1.6534579917788506,
"live_filter_misses": [],
"off_hook": false,
"ringing": false,
"resetting": false,
"control_updates": 0,
"samples_sent": 12360,
"samples_received": 12360,
"off_hook_pcm_seconds": 0.0,
"output_gap_samples": 0,
"input_overflow_samples": 0,
"raw_rx_peak": 32768,
"raw_rx_near_rail_samples": 2678,
"raw_rx_mean": 2124.8249190938513,
"tx_gain": 1.0,
"error": null
}
}
]
@@ -0,0 +1,133 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331330d"
],
"exit_code": 0,
"wall_seconds": 52.17469695804175,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8641.23446206601,
9600.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 97394,
"off_hook": false,
"off_hook_pcm_seconds": 29.988819755006805,
"output_gap_samples": 0,
"preparation_ms": 741.2467069225386,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": 105.0923409817979,
"raw_rx_near_rail_samples": 118,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514831,
"samples_sent": 514831,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 51,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,129 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331330d"
],
"exit_code": 0,
"wall_seconds": 52.83815845800564,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 96790,
"off_hook": false,
"off_hook_pcm_seconds": 29.943612677425627,
"output_gap_samples": 0,
"preparation_ms": 817.061458947137,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": 227.50315766571674,
"raw_rx_near_rail_samples": 16212,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514779,
"samples_sent": 514779,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1 @@
{}
+99
View File
@@ -0,0 +1,99 @@
# Advanced Apple physical-line / SIP modem controls
## Best verified result: 9600 bps with LAPM
The Apple-backed 403 caller reports **`CONNECT 9600/ARQ/V32/LAPM`** and the
Courier-emu I-modem SIP receiver reports **`CONNECT 9600/ARQ`**.
Both recover the other endpoint's **complete 180-byte ASCII message exactly**.
This is a short, genuine native modem data exchange with negotiated error
correction, **32 times the Bell 103 link rate**; it is not a measured throughput
benchmark or sustained reliability result.
Evidence: `v32-9600-lapm/payload-verification.json`, receiver terminal/report
logs, caller raw serial hex and independently verified physical hook release.
Both firmware images and modulation decisions remain unmodified. No synthetic
carrier/result or decoded receive payload is injected. Compression is disabled.
Listen at low volume (actual helper-bound TX left / raw hardware RX right):
```sh
afplay artifacts/apple-advanced-sip/v32-9600-lapm/caller/2903/apple-stereo.wav
```
## Five explicit attempts
All tests use SIP extension 2903, a 200-ms media reserve, distinct deterministic
180-byte messages and fresh capture directories. `NONE` is normal mode without
error correction. The payload columns mean **the entire expected message**, not
whether some recognizable bytes arrived.
| Control | Caller result | Receiver result | Apple → SIP exact | SIP → Apple exact |
| --- | --- | --- | --- | --- |
| `v22-1200` | CONNECT 1200/NONE | CONNECT 1200 | No | No |
| `v22bis-2400` | CONNECT 2400/NONE | CONNECT 2400 | No | **Yes** |
| `v32-9600` | CONNECT 9600/V32/NONE | CONNECT 9600 | No | **Yes** |
| `v34-auto` | CONNECT 19200/V32/NONE | CONNECT 19200 | No | No |
| `v32-9600-lapm` | **CONNECT 9600/ARQ/V32/LAPM** | **CONNECT 9600/ARQ** | **Yes** | **Yes** |
**The automatic 19200 result is not claimed as V.34.** The request enabled V.34
but left fallback available, and the actual caller result explicitly says V32.
It is a V.32-family/terbo indication, not proof of V.34 or usable 19200-bps data.
The five results are collected in `summary.json`.
Every call reports zero active Apple output gaps/input overflows and final
on-hook readback. Complete codec-to-helper TX replay is sample-exact for all
five captures (`tx-replay.json`). That replay is not an independent QAM receiver:
advanced-mode payload verdicts come from the actual firmware UARTs, with local
echo disabled, not from the Bell 103 audio decoder.
## Audio/network limitations remain
- V.22 at 1200 records 1393 active silence-fill samples and a 316-ms maximum
polled RTP arrival gap. The 200-ms reserve cannot absorb that entire gap.
- V.22bis records an incoming RTP sequence/timestamp gap of 480 samples, although
the FIFO does not run empty. A nonempty FIFO does not prove a continuous RTP
sample timeline: timestamp-aware playout remains required.
- The raw 9600 control has no recorded incoming RTP discontinuity or active
silence fill, yet some caller-to-I-modem characters corrupt. Network loss
alone is not a complete explanation for all earlier failures.
- The successful LAPM call still records a 160-sample RTP timestamp gap. This
does not establish when ARQ retransmissions occurred or prove that a specific
missing packet was recovered during payload transfer. It does establish both
negotiated LAPM and correct delivery of these complete messages. This preset
changes both `&M0` to `&M5` **and** `&B0` to `&B1`; the trial does not isolate
error correction from the fixed-DTE policy as the sole reason for improvement.
No gateway/PBX configuration, line gain, modem firmware or forced-online
assistance was changed. Each protocol is an ordinary volatile AT preset.
The established NVRAM is copied per receiver run; the original is not modified.
## Reproduce the usable control
One bounded real call, no automatic retry; use a new directory:
```sh
.venv/bin/python artifacts/apple-courier-sip/run.py \
--protocol v32-lapm --payload-test --payload-size 180 \
--carrier-wait 45 --frames 4500 --instructions 550000000 --timeout 115 \
--output artifacts/NEW-APPLE-V32-LAPM
```
Both firmwares receive:
```text
S54=192S56=192S58=33B0&M5&B1&U6&N6&K0
```
This disables V.8, V.34/V.FC and PCM, fixes both limits at 9600, requires error
correction (`&M5`), fixes the DTE rate (`&B1`), and disables compression. The
caller also uses `S27=1`, the receiver autoanswers, and payloads are sent only
after real firmware CONNECT. `&M5` requires error correction; the **observed
result string**, rather than the preset's name, establishes LAPM specifically.
The launcher now accepts explicit `v22`, `v22bis`, `v32`, `v34` and `v32-lapm`
profiles through `tools/apple_sip_profiles.py`, records requested settings and
actual CONNECT lines, and writes failure verdicts even when a caller exits
without receiver CONNECT. Existing captures are never overwritten.
The final focused suite passes **177 tests**, including six new profile controls.
Independent final USB status confirms on-hook after all five attempts.
+117
View File
@@ -0,0 +1,117 @@
[
{
"capture": "v22-1200",
"requested": "v22",
"caller_connect": "CONNECT 1200/NONE",
"receiver_connect": "CONNECT 1200",
"apple_to_sip_exact": false,
"sip_to_apple_exact": false,
"payload_bytes_each_way": 180,
"apple_active_output_gaps": 0,
"apple_input_overflows": 0,
"hook_released": true,
"sip_receive": {
"duplicates": 0,
"invalid_packets": 0,
"max_arrival_gap_ms": 316.46558293141425,
"max_timestamp_gap_samples": 0,
"reordered_packets": 0,
"sequence_gap_events": 0,
"ssrc_changes": 0,
"timestamp_jump_events": 0
},
"active_receive_fill": 1393
},
{
"capture": "v22bis-2400",
"requested": "v22bis",
"caller_connect": "CONNECT 2400/NONE",
"receiver_connect": "CONNECT 2400",
"apple_to_sip_exact": false,
"sip_to_apple_exact": true,
"payload_bytes_each_way": 180,
"apple_active_output_gaps": 0,
"apple_input_overflows": 0,
"hook_released": true,
"sip_receive": {
"duplicates": 0,
"invalid_packets": 0,
"max_arrival_gap_ms": 100.42475000955164,
"max_timestamp_gap_samples": 480,
"reordered_packets": 0,
"sequence_gap_events": 1,
"ssrc_changes": 0,
"timestamp_jump_events": 1
},
"active_receive_fill": 0
},
{
"capture": "v32-9600",
"requested": "v32",
"caller_connect": "CONNECT 9600/V32/NONE",
"receiver_connect": "CONNECT 9600",
"apple_to_sip_exact": false,
"sip_to_apple_exact": true,
"payload_bytes_each_way": 180,
"apple_active_output_gaps": 0,
"apple_input_overflows": 0,
"hook_released": true,
"sip_receive": {
"duplicates": 0,
"invalid_packets": 0,
"max_arrival_gap_ms": 87.5982919242233,
"max_timestamp_gap_samples": 0,
"reordered_packets": 0,
"sequence_gap_events": 0,
"ssrc_changes": 0,
"timestamp_jump_events": 0
},
"active_receive_fill": 0
},
{
"capture": "v34-auto",
"requested": "v34",
"caller_connect": "CONNECT 19200/V32/NONE",
"receiver_connect": "CONNECT 19200",
"apple_to_sip_exact": false,
"sip_to_apple_exact": false,
"payload_bytes_each_way": 180,
"apple_active_output_gaps": 0,
"apple_input_overflows": 0,
"hook_released": true,
"sip_receive": {
"duplicates": 0,
"invalid_packets": 0,
"max_arrival_gap_ms": 109.69841608311981,
"max_timestamp_gap_samples": 320,
"reordered_packets": 0,
"sequence_gap_events": 1,
"ssrc_changes": 0,
"timestamp_jump_events": 1
},
"active_receive_fill": 0
},
{
"capture": "v32-9600-lapm",
"requested": "v32-lapm",
"caller_connect": "CONNECT 9600/ARQ/V32/LAPM",
"receiver_connect": "CONNECT 9600/ARQ",
"apple_to_sip_exact": true,
"sip_to_apple_exact": true,
"payload_bytes_each_way": 180,
"apple_active_output_gaps": 0,
"apple_input_overflows": 0,
"hook_released": true,
"sip_receive": {
"duplicates": 0,
"invalid_packets": 0,
"max_arrival_gap_ms": 98.67758303880692,
"max_timestamp_gap_samples": 160,
"reordered_packets": 0,
"sequence_gap_events": 1,
"ssrc_changes": 0,
"timestamp_jump_events": 1
},
"active_receive_fill": 0
}
]
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"400000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"3200",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139325335363d3139325335383d33334230264d30264230265532264e32264b3053373d33304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 44.49474429199472,
"serial": "\r\nCONNECT 1200/NONE\r\ne\t\\x87o\\x92\\xd1&\\xfe\\xed\u0015#fd\\xef/Z\\xee{\\x95\\x90\\xa0Y\\xf7\\xf00\\x9e\\x9e\\x8f\\x9e\\xe3\\xf0\\xfa(^\\xe2u5\\x969\\xb1\\x98\b\\xba\\xdc\\xf8R\u0014\\xa6\\xc8\u001c\\xb4\\xdc\u0002\\xfa\\xf3\u0011|\\xb0\u0003\nj\\xe3\\xdeRH\\xda\\xe1\\x9bk\u0019\u0007{d\\xd8\\x83\\x99\t\\xcb\\x8c\\xd7Uv\\x83_\\xc8\\x8d\u0007)\\xfb\u0017\\xf0\\xb1\u0015\\xca\\xdah\\x83dO\\xa0\\xec\\xaa\\xa0%\\xf2Q\u0004\"\\xdd\\xf9|\\xe7\\x82N\\xe0l\\xec\\xf5\rkf\\x9d\\x85\\xf7\\x92\\xad\\xef\\x93g\\xe56\\xe0Seu=\u00177\\xa24\\x8e\\xd5\r*\\xa5\u0019{z\u0005+95\u0016ZG\\xb2Y\\x93\t\\xdb\nf*7*1$f\u0015AE\u0000\u0015]\\xfe\\xc9\\x9a\\xcf\\xfa\\xdb\\xbb{\\xff\\xdb\\xbb\\xdb\\xfb\\xff\\xdb\\xd8:\\x96\\xd5\\x90$\\xd7\\x97lV^\u0017\\xc3-\\xaeh\\xcf\u0012=N\\x91\\x8f\\xab\\xd9\\xe5\\xda\u0006\\xffS\\xc5l\u0003\\xd0[m\"v\\x82\u001c}\\x9f\\xb0\\xc4:*\\xc4\\xef\u001b1\\xb2S\u0000$W)\\xfd\\xfb\\xff\\xf9\u0013\\xe9U\\xbe\\xbb\\xeb{\\xeb\\xf3\\xeb\\xfb\\xff\\xf3\\xbb\\xeb\\xdb\\xbb\\xdb\\xdb\\xeb\\xdb\\xbb\\xeb\\xbb\\xdb\\xff\\xfb\\xff\\xeb\\xdb\\xdb\\xbb\\xdb\\xbb\\xeb\\xbb\\xf3\\xfb\\xff\\xff\\xdb\\xdb\\xeb\\xbb\\xeb\\xdb\\xbb\\xfb\\xfa\\xd4\\xfb\\xff\\xff\\xdb\\xdb{",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1989,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 74294,
"off_hook": true,
"off_hook_pcm_seconds": 30.305658176161774,
"output_gap_samples": 0,
"preparation_ms": 791.8989169411361,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -67.19923568805147,
"raw_rx_near_rail_samples": 22718,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 410042,
"samples_sent": 410042,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"400000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"3200",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139325335363d3139325335383d33334230264d30264230265533264e33264b3053373d33304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 42.2814402920194,
"serial": "\r\nCONNECT 2400/NONE\r\nSIP-TO-APPLE-456BMOZVAIBKGJHEVXDMQZUKT0C328PQLCGCHKQ90VEW8MGC394IOJL7LC8YCJ3KN2FDJEAIPHE490948M1TBB577BBQBM52HFMPFTGKEA0NKYV8LPFLNOPFMDY6O67P4M5AESFZO9EC5DZNY2RE6I6WCK3AL9R1BQW73CL\\xa4\\xf8~?~?~?~?~?\\xfe\\xff",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1977,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 73949,
"off_hook": true,
"off_hook_pcm_seconds": 30.06416488430877,
"output_gap_samples": 0,
"preparation_ms": 770.7209169166163,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -50.118280097556664,
"raw_rx_near_rail_samples": 22738,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 407558,
"samples_sent": 407558,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"550000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"4500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139325335363d3139325335383d33334230264d35264231265536264e36264b3053373d34354454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 55.29616095800884,
"serial": "\r\nCONNECT 9600/ARQ/V32/LAPM\r\nSIP-TO-APPLE-456BMOZVAIBKGJHEVXDMQZUKT0C328PQLCGCHKQ90VEW8MGC394IOJL7LC8YCJ3KN2FDJEAIPHE490948M1TBB577BBQBM52HFMPFTGKEA0NKYV8LPFLNOPFMDY6O67P4M5AESFZO9EC5DZNY2RE6I6WCK3AL9R1BQW73CL",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 2628,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 112851,
"off_hook": true,
"off_hook_pcm_seconds": 43.16449543068248,
"output_gap_samples": 0,
"preparation_ms": 777.3487500380725,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -272.46367931138764,
"raw_rx_near_rail_samples": 22967,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 542308,
"samples_sent": 542308,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"500000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"4200",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139325335363d3139325335383d33334230264d30264230265536264e36264b3053373d34304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 52.13055729109328,
"serial": "\r\nCONNECT 9600/V32/NONE\r\nSIP-TO-APPLE-456BMOZVAIBKGJHEVXDMQZUKT0C328PQLCGCHKQ90VEW8MGC394IOJL7LC8YCJ3KN2FDJEAIPHE490948M1TBB577BBQBM52HFMPFTGKEA0NKYV8LPFLNOPFMDY6O67P4M5AESFZO9EC5DZNY2RE6I6WCK3AL9R1BQW73CL\u001f\\x9b:\\x8f\\x82\\xff\\xbcI\\xcc\\xfa\\xc6\u007f\\x82\\xd1\\xd6\\xfc\\xd1",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 2470,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 89003,
"off_hook": true,
"off_hook_pcm_seconds": 39.98493097413961,
"output_gap_samples": 0,
"preparation_ms": 774.8824169393629,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -272.5086999095374,
"raw_rx_near_rail_samples": 23010,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 509603,
"samples_sent": 509603,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"550000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"4500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d305335363d305335383d33334230264d30264230265530264e30264b3053373d34304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 50.18711591698229,
"serial": "\r\nCONNECT 19200/V32/NONE\r\n\u001eX\\xa6\\xdd\\x9b\u0017\\\\xf1\\xfe\\xb6\\xc3i\u0016\\xd6\\xb3\u001fRy\u0012\\xb2!\\xd6\\xb7\\x88?5Y\\xf7\\xc1\\x84$\\xb1Y=[])\\xae\\xd4_\\x82\\x95u)\u0018r@\\x8e\u001e\\xe7t\\xf3\\xa7Q\\xfc]\\xf2#\\xc2I\\xee\\xdfg\u0005\u0001\u0012\\xa7u \\xf1\\x89h![\\x92g!W\\xa0e\\xc7g\\xb2]p\\x8e\\xf8\\xfbSP\\x9c\\xf6\\xed'\\xf1\\xab\u0011~\\xdaz-`\\x92\u0007\\xf1\\x92\b\\xdd\\x85{\\xad\u0004\u000e\\xd8\\xec\\xbf\\x85\\xfa\\xb2\u001f7F\\x94n[O1\\xc0Y\\xe3`\\xe1\\xf4\u0003\\xe4J\\xb3\\xc0\\x8a\\xe2\\xb9\\xc7d\\xecX`\u0018\\xeejjp<\\x9f\u0006\u0011\\xa1\u0003\u001a\\xb7\\xe2M\\xdb\\xbe\\xfd~x\u000b^\\xe8<\\xb0\\x87SB/T\\x8d\\xbe\\xac\u001f\\xf9W\\xb7\\xcfsx\\xdf\\xb4l\\x9bqB\\xe4\\x8b\\x95Euw\\x8f\\xe8\\xe7)%=\\xdd+\\xfc\u0010\\xf9\\x89\\xaf\\xce9\\xa8\\xb8\u0015\u00004\\x98Q\\xa7l\\xd9\"X\\xee\\xbc#\\xc5\\x8b\\xfd\\xfe\\x9c\\xc5\\x9d\\xa6J)\\xecQ\\x93q\\xa5\\xda}/o\\xaaNQy\\xc7\\x94\\x87)|\u0005X.\u0014\\xa8\\xac\\x8c\\xbf&1\\xc2Vh\\xa4K~CE\\xe0\\xb2\\xc0\\xf5\\xc5\u001cM\\xf7\\xf9y\\xf2aZ\u0007\\xab\\xf2t\\xa6\\xc2)\\xf1\u007f\\xd4\\x8f\\xa97JLSB\\xa0'\t\\xe7\\xe0\\x8d\\xc8\u0016\u001a\\xb2\\x8b2\\xf2\\x85\\x95\\xac\u0005^\u0012\u000e\\x91\\xd2\\x9dZ.\u001a\\x88\\x95o\\xc2+\\x8d\\xe3\\xfc,\\x81'\\xdb\\xff\\xd3\\x99\\x9dG\u001f\\xdc\\x84\\xf4\u0015Jm7\\xc3\\xcb&\u000emE\\x92\\xddTb&\u001fB\\xbe\\xd7\\xef\u001b\\x87R\\x80\\xe2W\u001fL\u0004{\u0016h\\x8ev~\\xd8\\xab^+8\u0010\u001d\\xcf\\xe6\\x80Y\\xe5R\\xbe!\\xe3\\xd8\\xc2\\xae\\xe6\\xcc\\x92\\xfa\\xbf\\xdb\\xa0\\xdb\\xb0\t\u0012\\x80\\xdbU\\xcd`\\xbfQZ\\x99\\xdb\\xda\u0005\u001e/v9\u001en\\x99J\\xf4\\xd6\\xe6\\xf0\u000eSVcz\\xe6\\xa16\\xc3\\xc6B\\x9aP\\xe7\u0006+\\xae\\x9c\u007f<R\\xde;\\xdbq\\xb1p\\xe2K\u001d\u001f\\xd9\\xc7?\"\"\\x83-B\\xe8Y\\xd3\\xed\\xabY\u0019o\\x88\\xde>\\xb9\\xf3\\x96\\x97\\xc1K\\xc6\u001bF\\xae\u0006\\xccT\\x8d\\xfc?s\\\u0012\\xd6\\xaat\\xcb\\xc1s\\xe7\\x86\u007f\\xd8in\"\\xe8\\xbc\\xba\n\bS\\xaa:w\u0014=)\"\u0011\\xa2\u007f\\xec@\\xac\\xaa\\x9fP\\xa8@`|\\xe5JBOH\u001d\\xf35\\xd7\\xfc\\xf6\\x979_%\u001d\u0003\\xdet\u001e}\\x88L\u00130s\u0017\\xc2\u001bz\\xc8o\\xd1\u0018A\\x83\u001a\\xedX\\xe3\\xb1\\x88\\xd9cw\\xbc\\xe7\\xa5o\\xcc\\x89\\xca/\\xdcUP\\xe26\\xac8\\xae\\xaf\\xd8\\xf0\f\\xd7u\\xfc;`c\\xa3\u0006&!\\x91\\x92\\xf0\\xee_\\xf0\\xee\\x85\\xba\\x993\\xe1$e\\xb4\u0000`\\xd7\\x9d\\xe5\\xc0I.f\\xa2\\xa3Q\\xe8x\\x82\\xa0l3]\\x9f\u00166\\x87k\\xc1<T\\x96K\\xef\\x8c\\xfa\\xcc\u0018\\xea\\xf6\\xbf\\xe04\\xf96>\\xdbwj\\x8aIu\\xdc\u0005\u0000\\x85`\\xc3\\x96d\\xf3\\x86\u0014AEO\\x90\\xe6\\x9c\u0002\\x8eE\\x97\\xf7\\xe5\u0003\\xeb\\xc3m\\xe7\\xab\\x87CyM\\xb8`\u0011\\x82[m\\xf6\\xb2\\x91\\xfaK\\xdc\\x921\\x90\\xda\\xdc\u001e\\xa7\\xf9nAC\\xb7\\xa0\u0002$75ja\\xa5\\xfcxU\\xa9N\\xfd\\x9f.\\xe0?\\x83\\xce\\x84\\xdd\\xb8\\x9c\\xfb\u0018\\xdd\\xbf~8\\xbb\\xc2\\xd9<D\\xcdE\u0017D\\x88\\xfb\u0007\\xf5\\xd8\\x94\u0000I\\x91\u000b\\x94\\x9c\\xf2\\xf8\u001f\\x81S\\xb8\\xd6\u001eK\\xda\\x81\\xb6\\xe6\br&)\\x95\u0015T*J\tgD\\xbf\u0017\\xa8K\\xbdt\\xf8\\x97]\\x84\u0015\\xdad\u0014\u0012.\\xda\\xd4\\xc2\\xdc\f\\xcd\\x9c\\xb5\\xa7\\xdd\\xa5\\xe8ja3\\xfe\\xab\\xeb\\xc1\u001c\\xd45\\xbf\\xc0K\\xa2\u0005\u0017;\t\\x8c\u0002\\xdf>\\\\x9f|\\xd7{\\xd9~+?a'V\\xa8\\x89\\xa2\u000b\\xc3$x\\xdc'\\x8e\u0016s\u0015\\x97U:\\xb8\\x88f\\xa4\\xbfe\\xee\u0015U\\xb1d\\xaa\\xdd!\\x98\\xdb~\\xe39\u0019\\xbf\\xc1\\xff\\xef\\xf5 \\xb9\\xa6[\\xa3&D\\x93#\\xbe_\\x93[B\\x80'}\\x92\\xad\\x8b\u0005\\xc6\\xa8\\xa0k\\xc6\\xfc{\\xd83=\\xebs\"\\xbf\u0016\\xc0\u0011E\\xff\u0003\\xe2\\x84\\xaa,\\xc6Pv0\\xfc<\\x85\\x87i\\xa1\\xd3\\xd4\\xbc\"9\\xcau\\xc3\\xc7\u001e\\xe7\\xeb\\x83\\xfc\\xd4\\xc3\\xfd9X\\x8dwrF\\xbcO<\u0018\\x90v\\xa9M\\x9c+\u0001\\x88G\u0001<I\\xa6\u001b\f,\\x99\u000b\\xcc\\xd5\\x9d\\xb7\\xda?$R\\xae\\xbem%\\xd8\u0015\\xd9R-\u0019<\\x9d`\\xbb\u0015\\xc1\u001c\\xa7\\xf9\u0010r\\x85eV\\xa8\u0019\u0007\\\\xad'3o\\xc4\\xc2\\x8f.`u\\xe8\\xfb\\xd4x6\\x88\\xa4z\\x86\\xbeD\\xed\\xbeD\\xe7\u0002]\\xf6\\x90{\\xa7\rV\\x83\\xc6\\xe8\\xcb\\xc7\\xaa\\x86j9\\xc8;\\xfdm+\\xc6\u000f\u0012Y\\xccT\\xc4(\\x86Ay\\x8c&\\x80\u0013\\x88\u0015\\xfd\u0003\\xa3r\\xa4\\x8b\\xa22x\\xe1\\xd6\u0011\\xe4\\xa6a\u001e\\x99\\x89\\xb2\u0019~x5g\\xca\\xf1\"\\xaa\u0013y\u0016w\u001c\u0007\u000b\\xfdk\\x92o\\xaf\\xa6i\\x8aU\\xc7\\x8a`,\\x8c\\x81\\xc3\\x96\u0011;\fS\\xc6)\\xbd\\xdb\\xfcgy\\xb6\\xecEy\\xc6h\u007f\\xa2S\\xfb\\xac\\xc4\\xe0\u001f\\xde:e\\xf1\\xc2\\x90\\xf5a\\xa0\\xa8\\xd6\\xe1\\xbf\\xd2}\\x81\\xd3\\x8b\\x8f\\xc4\\xed\u001e\\xe51\\xda\u0004\\x9e\\x8e\u0018\\x86c\\xbdeUb\u0003\\x8e\u0018\\xf6\\\\xae+\\xf2Za\u000fx\\xac\\xd4\\xde\\x8fS,\\x83\\x8e\\xc0\u001b\\xedR\\xf0\u001c\\xf4|T\\xcb",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 2373,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 96262,
"off_hook": true,
"off_hook_pcm_seconds": 38.05308185883725,
"output_gap_samples": 0,
"preparation_ms": 775.0256259460002,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -282.9913773555998,
"raw_rx_near_rail_samples": 20194,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 489525,
"samples_sent": 489525,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
+61
View File
@@ -0,0 +1,61 @@
# Does Asterisk see the calls?
**Resolved:** [the backend's extra 12 dB TX attenuation was the cause](../apple-dtmf-gain/README.md).
Unity gain now routes complete 6312/6313 numbers, with answered CDRs. No gateway
or PBX configuration changed. The capture below is the original failing level.
**Yes, but the controlled 6312 retry reaches Asterisk as destination `6`, not
`6312`. Asterisk rejects it with `484 Address Incomplete`.**
## Passive live capture
Read-only SSH inspection and a bounded 65-second `tcpdump` on Asterisk
(`192.168.88.122`, TCP/UDP 5060) ran around a single optimized 403/Apple call to
6312. No PBX configuration or logging levels were changed. Capture reports zero
kernel drops. Hook release and a clean local `NO CARRIER` were verified.
Relevant transaction, 2026-10-22 NZDT:
```
11:33:19.043811 10.69.111.3:34826 -> Asterisk:5060 INVITE sip:6@192.168.88.122
11:33:19.044205 Asterisk -> gateway 401 Unauthorized
11:33:19.111201 gateway -> Asterisk INVITE sip:6@192.168.88.122
11:33:19.111817 Asterisk -> gateway 484 Address Incomplete
```
The second INVITE is the normal authentication retry, not another call. No
INVITE for 6312, or outbound call to that extension, appears in the capture.
The capture contains other endpoints' periodic OPTIONS/REGISTER traffic, which
should not be mistaken for calls generated by this experiment.
The retained codec TX independently decodes as **6312**. Host-side codec DTMF
detection times are approximately 11:33:17.603, .753, .902 and 11:33:18.041;
these are not exact DAC playback timestamps. The gateway's INVITE follows the
fourth codec digit by about one second. We cannot yet distinguish missing
physical DTMF recognition from gateway digit-map/translation behavior. Do not
conclude from this evidence alone that it dials immediately on the first digit.
This attempt does **not** reach the requested modem extension. It is therefore
not a valid modem negotiation/interoperability test yet. Next investigate the
actual gateway digit collection, physical DTMF level/timing and dial plan.
## Why historical CDR inspection was inconclusive
- CDR is enabled, but unanswered and congestion logging are disabled.
- CEL is disabled; file logging contains only notices/warnings/errors.
- No matching answered CDR exists for our earlier attempts.
- CDR timestamps use GMT; local PBX/Mac timestamps use NZDT (+13).
- Before the controlled retry, Master.csv last changed at 09:07:25 NZDT,
before the 09:41/09:42 extension attempts.
Absent CDRs alone did not establish whether a request arrived. The SIP capture
above is the decisive evidence.
## Files
- `sip-live.log`, `sip-capture-status.log`: packet summaries and capture health.
- `live-check.json`: capture window and INVITE summaries.
- `digit-correlation.json`: independently decoded TX and timestamp comparison.
- `retry/6312/`: full firmware report, codec captures, hardware log, hook status.
- `cdr-check.json`, `logging-and-journal.txt`, `recent-calls-and-transports.txt`:
read-only historical/logging checks.
@@ -0,0 +1,99 @@
{
"number": "6312",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"0.25",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331320d"
],
"exit_code": 0,
"wall_seconds": 51.6220628330484,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 96792,
"off_hook": false,
"off_hook_pcm_seconds": 29.943612677425627,
"output_gap_samples": 0,
"raw_rx_mean": 271.99893352292924,
"raw_rx_near_rail_samples": 55062,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514779,
"samples_sent": 514779,
"tx_gain": 0.25
},
"digit_commands": {
"0013:0001": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,28 @@
# Full Apple audio-path audit
Main report: [docs/apple-audio-path-audit.md](../../docs/apple-audio-path-audit.md).
- `pcm-audit.json`: exact TX converter replay, payload levels/clipping, ADC
snapshots and authoritative helper failure counters for nine captures.
- `live-180/`: new real Apple -> SIP I-modem call. Both complete 180-byte
payloads and all five independent audio decodes pass. The full RTP capture
nevertheless exposes four missing outgoing packets **after** the payload.
- `live-180/rtp-byte-audit.json`: timestamp-aware comparison to DSP TX;
zero changed bytes across the PBX's shared packets in either direction.
- `previous-rtp-byte-audit.json`: analogous check of the preceding saved call,
including its recorded reordered packets.
- `audio-device.json`, `route-to-pbx.txt`: read-only device/route observations.
- `helper-selftest.*`: native callback/reset/strict-failure checks, no hardware.
- `silent-retune-probe.*`: powered-line, **no digits dialed**, silence-only
7200 -> 9600 host converter/transport smoke probe and hook release evidence.
Listen, at low volume (hardware TX left / raw RX right):
```sh
afplay artifacts/apple-audio-path-audit/live-180/caller/2903/apple-stereo.wav
```
This is not a claim of end-to-end reliability: the report distinguishes
successful payloads from actual packet delivery holes and the older host
underrun. No waveform gain, firmware decision or decoded modem byte is patched.
The actual electrical line voltage and post-DAC waveform have not been probed.
+157
View File
@@ -0,0 +1,157 @@
# Apple physical line → SIP → Courier-emu I-modem
Two explicit calls were made to local PBX extension **2903**, using the Apple
USB line backend and the unmodified 403 firmware. No gateway/PBX configuration
was changed. The receiver runs Courier-emu's I-modem firmware, not v90modem.
## Latest: working 180-byte exchange both ways
The [repaired control](bell103-fair-clock-180-buffer200/README.md) now reports
both firmware CONNECTs and **exact 180-byte payloads in both directions**.
Independent FSK decoding confirms each full payload at all five captured audio
boundaries. The receiver's complete **48000-sample** payload interval is
byte-identical to SIP RX. Fixes remove redundant live terminal throttling and
bound DSP catch-up by actual CPU progress; this configuration explicitly uses
**200 ms SIP buffering**. Apple reports zero active sample loss and verified
hook release. A second packet-captured trial also passes both 180-byte payloads
and all audio checks. Other retries still show occasional return-path corruption
or an Apple host output underrun: the systematic bit-pump timing fault is fixed,
but end-to-end reliability is **not yet established**. **143 regressions pass.**
Sustained BER and high-speed training remain separate tests.
```sh
.venv/bin/python artifacts/apple-courier-sip/run.py --protocol bell103 \
--payload-test --payload-size 180 --buffer-ms 200 --output artifacts/NEW-CAPTURE
```
The sections below retain the earlier failures rather than rewriting history.
## Earlier follow-up: real Bell 103 CONNECT, but corrupt payload
The default/high-speed call below still fails. A **fixed 300-bps Bell 103**
control now returns firmware `CONNECT` on **both ends**, twice:
`bell103-control/` and `bell103-payload-ready/`. This is native modem carrier
qualification, not merely SIP answering. Both use the software-pair preset
`B1&N1S54=192S56=192&M0&B0` (caller also `S27=1`), without simulated carrier.
The payload run sends `APPLE-TO-SIP-123` after caller CONNECT and
`SIP-TO-APPLE-456` after receiver CONNECT. **Neither marker is recovered**;
both terminals receive garbled bytes. See
`bell103-payload-ready/payload-verification.json`.
A subsequent [boundary audit](bell103-payload-ready/boundary-findings.md)
independently recovers the complete caller marker in Apple hardware TX **and
SIP RX**, then identifies **30 inserted mu-law silence samples** inside that
message in the I-modem's DSP-facing stream. The reverse expected marker is
already undecodable at I-modem SIP TX. This narrows the investigation to the
SIP-backed endpoint's playout/DSP/data handling, without exonerating all other
boundaries or claiming the UART corruption is fully explained. Carrier acquisition works
at 300 bps, but successful data communication is **not established**.
Both calls report zero active Apple output gaps/input overflows and verified
physical hook release. This does not exclude distortion, receiver timing,
UART/framing faults, or SIP playout problems.
Listen to the actual connected call (TX left / RX right):
```sh
afplay artifacts/apple-courier-sip/bell103-payload-ready/caller/2903/apple-stereo.wav
```
A separate `bell103-payload/` attempt never reached the receiver. Its preflight
found a registered but **Unavail** PBX contact; the original check mistakenly
accepted registration alone. The launcher now waits for an **Avail** contact
before seizing the line, and the subsequent payload call reaches CONNECT.
No PBX configuration or qualification policy was changed.
To repeat the explicit payload control in a fresh directory:
```sh
.venv/bin/python artifacts/apple-courier-sip/run.py --protocol bell103 \
--payload-test --output artifacts/NEW-BELL103-CAPTURE
```
The launcher now records payload verdicts from actual firmware serial output
(not local terminal echo) and exits 2 if either marker fails. The first saved
payload capture predates that exit-status check; consult its verification JSON,
not its process exit code. Current focused regressions: **41 passed**.
## Answered retry / listen
The useful capture is **`profile-retry/`**:
```sh
# Left = actual helper-bound TX; right = raw helper-returned RX.
afplay artifacts/apple-courier-sip/profile-retry/caller/2903/apple-stereo.wav
# Each direction at the remote SIP endpoint, separately:
afplay artifacts/apple-courier-sip/profile-retry/receiver/audio/caller-to-imodem.wav
afplay artifacts/apple-courier-sip/profile-retry/receiver/audio/imodem-to-caller.wav
```
The stereo recording preserves the 10286-Hz hardware grid and levels, without
AGC, normalization or DC blocking. It includes dial tone, digits, ringback and
two training attempts. Channels are paired at helper exchanges, not calibrated
to physical DAC/ADC latency; reset gaps are omitted. The independent SIP WAVs
have different time origins; do not align their starts and infer a line delay.
The existing `analysis-hardware/{tx,rx}-8000.wav` files provide separate
resampled mono Apple channels.
### Verified
- Asterisk routes the complete **2903**, from the Apple line's SIP identity
**6004**, to the registered I-modem test account.
- Receiver transcript: configuration `OK`, `RING`, then `NO CARRIER`.
- SIP: REGISTER/401/200, INVITE, 100/180/200, ACK and caller BYE.
- RTP: **130080 received / 137760 sent octets** at the I-modem SIP endpoint.
- Apple: **29.978 seconds off-hook PCM**, zero active output gaps, zero input
overflows, no live filter misses, and independently verified on-hook afterward.
- Actual clock transitions include 7200 → 8641.234462 → 9600 Hz, and a later
10267.379679-Hz transition, without a transport error.
- Hardware RX contains answer-tone bands at approximately **14.8–17.2** and
**22.8–25.6 seconds** in its off-hook capture clock; caller TX responds.
- The very high RX levels/near-rail counts are concentrated in dial tone and
ringback. Complete 15–28-second training windows have zero near-rail samples
in the resampled analysis; this is not an absolute analog calibration.
**Neither modem reaches CONNECT.** This establishes an audible, bidirectional
physical/SIP path, not successful training or error-free media delivery.
The I-modem reports 40434 silence-filled bearer samples, including a preanswer
period (31860 preanswer output samples). These counters have different semantics;
subtracting them is not a packet-loss measurement. The remaining receive pacing
and training behavior need investigation before calling this path lossless.
See `receiver/report.log`, `caller/2903/summary.json`, `caller-timeline.txt`, and
`pbx-cdr.log` for raw evidence.
## First attempt (root directory)
Digits reached Asterisk correctly, but a blank I-modem profile rejected Q.931
SETUP with cause **88, incompatible destination** before answering. All receiver
G.711 files are empty. This was not an Apple digit/transport failure.
The retry copied the established inbound-test NVRAM into the capture directory
and mapped the SIP extension to its directory number with
`--bri-call-to 7349195`. The original NVRAM fixture was not modified.
## Reproduce / export
`run.py` registers test account 2903, configures autoanswer, verifies its PBX
contact, makes one bounded dial attempt, and detaches the receiver afterward.
It obtains that account's password over SSH into child environment only, without
printing/persisting it. It needs the connected powered analog line and existing
SSH access to the lab PBX. Use a **new** output directory; no automatic redial:
```sh
.venv/bin/python artifacts/apple-courier-sip/run.py --output artifacts/NEW-APPLE-SIP
.venv/bin/python tools/render_apple_audio.py artifacts/NEW-APPLE-SIP/caller/2903
.venv/bin/python -m tools.analyze_bri_sip_audio \
--from-caller artifacts/NEW-APPLE-SIP/receiver/apple-to-imodem.g711 \
--from-imodem artifacts/NEW-APPLE-SIP/receiver/imodem-to-apple.g711 \
--output artifacts/NEW-APPLE-SIP/receiver/audio
```
The existing one-shot Apple dial runner now accepts explicit numeric extensions
and refuses to overwrite a capture directory. `tools/render_apple_audio.py`
exports raw stereo offline with no NumPy dependency; malformed/unpairable PCM
fails rather than silently shifting channels. Focused regressions:
**46 passed, 1 skipped** (optional NumPy analysis module in the main venv).
The sibling venv supplies NumPy for the captured timeline analysis, but does not
have pytest installed.
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233"
],
"exit_code": 0,
"wall_seconds": 38.11908350000158,
"serial": "\r\nCONNECT\r\n\\xff\\xdf\\xfb\\xdf\\xd3}\\xd7\\xbboo?\\x92\u0002\\xb2",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1775,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 52460,
"off_hook": true,
"off_hook_pcm_seconds": 26.03956834532374,
"output_gap_samples": 0,
"preparation_ms": 763.4747499832883,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -252.26390100260562,
"raw_rx_near_rail_samples": 22957,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 365747,
"samples_sent": 365747,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,128 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d"
],
"exit_code": 0,
"wall_seconds": 33.210092541063204,
"serial": "\r\nCONNECT\r\n\\xff",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1532,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 46509,
"off_hook": true,
"off_hook_pcm_seconds": 21.149718063387127,
"output_gap_samples": 0,
"preparation_ms": 783.6435830686241,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -46.0618576636551,
"raw_rx_near_rail_samples": 22805,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 315450,
"samples_sent": 315450,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233"
],
"exit_code": 0,
"wall_seconds": 37.96079458296299,
"serial": "\r\nCONNECT\r\n\\xffv5'm7o\\xfb\\xf6um\\xc9i\\xdb\u007f\\xdb\\xfb\\x96n\\xcd\\xcf",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1770,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 49870,
"off_hook": true,
"off_hook_pcm_seconds": 25.93904335990667,
"output_gap_samples": 0,
"preparation_ms": 777.4538749363273,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -338.0479801926446,
"raw_rx_near_rail_samples": 23046,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 364713,
"samples_sent": 364713,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,110 @@
# Working Apple physical line / SIP Bell 103 payload control
**Result: both unchanged firmware modems report CONNECT and recover all 180
ASCII bytes sent by the other modem.** Independent FSK decoding recovers each
complete payload at every saved audio boundary. This is a working short
300-bps data exchange, not just SIP answer or carrier detection.
**Repeatability qualification:** a second independently captured call
(`../bell103-packet-audit-retry/`) also passes all 180 bytes each way and all five
independent audio checks. An intervening repeat has two corrupt return-path
characters even though its emitted SIP audio decodes perfectly; another attempt
fails closed on an 80-sample Apple output underrun. Thus the systematic emulator
bit-pump fault is repaired, but the complete physical/network path is **not yet
reliably error-free**. Those failures are retained, not discarded as outliers.
## Reproduce
Uses the powered Apple analog line (SIP identity 6004), PBX extension 2903,
403 caller firmware and Courier-emu I-modem receiver. No PBX configuration,
modem firmware, successful-carrier events or decoded receive bytes are patched.
Use a new output directory; this makes **one** bounded real call:
```sh
.venv/bin/python artifacts/apple-courier-sip/run.py \
--protocol bell103 --payload-test --payload-size 180 --buffer-ms 200 \
--output artifacts/NEW-APPLE-BELL103
```
The experiment launcher now defaults to the tested 200-ms SIP reserve. The
production CLI's general SIP defaults are unchanged; select
`--bri-sip-buffer-ms 200` explicitly when reproducing its receiver separately.
## Fixes and controlled comparisons
1. **Remove redundant interactive CPU throttling during live DSP bearers.**
`courier_emu/isdn_console.py` previously slept against retired CPU instruction
count even while SIP already paced the DSP and peripheral timers from
monotonic time. This starved the firmware's CPU-serviced FSK bit banks.
Offline/idle terminal pacing is retained and rebased when a live call ends.
2. **Do not treat every data-port access as another CPU scheduling turn.**
The native wall-clock catch-up path formerly allowed another whole DS0
frame on each closely spaced status/ACK access. A backlog could therefore
rush the bit pump through frames before the supervisor serviced its banks.
`native/c5x_capi.cpp` now bounds each advance by CPU instructions actually
retired as well as one DS0 frame. The absolute wall target remains owed;
it is not shortened and no DSP/audio cycles are discarded.
3. **Use an explicit receive reserve suitable for this test path.**
At 100 ms, the 180-byte trial still inserted **80 silence samples (10 ms)**
into the receive payload, corrupting two characters. With 200 ms, its entire
**48000-sample** receive payload interval is byte-identical from SIP RX to
the recorded DSP-facing stream. This is a tested configuration, not proof
that every future network outage can be absorbed or a global default change.
Comparisons remain preserved:
| Capture | Actual firmware payload result |
| --- | --- |
| `../bell103-buffer100` | both corrupt; old scheduling, larger reserve alone insufficient |
| `../bell103-single-clock` | substantially improved, still corrupt; terminal fix alone insufficient |
| `../bell103-fair-clock` | both 16-byte markers correct with both scheduling fixes, 100 ms |
| `../bell103-fair-clock-180` | reverse 180 correct; forward two corrupt characters, exact 80-sample receive insertion |
| this capture | **both 180-byte payloads exact**, both scheduling fixes, 200 ms |
Independent software-pair controls with the same image and saved profile also
pass both markers: `../offline-bell103-profile` and
`../offline-bell103-wallclock`. The problem was not repaired by changing modem
waveform gain or substituting a different modem engine.
## Evidence / listen
- `payload-verification.json`: both firmware CONNECT and both full payload
checks true; expected strings and raw caller serial hex included.
- `bell103-boundary-audit.json`: exact full payloads at Apple hardware TX,
I-modem SIP RX, I-modem DSP-facing RX, I-modem SIP TX and Apple hardware RX.
Source interval 18590..66590 matches heard interval 54928..102928 exactly.
- `receiver/report.log`: zero data-bank busy writes, zero torn holding words;
native clock statistics are now included in standard I-modem reports.
- `caller/2903/summary.json`: zero active Apple output gaps/input overflows;
independent final USB hook readback confirms released/on-hook.
- `caller/2903/apple-stereo.wav`: actual helper-bound TX left / raw RX right,
no normalization or DC removal. Turn playback volume down first:
```sh
afplay artifacts/apple-courier-sip/bell103-fair-clock-180-buffer200/caller/2903/apple-stereo.wav
```
## Regression verification
**143 tests pass** across the focused audio/SIP/clock suite (106) and additional
I-modem pair, terminal handoff, CLI and native-machine checks (37), including
new terminal live-clock/rebase controls, a native
same-CPU-turn status-access regression, independent Bell 103 decoder controls,
Apple ADC-grid/rate-change tests, and existing native port, receive-pacing and
SIP playout/media-clock tests. See `tests/test_isdn_console_clock.py`,
`tests/test_native_port_models.py`, and `tests/test_apple_bell103_audit.py`.
## Limits
This validates short ASCII payloads at 300 bps on this physical/SIP path. It
does not establish sustained BER, arbitrary binary transparency, long-duration
stability or V.34/x2/V.90 training. The passive PBX capture in the second
successful trial observes up to **101.84 ms interarrival** on I-modem-to-PBX RTP
and an out-of-order arrival (sequence 18025 preceding 18023/18024), forwarded
in that order toward the ATA. The ATA tolerates it in that trial; this does not
prove that network jitter caused the earlier failed repeat. Packet loss/delay,
remote playout and sporadic host audio service stalls remain open boundaries.
Initial carrier/transient bytes outside the
payload are not counted as payload errors; no claim is made that every sample
before answer or after hang-up is speech/modem media. Earlier failed captures
and their failure verdicts have not been overwritten.
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 38.343765166937374,
"serial": "\r\nCONNECT\r\nSIP-TO-APPLE-456BMOZVAIBKGJHEVXDMQZUKT0C328PQLCGCHKQ90VEW8MGC394IOJL7LC8YCJ3KN2FDJEAIPHE490948M1TBB577BBQBM52HFMPFTGKEA0NKYV8LPFLNOPFMDY6O67P4M5AESFZO9EC5DZNY2RE6I6WCK3AL9R1BQW73CL",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1772,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 61474,
"off_hook": true,
"off_hook_pcm_seconds": 25.97929224188217,
"output_gap_samples": 0,
"preparation_ms": 813.2268330082297,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -54.4755715134734,
"raw_rx_near_rail_samples": 22262,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 365127,
"samples_sent": 365127,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 38.11988495895639,
"serial": "\r\nCONNECT\r\n\\xffSIP-TO-APPLE-456BMOZVAIBKGJHEVXDMQZUKT0C328PQLCGCHKQ90VEW8MGC39\"\u0000OJL7LC8YCJ3KN2FDJEAIPHE490948M1TBB577BBQBM52HFMPFTGKEA0NKYV8LPFLNOPFMDY6O67P4M5AESFZO9EC5DZNY2RE6I6WCK3AL9R1BQW73CL",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1765,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 58575,
"off_hook": true,
"off_hook_pcm_seconds": 25.838323935446237,
"output_gap_samples": 0,
"preparation_ms": 779.1460420703515,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -243.03068932046844,
"raw_rx_near_rail_samples": 22437,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 363677,
"samples_sent": 363677,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 38.27326779195573,
"serial": "\r\nCONNECT\r\n\\xffSIP-TO-APPLE-456BMOZVAIBKGJHEVXDMQZUKT0C328PQLCGCHKQ90VEW8MGC394IOJL7LC8YCJ3KN2FDJEAIPHE490948M1TBB577BBQBM52HFMPFTGKEA0NKYV8LPFLNOPFMDY6O67P4M5AESFZO9EC5DZNY2RE6I6WCK3AL9R1BQW73CL",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1770,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 58859,
"off_hook": true,
"off_hook_pcm_seconds": 25.93904335990667,
"output_gap_samples": 0,
"preparation_ms": 778.2632909948006,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -52.078190248222576,
"raw_rx_near_rail_samples": 22537,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 364713,
"samples_sent": 364713,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233"
],
"exit_code": 0,
"wall_seconds": 37.92971445794683,
"serial": "\r\nCONNECT\r\n\\xffSIP-TO-APPLE-456",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1771,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 50785,
"off_hook": true,
"off_hook_pcm_seconds": 25.95916780089442,
"output_gap_samples": 0,
"preparation_ms": 774.1498749237508,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -261.17387372574814,
"raw_rx_near_rail_samples": 22850,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 364920,
"samples_sent": 364920,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 0,
"wall_seconds": 38.24229283398017,
"serial": "\r\nCONNECT\r\n\\xffSIP-TO-APPLE-456BMOZVAIBKGJHEVXDMQZUKT0C328PQLCGCHKQ90VEW8MGC394IOJL7LC8YCJ3KN2FDJEAIPHE490948M1TBB577BBQBM52HFMPFTGKEA0NKYV8LPFLNOPFMDY6O67P4M5AESFZO9EC5DZNY2RE6I6WCK3AL9R1BQW73CL",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1775,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 59098,
"off_hook": true,
"off_hook_pcm_seconds": 26.03956834532374,
"output_gap_samples": 0,
"preparation_ms": 807.7174590434879,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -258.1151096249593,
"raw_rx_near_rail_samples": 22991,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 365747,
"samples_sent": 365747,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,94 @@
{
"10.69.111.3_5012--192.168.88.122_15914--2cf888d3": {
"packets": 806,
"payload_bytes": 128960,
"first_time": 1792699608.523806,
"last_time": 1792699624.635982,
"gaps": [],
"max_interval_ms": 84.53798294067383
},
"192.168.88.122_15914--10.69.111.3_5012--0a7bcb19": {
"packets": 795,
"payload_bytes": 127200,
"first_time": 1792699608.528794,
"last_time": 1792699624.403697,
"gaps": [],
"max_interval_ms": 40.21501541137695
},
"10.69.220.8_62620--192.168.88.122_14366--a4496513": {
"packets": 599,
"payload_bytes": 95840,
"first_time": 1792699665.069518,
"last_time": 1792699677.034503,
"gaps": [
{
"after_sequence": 18022,
"next_sequence": 18025,
"sequence_delta": 3,
"timestamp_delta": 480,
"time": 1792699668.115993
},
{
"after_sequence": 18025,
"next_sequence": 18023,
"sequence_delta": 65534,
"timestamp_delta": 4294966976,
"time": 1792699668.116057
},
{
"after_sequence": 18024,
"next_sequence": 18026,
"sequence_delta": 2,
"timestamp_delta": 320,
"time": 1792699668.11611
}
],
"max_interval_ms": 101.84311866760254
},
"10.69.111.3_5004--192.168.88.122_19638--36cb9f69": {
"packets": 606,
"payload_bytes": 96960,
"first_time": 1792699665.088945,
"last_time": 1792699677.22819,
"gaps": [],
"max_interval_ms": 58.157920837402344
},
"192.168.88.122_14366--10.69.220.8_62620--36cb9f69": {
"packets": 594,
"payload_bytes": 95040,
"first_time": 1792699665.195799,
"last_time": 1792699677.029181,
"gaps": [],
"max_interval_ms": 58.159828186035156
},
"192.168.88.122_19638--10.69.111.3_5004--a4496513": {
"packets": 594,
"payload_bytes": 95040,
"first_time": 1792699665.1971,
"last_time": 1792699677.034547,
"gaps": [
{
"after_sequence": 18022,
"next_sequence": 18025,
"sequence_delta": 3,
"timestamp_delta": 480,
"time": 1792699668.116026
},
{
"after_sequence": 18025,
"next_sequence": 18023,
"sequence_delta": 65534,
"timestamp_delta": 4294966976,
"time": 1792699668.116074
},
{
"after_sequence": 18024,
"next_sequence": 18026,
"sequence_delta": 2,
"timestamp_delta": 320,
"time": 1792699668.116122
}
],
"max_interval_ms": 101.81283950805664
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233334e4548593356483546494f42434f474937534c30304f5046584d4e363451534e3733374d375343344a4930365147345747465435484759534239345a593251454c32435553413850504f4f594a46594234335646394a4355524f384733545a4c4c52583743355749564542594b30315353385530515237435a3256304a4933323841483542564a50335948514139384844494a375744395150513146535934544d3036"
],
"exit_code": 1,
"wall_seconds": 24.70791337499395,
"serial": "",
"error": "Apple audio helper closed (see its stderr)",
"bridge_error": "Apple line: Apple audio helper closed (see its stderr)",
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": false,
"control_updates": 4,
"error": "Apple audio helper closed (see its stderr)",
"frames": 1101,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 32870,
"off_hook": true,
"off_hook_pcm_seconds": 12.47657009527513,
"output_gap_samples": 0,
"preparation_ms": 776.0335829807445,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": 27.88996543463079,
"raw_rx_near_rail_samples": 20536,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 226238,
"samples_sent": 226238,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1 @@
{}
@@ -0,0 +1,62 @@
# Bell 103: locate corruption before blaming the Apple analog transport
Offline audit of the existing payload call; **no new call or firmware changes**.
`tools/analyze_apple_bell103.py` independently demodulates Bell 103 and scans
8N1 frames at 24 timing phases. It checks raw and parity-stripped bytes; it
does not use firmware CONNECT as evidence of correct data.
| Saved boundary | Independent decode of expected marker |
| --- | --- |
| Apple helper-bound TX, 10286 Hz | Exact `APPLE-TO-SIP-123` |
| I-modem SIP RX, PCMU/8000 Hz | Exact `APPLE-TO-SIP-123` |
| I-modem recorded DSP-facing RX, PCMU/8000 Hz | `APPLE-TO-SIP` prefix only; full marker absent |
| I-modem outgoing SIP audio, PCMU/8000 Hz | No exact `SIP-TO-APPLE-456` |
| Apple raw hardware RX, 10286 Hz | No exact `SIP-TO-APPLE-456` |
The first two boundaries independently establish successful delivery of this
specific 16-byte caller message through the Apple TX/analog/gateway/SIP path.
This does not prove arbitrary traffic or the reverse analog path error-free.
## Exact digital-stream discrepancy
Unlike an analog correlation, both I-modem receive captures use identical
G.711 codewords. Exact byte comparison anchors the source marker at SIP RX
sample **19333** to the heard stream at **54993**. The constant offset is
**35660 samples**.
At **SIP source sample 22560 / heard sample 58220**, the heard stream inserts
**30 consecutive `ff` mu-law silence samples**. The following **128 codewords**
match the original source exactly after adding those 30 samples to the offset.
That is **3.75 ms**, longer than one 300-bps bit (3.333 ms), inserted *inside*
the test message. See `bell103-boundary-audit.json` for exact interval offsets
and the byte-verified resynchronization.
Therefore the SIP RX recording alone was insufficient proof of waveform
integrity at the modem-facing boundary. The original summary's "zero active
Apple transport loss" remains true, but says nothing about these I-modem
playout insertions.
This is a concrete defect in end-to-end playout, not yet a complete root cause
for all the corrupted UART bytes: the decoded prefix is intact at the recorded
DSP-facing boundary, yet the firmware serial output is already wrong. The
reverse outgoing audio also fails the expected-marker check before reaching
the Apple receiver. DSP bit timing, data-bank handshakes and terminal framing
still need tracing. The audio decoder failing to find a marker is not by itself
proof of precisely which one is wrong.
## Reproduce without hardware
```sh
OPENBLAS_NUM_THREADS=1 ../v90modem/.venv/bin/python \
tools/analyze_apple_bell103.py artifacts/apple-courier-sip/bell103-payload-ready
OPENBLAS_NUM_THREADS=1 \
PYTHONPATH=../v90modem/.venv/lib/python3.13/site-packages \
.venv/bin/python -m pytest -q \
tests/test_apple_bell103_audit.py tests/test_3453_peer_uart_audio.py \
tests/test_bearer_sip_playout.py tests/test_sip_media_clock.py tests/test_sip_media_start.py
```
**30 tests pass.** Synthetic controls recover the complete marker at
7200/8000/10286 Hz with both Bell 103 tone pairs, reject silence as a payload,
and identify an inserted 30-sample silence run by exact byte matching. These
are independent analyzer controls, not a claim that the live link is repaired.
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233"
],
"exit_code": 0,
"wall_seconds": 38.12159458408132,
"serial": "\r\nCONNECT\r\n\\xff\\xdf]\\xdd\\xdb\\xbbg\\xdb\\xfbo?\\x9b\\x93mm\\xff\\x93}o\\xf7\\xdf\\x9f\\xfd",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1777,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 52845,
"off_hook": true,
"off_hook_pcm_seconds": 26.079914446820922,
"output_gap_samples": 0,
"preparation_ms": 775.8459579199553,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -374.4294765704797,
"raw_rx_near_rail_samples": 23274,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 366162,
"samples_sent": 366162,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,136 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233"
],
"exit_code": 0,
"wall_seconds": 52.74107983405702,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 97233,
"off_hook": false,
"off_hook_pcm_seconds": 29.98395877892281,
"output_gap_samples": 0,
"preparation_ms": 751.8285841215402,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": 273.04459954815735,
"raw_rx_near_rail_samples": 55577,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514781,
"samples_sent": 514781,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415458315332373d315335343d3139324231264d30264230264e315335363d31393253373d32304454323930330d",
"--serial-after-connect-delay-ms",
"500",
"--serial-after-connect-hex",
"4150504c452d544f2d5349502d313233"
],
"exit_code": 0,
"wall_seconds": 37.96413050009869,
"serial": "\r\nCONNECT\r\n\\xffSIP-TO-DPPLE-456",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 4,
"error": null,
"frames": 1767,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 49407,
"off_hook": true,
"off_hook_pcm_seconds": 25.87847559790006,
"output_gap_samples": 0,
"preparation_ms": 785.6340840226039,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -58.758359196901864,
"raw_rx_near_rail_samples": 22502,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 364090,
"samples_sent": 364090,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,132 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454323930330d"
],
"exit_code": 0,
"wall_seconds": 52.77285683294758,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 96791,
"off_hook": false,
"off_hook_pcm_seconds": 29.943612677425627,
"output_gap_samples": 0,
"preparation_ms": 782.7959569403902,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": 269.0333580041144,
"raw_rx_near_rail_samples": 55421,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514779,
"samples_sent": 514779,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,169 @@
{
"analog_board": "403",
"analog_image": "/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"protocol": "bell103",
"speed_index": 1,
"disable_v34": true,
"analog_settings": "S27=1S54=192B1&M0&B0",
"wallclock": false,
"analog_result_mode": 1,
"imodem_settings": "S54=192B1&M0&B0",
"foreground_overlay_assist": false,
"connected": true,
"data_delivery": {
"analog_to_imodem": true,
"imodem_to_analog": true
},
"imodem": {
"clock": {
"wall_seconds": 6.446481000049971,
"native_io_live": true,
"native_io_wallclock": false,
"pcm_frame_service": false,
"realtime_cycles": 0,
"active_idle_samples": 0,
"native": {
"peak_lag_cycles": 0,
"bounded_advances": 0,
"advances": 0,
"data_posts": 28025,
"data_acks": 28918,
"data_byte_reads": 56040,
"bank_0_busy_writes": 0,
"bank_1_busy_writes": 0,
"bank_2_busy_writes": 0,
"bank_3_busy_writes": 0,
"bank_4_busy_writes": 0,
"bank_5_busy_writes": 0,
"data_torn_words": 0
}
},
"serial": "\r\nOK\r\n\r\nCONNECT\r\nAPPLE-TO-SIP-123",
"connect_rate_bps": null,
"carrier_connected": true,
"isdn_call_state": "active",
"dsp": {
"pc": 33454,
"op": 48674,
"acc": 0,
"accb": 24285666,
"preg": 336360,
"dp": 7,
"arp": 7,
"flags": 62,
"idle": true,
"instructions": 1530362676,
"cycles": 1607478023,
"io_events": 8192,
"ar0": 3036,
"ar1": 2186,
"ar2": 126,
"ar3": 1016,
"ar4": 0,
"ar5": 954,
"ar6": 92,
"ar7": 3036,
"arcr": 3036,
"indx": 3036
},
"recent_mailbox": [
"2.5825 reply 0016:0000",
"2.6026 reply 0016:0208",
"2.6225 reply 0016:0208",
"2.6227 reply 003a:0000",
"2.6231 reply 003d:0000",
"2.6492 reply 0004:0000",
"2.6494 reply 0028:0000",
"2.7273 reply 0002:0000",
"3.0994 reply 0003:0000",
"3.1002 cmd 000f:0000",
"3.1161 cmd 005b:0001",
"3.1295 cmd 005b:0001"
],
"error": null
},
"analog": {
"serial": "\r\nCONNECT\r\nSIP-TO-APPLE-456\r\nNO CARRIER\r\n",
"connect_rate_bps": null,
"carrier_connected": true,
"error": null
},
"bridge": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-m9_coy_l/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 1992,
"connected": false,
"peer_off_hook": false,
"peer_call_state": "cleared",
"peer_instructions": 173137360,
"samples_sent": 318720,
"samples_received": 318720,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": false,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 118240,
"from_line": 118240,
"pending": 141
},
"silence_frames": 1253,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 941: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1253: off hook"
]
},
"bridge_at_limit": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-m9_coy_l/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 1992,
"connected": true,
"peer_off_hook": true,
"peer_call_state": "answered",
"peer_instructions": 173137360,
"samples_sent": 318720,
"samples_received": 318720,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": false,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 118240,
"from_line": 118240,
"pending": 141
},
"silence_frames": 1253,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 941: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1253: off hook"
]
}
}
@@ -0,0 +1,169 @@
{
"analog_board": "403",
"analog_image": "/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"protocol": "bell103",
"speed_index": 1,
"disable_v34": true,
"analog_settings": "S27=1S54=192B1&M0&B0",
"wallclock": false,
"analog_result_mode": 1,
"imodem_settings": "S54=192B1&M0&B0",
"foreground_overlay_assist": false,
"connected": true,
"data_delivery": {
"analog_to_imodem": true,
"imodem_to_analog": true
},
"imodem": {
"clock": {
"wall_seconds": 6.534735916997306,
"native_io_live": true,
"native_io_wallclock": false,
"pcm_frame_service": false,
"realtime_cycles": 0,
"active_idle_samples": 0,
"native": {
"peak_lag_cycles": 0,
"bounded_advances": 0,
"advances": 0,
"data_posts": 27977,
"data_acks": 28870,
"data_byte_reads": 55944,
"bank_0_busy_writes": 0,
"bank_1_busy_writes": 0,
"bank_2_busy_writes": 0,
"bank_3_busy_writes": 0,
"bank_4_busy_writes": 0,
"bank_5_busy_writes": 0,
"data_torn_words": 0
}
},
"serial": "\r\nOK\r\n\r\nCONNECT\r\nAPPLE-TO-SIP-123",
"connect_rate_bps": null,
"carrier_connected": true,
"isdn_call_state": "active",
"dsp": {
"pc": 33454,
"op": 48674,
"acc": 0,
"accb": -124999152,
"preg": -298592,
"dp": 7,
"arp": 7,
"flags": 62,
"idle": true,
"instructions": 1529685182,
"cycles": 1606807596,
"io_events": 8192,
"ar0": 3032,
"ar1": 2186,
"ar2": 126,
"ar3": 1016,
"ar4": 0,
"ar5": 954,
"ar6": 92,
"ar7": 3032,
"arcr": 3032,
"indx": 3032
},
"recent_mailbox": [
"2.6058 reply 0016:0400",
"2.6258 reply 0016:0208",
"2.6459 reply 0016:0208",
"2.6460 reply 003a:0000",
"2.6464 reply 003d:0000",
"2.6726 reply 0004:0000",
"2.6726 reply 0028:0000",
"2.7505 reply 0002:0000",
"3.1225 reply 0003:0000",
"3.1236 cmd 000f:0000",
"3.1394 cmd 005b:0001",
"3.1419 cmd 005b:0001"
],
"error": null
},
"analog": {
"serial": "\r\nCONNECT\r\nSIP-TO-APPLE-456\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\u007f\r\nNO CARRIER\r\n",
"connect_rate_bps": null,
"carrier_connected": true,
"error": null
},
"bridge": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-a247hezo/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 1992,
"connected": false,
"peer_off_hook": false,
"peer_call_state": "cleared",
"peer_instructions": 173137360,
"samples_sent": 318720,
"samples_received": 318720,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": false,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 118400,
"from_line": 118400,
"pending": 8
},
"silence_frames": 1252,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 941: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
]
},
"bridge_at_limit": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-a247hezo/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 1992,
"connected": true,
"peer_off_hook": true,
"peer_call_state": "answered",
"peer_instructions": 173137360,
"samples_sent": 318720,
"samples_received": 318720,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": false,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 118400,
"from_line": 118400,
"pending": 8
},
"silence_frames": 1252,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 941: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
]
}
}
@@ -0,0 +1,169 @@
{
"analog_board": "403",
"analog_image": "/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"protocol": "bell103",
"speed_index": 1,
"disable_v34": true,
"analog_settings": "S27=1S54=192B1&M0&B0",
"wallclock": true,
"analog_result_mode": 1,
"imodem_settings": "S54=192B1&M0&B0",
"foreground_overlay_assist": false,
"connected": true,
"data_delivery": {
"analog_to_imodem": true,
"imodem_to_analog": true
},
"imodem": {
"clock": {
"wall_seconds": 10.944480082951486,
"native_io_live": true,
"native_io_wallclock": true,
"pcm_frame_service": false,
"realtime_cycles": 162084179,
"active_idle_samples": 0,
"native": {
"peak_lag_cycles": 29924,
"bounded_advances": 260,
"advances": 144802,
"data_posts": 2190,
"data_acks": 3083,
"data_byte_reads": 4370,
"bank_0_busy_writes": 0,
"bank_1_busy_writes": 0,
"bank_2_busy_writes": 0,
"bank_3_busy_writes": 0,
"bank_4_busy_writes": 0,
"bank_5_busy_writes": 0,
"data_torn_words": 0
}
},
"serial": "\r\nOK\r\n\r\nCONNECT\r\nAPPLE-TO-SIP-123",
"connect_rate_bps": null,
"carrier_connected": true,
"isdn_call_state": "active",
"dsp": {
"pc": 33454,
"op": 48674,
"acc": 0,
"accb": 125321720,
"preg": -63061,
"dp": 7,
"arp": 7,
"flags": 62,
"idle": true,
"instructions": 1130459450,
"cycles": 1172510647,
"io_events": 8192,
"ar0": 3028,
"ar1": 2186,
"ar2": 126,
"ar3": 1016,
"ar4": 0,
"ar5": 954,
"ar6": 89,
"ar7": 3028,
"arcr": 3028,
"indx": 3028
},
"recent_mailbox": [
"2.5824 reply 0016:0000",
"2.6024 reply 0016:0208",
"2.6224 reply 0016:0208",
"2.6226 reply 003a:0000",
"2.6230 reply 003d:0000",
"2.6491 reply 0004:0000",
"2.6492 reply 0028:0000",
"2.7273 reply 0002:0000",
"3.0991 reply 0003:0000",
"3.1001 cmd 000f:0000",
"3.1194 cmd 005b:0001",
"3.1219 cmd 005b:0001"
],
"error": null
},
"analog": {
"serial": "\r\nCONNECT\r\nSIP-TO-APPLE-456\r\nNO CARRIER\r\n",
"connect_rate_bps": null,
"carrier_connected": true,
"error": null
},
"bridge": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-8fvjunz_/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 1453,
"connected": false,
"peer_off_hook": false,
"peer_call_state": "cleared",
"peer_instructions": 126265920,
"samples_sent": 232480,
"samples_received": 232480,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": true,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 32160,
"from_line": 32160,
"pending": 79
},
"silence_frames": 1252,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 941: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
]
},
"bridge_at_limit": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-8fvjunz_/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 1453,
"connected": true,
"peer_off_hook": true,
"peer_call_state": "answered",
"peer_instructions": 126265920,
"samples_sent": 232480,
"samples_received": 232480,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": true,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 32160,
"from_line": 32160,
"pending": 79
},
"silence_frames": 1252,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 941: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
]
}
}
@@ -0,0 +1,141 @@
{
"number": "2903",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454323930330d"
],
"exit_code": 0,
"wall_seconds": 52.726596666965634,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"buffer_frames_requested": 0,
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8641.23446206601,
9600.0,
8000.0,
7200.0,
8641.23446206601,
9600.0,
10267.379679144386,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"codec_service_ms": 20.0,
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_receive": true,
"native_worker_polls": 96770,
"off_hook": false,
"off_hook_pcm_seconds": 29.97773672953529,
"output_gap_samples": 0,
"preparation_ms": 755.8614580193534,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -30.446284224250327,
"raw_rx_near_rail_samples": 22651,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 513890,
"samples_sent": 513890,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0000": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0009": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,84 @@
{
"number": "6311",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"0.25",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331310d"
],
"exit_code": 1,
"wall_seconds": 40.61321845895145,
"serial": "",
"error": "Apple audio helper closed (see its stderr)",
"bridge_error": "Apple line: Apple audio helper closed (see its stderr)",
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": false,
"error": "Apple audio helper closed (see its stderr)",
"frames": 1969,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 78990,
"off_hook": true,
"off_hook_pcm_seconds": 29.943418238382268,
"output_gap_samples": 0,
"raw_rx_mean": 143.68935380637137,
"raw_rx_near_rail_samples": 54943,
"raw_rx_peak": 32768,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 405281,
"samples_sent": 405281,
"tx_gain": 0.25
},
"digit_commands": {
"0013:0001": 2,
"0013:0003": 1,
"0013:0006": 1
}
}
@@ -0,0 +1,95 @@
{
"number": "6312",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"0.25",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331320d"
],
"exit_code": 1,
"wall_seconds": 40.68496104108635,
"serial": "",
"error": "Apple audio helper closed (see its stderr)",
"bridge_error": "Apple line: Apple audio helper closed (see its stderr)",
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": false,
"error": "Apple audio helper closed (see its stderr)",
"frames": 1969,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 78992,
"off_hook": true,
"off_hook_pcm_seconds": 29.943418238382268,
"output_gap_samples": 0,
"raw_rx_mean": 144.15871703830183,
"raw_rx_near_rail_samples": 55653,
"raw_rx_peak": 32768,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 405281,
"samples_sent": 405281,
"tx_gain": 0.25
},
"digit_commands": {
"0013:0001": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0006": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
+63
View File
@@ -0,0 +1,63 @@
# Separate extension attempts: 6311 and 6312
**Later result:** [reset/hang-up continuity is fixed](../apple-reset-continuity/README.md).
A new 6311 attempt returns cleanly with `NO CARRIER`, zero active gaps/overflows,
and verified hook release. The captures below retain the earlier failures.
These are **two separate calls**, correcting the earlier interpretation as
`63116312`. The optimized 403 worker sent `ATX1S7=20DT6311`, released the line,
and then sent `ATX1S7=20DT6312`. Independent USB readbacks verify on-hook after
each attempt, including before the second call.
| Extension | Decoded codec TX DTMF | Successful off-hook PCM | Native polls | Result |
|---|---|---:|---:|---|
| 6311 | `6311` | 29.943 s | 78,990 | No CONNECT/final response; local underrun at reset |
| 6312 | `6312` | 29.943 s | 78,992 | No CONNECT/final response; local underrun at reset |
Unlike the earlier last-generation-only capture, these traces retain PCM
across **every DSP generation**. Goertzel decoding of the original firmware's
transmitted waveform independently recovers the requested four digits in each
case. This capture is at the Courier codec boundary, before the Apple's hardware
rate converter and output gain; it is not a far-end acknowledgement of digits.
Both workers finish with a local hardware stream failure at DSP teardown/reset,
not a clean Hayes result from the called modem. The helper reports active output
gaps and releases the line. Neither result should be described as confirmed
remote no-answer/busy. No CONNECT or sustained modem answer tone is established.
RX contains strong/clipped low-frequency audio; nominal-frequency measurements
in `audio-analysis.json` are not a validated call-progress classifier.
Each extension directory contains:
- `summary.json`, `report.json`: invocation, result and native execution counts.
- `hardware.log`: actual final underrun counter and hook-release confirmation.
The report's socket counters precede the failure and can still show zero.
- `final-line-status.*`: independent post-call USB status (hook bit clear).
- `codec-tx.s16`, `codec-rx.s16`: signed PCM16 little-endian, with variable rates.
- `codec-frames.jsonl`: rate, hook state, wall timestamp and sample offsets for
every codec exchange. RX is after rate conversion/DC blocking; TX is before
hardware gain. Respect the rate metadata; these are not fixed-8-kHz files.
- `audio-analysis.json`: independently decoded DTMF plus RX frequency-bin checks.
`run_attempt.py` reproduces one explicit attempt to 6311 or 6312 (no redial loop);
`trace_worker.py` records the codec boundary without supplying any received
audio, digits or carrier result to the guest. The runner now also accepts 6313,
`--carrier-wait`, configurable frame/instruction/time budgets and `--diagnostics`
for once-per-second read-only DSP snapshots. It stops five seconds after a real
serial CONNECT by default (`--stop-after-connect 0` disables that limit).
`--post-dial-gain` is an **explicit diagnostic experiment**, not a production
default: it changes host TX gain once firmware command `0017` starts negotiation,
after the firmware-generated digits. New frame metadata records the applied
`tx_gain`; raw TX remains before that gain. See
[negotiation results](../apple-negotiation-6313/README.md). The wrapper does not
patch guest memory, consume peripheral registers, inject DSP messages or invent
carrier. Invalid/non-finite gains and nonpositive call budgets are rejected.
New captures also retain `codec-hardware-{tx,rx}.s16` and
`codec-hardware-frames.jsonl`: TX is the actual post-resampler/post-gain helper
submission, RX is raw helper input before DC blocking. These remain attempted
submissions, not proof of DAC playback. Codec-side events now specify `rx_rate`
independently when RX stays on the fixed hardware clock. `--rx-grid codec` is
an opt-in diagnostic control restoring the original preconverted RX; see
[audio-path audit](../apple-adc-grid/README.md).
@@ -0,0 +1,62 @@
# Sound and underrun analysis
**Update:** the reset/control fix is implemented. The [6311 retry](../apple-reset-continuity/README.md)
returns cleanly with `NO CARRIER` and zero active gaps/overflows. The analysis
below describes the earlier failing implementation.
No new calls were placed for this analysis.
## Listening copies
Each extension directory now has `tx-listen.wav` and `rx-listen.wav`: mono
8000 Hz PCM, off-hook samples only, resampled using each recorded codec rate
and attenuated by 12 dB for listening. These are not calibrated recordings of
line voltage; RX was already DC-blocked/rate-converted and is visibly clipped.
Attenuation does not repair that clipping. On-hook startup pauses are omitted.
Codec TX independently decodes as 6311 and 6312 respectively. RX has strong,
distorted low-frequency tone energy: a Hann-windowed 300–600 Hz scan finds
398–399 Hz in both recordings at 1, 5, 10 and 20 seconds after seizure. Earlier
nominal-bin analysis after DTMF finds very little 2100 Hz energy. This supports
"dialing plus a rough approximately 400 Hz line tone," not a normal modem
answer/training sequence. It is not sufficient to label the remote state as
busy, unobtainable or no-answer.
## Why the helper underruns
Final codec service trace entries:
| Extension | Last off-hook request to next (on-hook) request |
|---|---:|
| 6311 | 177.678 ms |
| 6312 | 170.690 ms |
The HAL block is 512 samples and the helper primes two blocks at 10286 Hz:
1024 / 10286 = 99.55 ms. Actual queued audio at reset can be less than that.
The gap exceeds the output cushion. The helper still considers the line active
until it receives the on-hook request, so its render callback correctly detects
an empty queue and invokes the current fail-closed policy. The on-hook request
arrives too late; helper cleanup releases and verifies the physical hook.
The bridge resets `active` and `launched` when the DSP is reset.
`clock_x86` returns before `_service_line` while the DSP is inactive/unlaunched.
Physical codec service additionally requires a programmed codec rate and waits
for codec samples or its fallback timer. Thus **hardware PCM and hook control
are incorrectly coupled to DSP execution/availability**, even though the real
DAA/audio interface must keep running independently. A legitimate DSP reset
becomes a physical transport starvation event.
This is distinct from sustained compute throughput: the optimized firmware
previously serviced a long off-hook hold without a gap; these failures occur at
repeatable reset/hang-up boundaries with the emulated DAA already returning
on-hook. It does not prove there are no other possible throughput limits.
The required fix is to keep the hardware audio/control pump alive across DSP
reset, emit silence when the DAC has no active DSP output, and propagate hook
release independently of a PCM batch or resampler producing output. Preserve
strict underrun detection for unexpected loss during an active datapump stream;
merely enlarging the FIFO or globally ignoring underruns would hide the bug.
This explains the interrupted cleanup/final Hayes response, not necessarily
why neither extension produced an earlier modem answer. RX levels/clipping and
the actual approximately 400 Hz call-progress response remain separate issues.
@@ -0,0 +1,161 @@
"""Capture codec PCM across every DSP generation during this dial experiment."""
import atexit
import json
import os
from pathlib import Path
import runpy
import struct
import sys
import time
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
from courier_emu.apple_line import AppleLine
from courier_emu.machine import CourierMachine
prefix = os.environ['APPLE_CALL_TRACE']
tx = open(prefix + '-tx.s16', 'wb')
rx = open(prefix + '-rx.s16', 'wb')
events = open(prefix + '-frames.jsonl', 'w')
hw_tx = open(prefix + '-hardware-tx.s16', 'wb')
hw_rx = open(prefix + '-hardware-rx.s16', 'wb')
hw_events = open(prefix + '-hardware-frames.jsonl', 'w')
# Diagnostic A/B only: restore preconverted RX without changing guest state.
if os.environ.get('APPLE_RX_GRID', 'hardware') == 'codec':
delattr(AppleLine, 'enable_native_receive')
diagnostics = os.environ.get('APPLE_CALL_DIAGNOSTICS') == '1'
stop_after = float(os.environ.get('APPLE_STOP_AFTER_CONNECT_SECONDS', '0'))
post_dial_value = os.environ.get('APPLE_POST_DIAL_GAIN', '')
post_dial_gain = float(post_dial_value) if post_dial_value else None
if post_dial_gain is not None and not 0 <= post_dial_gain <= 1:
raise ValueError('post-dial gain must be between 0 and 1')
post_dial_applied = [False]
states = open(prefix + '-state.jsonl', 'w') if diagnostics else None
for stream in (tx, rx, events, hw_tx, hw_rx, hw_events, states):
if stream is not None:
atexit.register(stream.close)
original = AppleLine.service_codec
original_exchange = AppleLine._exchange
mailbox_recorder = None
if diagnostics:
from courier_emu.dsp import NativeC5x
from tools.apple_mailbox_trace import MailboxRecorder, install
if os.environ.get('APPLE_V90_PROBE') == '1':
from tools.apple_v90_trace import V90MailboxRecorder
mailbox_recorder = V90MailboxRecorder(prefix)
else:
mailbox_recorder = MailboxRecorder(prefix)
install(mailbox_recorder, NativeC5x)
from courier_emu.bridge import CourierDspBridge
original_runtime_message = CourierDspBridge._record_runtime_message
def traced_runtime_message(self, words, pc):
original_runtime_message(self, words, pc)
mailbox_recorder.safe(mailbox_recorder.host_command, words, pc, self._instructions)
CourierDspBridge._record_runtime_message = traced_runtime_message
atexit.register(mailbox_recorder.close)
position = [0, 0]
hw_position = [0, 0]
def hardware_exchange(self, payload, off_hook, resetting=False):
event = dict(time=time.monotonic(), rate=self.rate, off_hook=off_hook,
resetting=resetting, tx_start=hw_position[0], tx_count=len(payload),
rx_start=hw_position[1])
hw_tx.write(struct.pack(f'<{len(payload)}h', *payload))
hw_position[0] += len(payload)
try:
raw = original_exchange(self, payload, off_hook, resetting)
except BaseException:
event['failed'] = True
hw_events.write(json.dumps(event)+'\n')
raise
hw_rx.write(raw)
event['rx_count'] = len(raw)//2
hw_position[1] += len(raw)//2
hw_events.write(json.dumps(event)+'\n')
return raw
AppleLine._exchange = hardware_exchange
machine_ref = [None]
last_snapshot = [0.0]
connected_at = [None]
if diagnostics or stop_after or post_dial_gain is not None:
original_init = CourierMachine.__init__
def observed_init(self, *args, **kwargs):
original_init(self, *args, **kwargs)
machine_ref[0] = self
CourierMachine.__init__ = observed_init
def observe(now, line):
machine = machine_ref[0]
if machine is None:
return
bridge = machine.dsp_bridge
if (post_dial_gain is not None and not post_dial_applied[0] and bridge is not None
and line._off_hook and any(k.startswith('0017:') for k in bridge.runtime_message_counts)):
line.tx_gain = post_dial_gain
post_dial_applied[0] = True
print(f'[trace] diagnostic TX gain {post_dial_gain} after native command 17', file=sys.stderr)
if stop_after and b'\r\nCONNECT' in bytes(machine.serial):
if connected_at[0] is None:
connected_at[0] = now
elif now - connected_at[0] >= stop_after:
machine.request_stop()
if states is None or now - last_snapshot[0] < 1:
return
last_snapshot[0] = now
bridge = machine.dsp_bridge
if bridge is None:
return
core = bridge.core
if mailbox_recorder is not None:
mailbox_recorder.safe(mailbox_recorder.collect, core)
# Only state accessors / RAM cells: never reads an emulated DRR or a
# peripheral with consume-on-read semantics, and never patches guest state.
snapshot = {'time': now, 'instructions': machine.instructions,
'serial': bytes(machine.serial).decode('ascii', 'backslashreplace'),
'dsp': core.state(), 'codec': core.codec_state(), 'serial_port': core.serial_state(),
'host_io_input': {f'{p:04x}': core.io(p) for p in (0x56, 0x57)},
'host_io_output': {f'{p:04x}': core.io_output(p) for p in (0x5e, 0x5f, 0x60)},
'active': bridge.active, 'launched': bridge.launched,
'tx_gain': line.tx_gain, 'post_dial_gain_applied': post_dial_applied[0],
'overlay_id': bridge.overlay_id, 'overlay_destinations': bridge.overlay_destinations,
'dsp_tags': dict(bridge.dsp_originated_tags),
'host_tags': dict(bridge.runtime_message_counts),
'ram': {f'{a:04x}': core.data(a) for a in (0x006d,0x006e,0x006f,0x0304,0x0306,0x031a,0x031b,0x0337,
0x038f,0x0393,0x0394,0x039f,0x03cb,0x03e1,0x03e2,
0x069c,0xa51b,0xd2a8,0xff00,0xff01,0xff18,0xff19,
0xfff1,0xfff2,0xfff4,0xfff6,0xfff7)}}
states.write(json.dumps(snapshot) + '\n')
def traced(self, samples, rate, hook):
tx.write(struct.pack(f'<{len(samples)}h', *samples))
event = {'time': time.monotonic(), 'cpu_time': time.process_time(),
'rate': rate, 'off_hook': hook, 'tx_gain': self.tx_gain,
'rx_rate': self.rate if self.native_receive else rate,
'tx_start': position[0], 'tx_count': len(samples), 'rx_start': position[1]}
position[0] += len(samples)
try:
incoming = original(self, samples, rate, hook)
except BaseException:
event['failed'] = True
events.write(json.dumps(event) + '\n')
raise
rx.write(struct.pack(f'<{len(incoming)}h', *incoming))
event['rx_count'] = len(incoming)
position[1] += len(incoming)
events.write(json.dumps(event) + '\n')
observe(time.monotonic(), self)
return incoming
AppleLine.service_codec = traced
sys.argv = ['courier_emu.worker', *sys.argv[1:]]
runpy.run_module('courier_emu.worker', run_name='__main__')
+70
View File
@@ -0,0 +1,70 @@
# Full extension dialing: the extra TX attenuation was the problem
**Fixed:** change the Apple output default from **0.25 to 1.0**, preserving the
Courier firmware's waveform levels. No gateway or Asterisk configuration, DTMF
duration, or interdigit gap was changed.
## Controlled comparison
Same optimized 403 firmware, same `ATX1S7=20DT6312`, same Apple device and line:
| Output gain | Observed Asterisk destination | PBX result |
|---:|---|---|
| 0.25 | `6` | `484 Address Incomplete`; no call to 6312 |
| 1.0 | `6312` | Routed to endpoint 6312, ringing, answered |
The level change is **+12.041 dB**. Codec-side analysis of the original quarter-
scale attempt shows ~69 ms DTMF bursts, with firmware per-tone peaks of about
0.30 (row) and 0.40 (column). The extra gain factor made the transmitted digital
levels approximately **-22.5/-20 dBFS**. Unity retains the firmware levels and
stays within PCM16; it does not manufacture or stretch digits.
The original 0.25 was a conservative loopback/test attenuation, not a validated
real-line calibration. The reused v90modem coupler defaults to unity engine TX;
its hardware notes also record this ATA rejecting quiet DTMF. The successful
live level-only comparison is the decisive evidence here, not that history.
At unity, Asterisk records:
- **6004 → 6312, ANSWERED**, unique ID `1792624894.2114`, 24 billed seconds.
Call starts 2026-10-22 **12:21:34 NZDT**, answered at 12:21:37.
- A subsequent call using the corrected tool default reaches **6313** and is
**ANSWERED**, unique ID `1792625193.2117`, 7 billed seconds.
Call starts **12:26:33 NZDT**, answered at 12:26:35.
Thus the ATA now sends the complete requested extension, and Asterisk actually
rings/bridges that modem endpoint. The duplicate ingress INVITEs are the normal
SIP authentication retry. In the 6312 trace the later `486 Busy Here` belongs to
an OPTIONS probe while the port is busy, not rejection of the answered INVITE.
## Remaining limitations — do not confuse ANSWERED with CONNECT
- **6312:** local firmware eventually returns `NO CARRIER`, worker exit 0,
zero active gaps and zero input overflow. Its codec retunes through 9600 Hz
after answer. No successful modem connection/data transfer is established.
- **6313:** correct destination and remote answer are confirmed, but an active
output underrun occurs afterwards: **130 samples (~12.6 ms)**, worker exit 1.
This occurs during the running 9600 Hz datapump, not DSP reset; strict loss
detection is still enabled. It is a separate live-training pacing issue.
- Both attempts release the physical hook and independently verify on-hook.
- RX levels/clipping and modem-training behavior still need investigation.
The 20-second guest carrier-wait limit was chosen for bounded dialing tests,
not as proof that all possible training sequences have been exhausted.
## Files / changes / tests
- `verification.json`: comparison, PBX records, worker results and final helper
counters (the last socket snapshot can precede a later underrun).
- `sip-unity.log`, `sip-default-6313.log`, corresponding `*-status.log`: passive
SIP summaries and capture-drop counts. Neither capture changes PBX logging.
- `unity-cdr.json`, `default-6313-cdr.json`: read-only CDR extracts, UTC timestamps.
- `unity/6312/`, `default/6313/`: original firmware reports, hardware diagnostics,
all-generation codec PCM, frame metadata and independent hook readbacks.
- Baseline: [earlier PBX capture](../apple-asterisk-check/README.md).
Python backend, CLI and standalone worker now all default to **1.0**. Explicit
attenuation remains available through `--apple-tx-gain`. Regression tests check
exact sample preservation at unity, explicit attenuation, CLI override behavior,
standalone worker default, reset safety and native polling equivalence.
The focused set passes **80 tests**. No PBX, ATA, modem firmware or digit-map
configuration was changed.
@@ -0,0 +1,96 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331330d"
],
"exit_code": 1,
"wall_seconds": 22.51132683304604,
"serial": "",
"error": "Apple audio helper closed (see its stderr)",
"bridge_error": "Apple line: Apple audio helper closed (see its stderr)",
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8641.23446206601,
9600.0
],
"connected": false,
"control_updates": 4,
"error": "Apple audio helper closed (see its stderr)",
"frames": 1059,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 30378,
"off_hook": true,
"off_hook_pcm_seconds": 11.655162356601206,
"output_gap_samples": 0,
"raw_rx_mean": 184.2378239988212,
"raw_rx_near_rail_samples": 12640,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 217169,
"samples_sent": 217169,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,102 @@
{
"number": "6312",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331320d"
],
"exit_code": 0,
"wall_seconds": 51.70148020808119,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8641.23446206601,
9600.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 97417,
"off_hook": false,
"off_hook_pcm_seconds": 29.97841726618705,
"output_gap_samples": 0,
"raw_rx_mean": 164.50286737446376,
"raw_rx_near_rail_samples": 9262,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514931,
"samples_sent": 514931,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,78 @@
{
"baseline": {
"gain": 0.25,
"commanded_number": "6312",
"observed_sip_target": "6",
"sip_final_response": "484 Address Incomplete",
"evidence": "../apple-asterisk-check/README.md"
},
"gain_change_db": 12.041199826559248,
"pbx_or_gateway_config_changed": false,
"digit_timing_changed": false,
"results": [
{
"extension": "6312",
"gain": 1.0,
"sip_invites": [
"2026-10-22 12:21:34.638820 eth0 In IP 10.69.111.3.34826 > 192.168.88.122.5060: SIP: INVITE sip:6312@192.168.88.122 SIP/2.0",
"2026-10-22 12:21:34.708806 eth0 In IP 10.69.111.3.34826 > 192.168.88.122.5060: SIP: INVITE sip:6312@192.168.88.122 SIP/2.0",
"2026-10-22 12:21:34.723313 eth0 Out IP 192.168.88.122.5060 > 10.69.70.221.5060: SIP: INVITE sip:6312@10.69.70.221:5060 SIP/2.0",
"2026-10-22 12:21:35.222894 eth0 Out IP 192.168.88.122.5060 > 10.69.70.221.5060: SIP: INVITE sip:6312@10.69.70.221:5060 SIP/2.0"
],
"cdr": {
"source": "6004",
"destination": "6312",
"channel": "PJSIP/6004-00000569",
"destination_channel": "PJSIP/6312-0000056a",
"start_utc": "2026-10-21 23:21:34",
"answer_utc": "2026-10-21 23:21:37",
"end_utc": "2026-10-21 23:22:01",
"duration": "26",
"billsec": "24",
"disposition": "ANSWERED",
"uniqueid": "1792624894.2114"
},
"worker_exit": 0,
"serial": "\r\nNO CARRIER\r\n",
"transport_error": null,
"helper_counters": {
"active output gaps": 0,
"input overflow": 0,
"reset silence": 2048,
"reset RX discarded": 2048
},
"hook_released": true
},
{
"extension": "6313",
"gain": 1.0,
"sip_invites": [
"2026-10-22 12:26:33.603480 eth0 In IP 10.69.111.3.34826 > 192.168.88.122.5060: SIP: INVITE sip:6313@192.168.88.122 SIP/2.0",
"2026-10-22 12:26:33.671780 eth0 In IP 10.69.111.3.34826 > 192.168.88.122.5060: SIP: INVITE sip:6313@192.168.88.122 SIP/2.0",
"2026-10-22 12:26:33.675225 eth0 Out IP 192.168.88.122.5060 > 10.69.70.221.5060: SIP: INVITE sip:6313@10.69.70.221:5060 SIP/2.0"
],
"cdr": {
"source": "6004",
"destination": "6313",
"channel": "PJSIP/6004-0000056b",
"destination_channel": "PJSIP/6313-0000056c",
"start_utc": "2026-10-21 23:26:33",
"answer_utc": "2026-10-21 23:26:35",
"end_utc": "2026-10-21 23:26:42",
"billsec": "7",
"disposition": "ANSWERED",
"uniqueid": "1792625193.2117"
},
"worker_exit": 1,
"serial": "",
"transport_error": "Apple audio helper closed (see its stderr)",
"helper_counters": {
"active output gaps": 130,
"input overflow": 0,
"reset silence": 512,
"reset RX discarded": 512
},
"hook_released": true
}
]
}
+62
View File
@@ -0,0 +1,62 @@
# Apple physical-line bring-up
Initial evidence from the attached A1082 on this macOS host. No number was dialed.
The later [optimized 403 run](../apple-line-optimized/README.md) sustains off-hook
PCM successfully; the failures below are retained for comparison, not the current
403 result. See [backend usage and limits](../../docs/apple-usb-line.md).
## Passing hardware transport (final build)
- `rate-ladder-onhook.json` / `.log`: hardware 10286 Hz; Courier grids 7200,
7578.947368, 8000, 9600 and 10266.666667 Hz. Each stage carries approximately
one second; no active output gaps or input overflow. No off-hook transition.
- `native-7200-offhook.json` / `.log`: exact native 7200 Hz, 14,400 received codec
samples over the two-second off-hook stage, no active gaps/overflow.
- `rate-ladder-offhook.json` / `.log`: four consecutive one-second stages at
7200, 7578.947368, 8000 and 9600 Hz over fixed 10286 Hz hardware. No active gaps
or overflow. Hook/current/sense readbacks confirm a powered line, and shutdown
confirms on-hook. The raw capture statistics show near-rail samples: this is
transport evidence, not a calibrated clean telephone channel.
- `final-line-status.json` / `.log`: independent post-run hook/status readback.
Probes transmit silence. They establish the full-duplex hardware transport and
rate handling, **not** the output amplitude, modulation quality or a far-end
modem's ability to receive Courier firmware samples.
## Original firmware, final transport build
- `firmware-onhook-final.json` / `.log`: assembled captured B/C 2.2.09 with erased
settings, `ATI3`, DSP tick source, 50 hardware exchanges. Original firmware
returns `USRobotics Courier V.Everything EXT` and `OK`. Both CPU and bridge
report no error, and physical shutdown verifies on-hook.
- `firmware-offhook-final.json` / `.log`: same image, `ATH1`, 150-exchange ceiling.
This run **fails**: the supervisor/DSP execution does not replenish hardware
output in time. The helper releases the line, the worker stops early and
returns exit 1. No successful connection or payload is claimed.
The firmware image used locally at `tmp/apple-test-flash.bin` was assembled with
`courier_emu.flash_image.assemble_flash` from:
- `dumps/3453bc-4MBRYA8G1514-bootmodem-read-20261014/bootmodem.bin`
- `dumps/3453bc-firmware-read-2.2.09/firmware.bin`
- 16 KiB of erased (`ff`) settings
Normal firmware runs use 10,000,000 instructions as the ceiling, `--apple-modem`,
`--tick-source dsp`, and `--at ATI3` or `--at ATH1`. JSON was captured directly
from `courier_emu.worker` so helper stderr and failure reports are retained.
## Earlier debugging captures
Other files here are intermediate runs, not the acceptance evidence above.
They include an initially insufficient output cushion, on-hook stale-FIFO
handling, and earlier firmware runs that did not stop promptly after a backend
failure. The final helper discovers HAL block size, primes two callbacks,
retains ordinary input bursts, fails closed on active sample loss, and the
worker reports a nonzero exit instead of continuing with a dead line.
The captured 403 ROM's on-hook stream also exercised clock changes, but its test
AT command remained queued. The older `3453Bv2.1.1.xmf` trial stopped with a native
lane-map KeyError; it is not a passing firmware configuration.
No CONNECT, Bell-103 data transfer, ring auto-answer, long-duration clock-drift,
or V.90/V.92 interoperability result is established by this directory.
+62
View File
@@ -0,0 +1,62 @@
# Apple line on the optimized 403 worker
**Passing live hardware run**, no digits dialed:
- Original captured 403 firmware (`courier-board-21210-capture-403/courier-board.rom`).
- Same board/settings/scheduling as the optimized paired benchmark:
`idsdl403`, board 7, default DIP, 5 ms tick, default tick source,
256-instruction DSP batch, terminal input scheduled after 5M instructions.
- Firmware command `ATH1` returns `OK` and physically seizes the attached line.
- 1600 hardware exchanges, **329,529 PCM samples** in each direction at 10286 Hz
(32.04 s total PCM, including on-hook startup).
- **22.619 s off-hook PCM**, **zero active output gaps**, **zero input overflow**.
- Native host lane I/O active; **48,074 native worker polls** executed.
- 114,308,095 supervisor instructions; 33.18 s wall including startup/cleanup.
- Helper shutdown readback verifies on-hook. Independent `final-line-status.json`
confirms register 5 = 8 (monitor enabled, hook bit clear), line status = 64.
`verification.json` contains the exact worker command, timing and counters.
`403-hold-30s.json` is the full run report; `.log` captures hardware diagnostics.
The filename denotes the approximate total PCM budget, **not** 30 seconds
exclusively off-hook. `403-hold.json`/`.log` are the shorter initial success.
## What changed
The physical backend keeps audio-only semantics (no synthesized training,
carrier, call engine or dial tone), but no longer inherits the blanket exclusion
of audio-only socket links from native DSP polling. The poll may advance the DSP
between physical codec batches, then must yield to Python for real hardware
I/O. It is explicitly barred from the existing native 8 kHz socket resampler.
Hook/IRQ/mailbox/hybrid guards are retained. CPU fast-path exclusions specific
to the different B/C supervisor were not relaxed.
The Apple CLI also no longer replaces the optimized scheduling defaults with a
4096-instruction batch and DSP tick source. The previous 403 attempt additionally
used the older `idsdl302` settings fixture. That was not a valid run of the
optimized 403 configuration.
## Reproduce
See [backend instructions](../../docs/apple-usb-line.md). Build the helper, then:
```sh
./courier run dumps/courier-board-21210-capture-403/courier-board.rom \
--apple-modem --nvram-fixture idsdl403 --board-id 7 --tick-ms 5 \
--at ATH1 --serial-input-after 5000000 \
--instructions 180000000 --line-frames 1600 --summary
```
This seizes a powered FXS/PBX line; it does not dial. Hardware input paces the
worker, so this run should take real time, not the unpaced benchmark's 4x speed.
`tests/test_apple_native_poll.py` also compares native polling enabled/disabled
against a hardware-free PCM peer. It requires identical emitted PCM SHA-256,
sample counts, hook transitions, CPU instruction boundary/registers, AT output,
supervisor call cells and codec serial state. It verifies a positive native poll
counter in the optimized case and zero when `COURIER_WORKER_POLL=0`.
30 focused Apple/CLI/bridge regressions and 44 native interpreter/port/clock/line
regressions pass. This does **not** establish CONNECT, data transfer, ring
answering, trained-datapump throughput or long-duration clock-drift performance.
The line's off-hook audio contains near-rail samples, so line level calibration
is also still needed before attributing training failures to the firmware.
@@ -0,0 +1,77 @@
{
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"180000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"0.25",
"--line-frames",
"1600",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:415448310d"
],
"exit_code": 0,
"wall_seconds": 33.176385584054515,
"instructions": 114308095,
"serial": "\r\nOK\r\n",
"cpu_error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"error": null,
"frames": 1600,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 48074,
"off_hook": true,
"off_hook_pcm_seconds": 22.61909391405794,
"output_gap_samples": 0,
"raw_rx_mean": 140.92204934922268,
"raw_rx_near_rail_samples": 79572,
"raw_rx_peak": 32768,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 329529,
"samples_sent": 329529,
"tx_gain": 0.25
}
}
+109
View File
@@ -0,0 +1,109 @@
# 6313: V.8 / V.34 negotiation after filter preflight
**No CONNECT yet.** Longer waiting and a diagnostic data-level reduction do not
resolve negotiation. No PBX/gateway settings or guest firmware were changed.
The new analyser and observer do not supply synthetic audio/carrier events.
## Results
| Attempt | Host output gain | Outcome |
|---|---|---|
| `../apple-training-underrun/prewarmed/6313` | unity | ANSWERED, 25 billed seconds; V.8 and CRC-valid INFO0 both ways; clean NO CARRIER, no active sample loss |
| `long-wait/6313` | unity, S7=60 | ANSWERED, 62 billed seconds; no received V.8 menu/overlays; fallback; clean NO CARRIER after 82.97 seconds off-hook PCM, no active sample loss |
| `data-quarter/call/6313` | unity digits, 0.25 after native command 0017; S7=60 | ANSWERED, 40 billed seconds; V.8 and CRC-valid INFO0 both ways; repeated setup, then local 55-sample underrun at 44.91 seconds off-hook PCM |
The long call's `486 Busy Here` is **not the INVITE outcome**: it immediately
follows a later OPTIONS probe. The initial INVITE receives 200 OK and ACK.
`long-wait-cdr.csv` confirms ANSWERED (`1792631642.2123`), correcting an initial
reading of the uncorrelated SIP summary. CDR timestamps are UTC; SIP timestamps
are PBX local NZDT (+13). The quarter-data call is `1792632332.2126`; see
`data-quarter/cdr.csv` and `channels-during-call.txt`.
## Independently decoded signal evidence
`tools/analyze_apple_call.py` follows the capture's exact per-frame rates and
produces separate 8-kHz WAVs plus a JSON timeline without opening hardware.
Times are captured sample time, not exact physical latency. TX applies recorded
host gain (older traces assume unity); RX is post DC/rate conversion. The final
failed TX block is an attempted submission, not proof of playback.
In **both** the original prewarmed call and the quarter-data call:
- Local V.21 channel 1 CM repeats `e0 c1 65 13 10 27 0a 0d`.
- Peer V.21 channel 2 JM repeats `e0 c1 45 13 10 2a 0d`.
- A 17-bit CRC-valid INFO0 body `11111111100001000` is independently recovered
on local TX at 1200 Hz **and on RX at 2400 Hz**.
- On the quarter-data capture these occur in search windows TX 11.5–12.0 s,
RX 12.0–12.5 s. On the original prewarmed capture: TX 13.5–14.0 s,
RX 14.0–14.5 s. Search windows are not exact frame boundaries.
The peer's 2400-Hz component coexists with a stronger 1800-Hz component. A
single-dominant-FFT-bin classifier misses its INFO0. The analyser therefore
searches DPSK sync/CRC independently of the largest spectral peak. Tests include
valid INFO0 under a stronger interfering 1800-Hz tone and a silence control.
This establishes valid INFO0 reaching the recorded receive boundary, **not**
that the guest successfully qualifies it or completes phase 2.
The long unity-gain call differs: the captured peer sends ~5.4 seconds of answer
tone, no decoded JM, then fallback signals; the local modem eventually holds
1800 Hz. More S7 time alone does not recover that negotiation.
## Passive RTP capture and levels
`data-quarter/media.pcap` records four G.711 streams on Asterisk's Ethernet
interface; `rtp/` retains raw payloads, packet timestamps, WAVs and summaries.
Extraction uses sibling `tools/eicon_rtp_pcap_check.py`. Decoded CM/JM bytes agree
with the native codec recordings. Measured in decoded G.711 units:
- Local CM at diagnostic 0.25 data gain: **RMS 1547.6, -20.16 dBm0**.
- Peer JM: **RMS 3902.8, -12.13 dBm0**.
The CM is routable/decodable at that level, but attenuation does **not** remove
the repeated V.34 setup. These are bearer-domain measurements, not calibration
of Apple DAC voltage or AC01 dBm. Production gain defaults remain unchanged.
No RTP sequence/timestamp discontinuities are present in the four **locally
captured** streams. Caller-side interarrival nevertheless reaches **90.52 ms**;
peer-side maximum is 29.42 ms. Asterisk's during-call stats also report **15
lost packets / 2%** on the 6313 transmit leg, presumably from remote RTCP.
Thus this is not evidence of lossless end-to-end delivery; network/jitter and
remote playout still need investigation.
## Remaining stream/receive boundaries
The late quarter-data failure is **not** the original cold-filter stall:
- All known filters are prepared; `live_filter_misses` is empty.
- The 7200 → transient 8641.234462 → 9600 Hz transition succeeds.
- Helper stderr subsequently reports **55 active output gap samples**, verified
hook release and worker exit 1. No reset-silence exception or larger buffer
was used. Python's gap counter remains zero because the helper closed before
replying; `hardware.log` is authoritative.
- Read-only DSP snapshots show `rx_empty_frames` increasing **143 → 188** around
the retune and then remaining 188. This separate internal ADC boundary should
be investigated alongside mixed-rate queuing; it is not a USB overflow count
and is not yet a demonstrated cause of the negotiation failure.
Next useful work is correlating actual DSP detector input/qualification with
these valid INFO0 samples, checking retune input-queue timing and profiling the
late service deadline failure. No event, memory or negotiation-success patches
have been applied.
## Reproduce the diagnostic experiment
```sh
.venv/bin/python artifacts/apple-dial-extensions/run_attempt.py 6313 \
--output artifacts/NEW-DIRECTORY --carrier-wait 60 --frames 6000 \
--instructions 600000000 --timeout 150 --diagnostics --post-dial-gain 0.25
# numpy is available in the sibling v90modem venv:
../v90modem/.venv/bin/python tools/analyze_apple_call.py \
artifacts/NEW-DIRECTORY/6313
```
`--post-dial-gain` is opt-in, modifies host analogue output scaling only after
native firmware command 0017, and leaves the earlier firmware-generated digits
at the requested initial gain. Default runner behavior is unchanged. Optional
stop-after-CONNECT watches actual serial CONNECT (default five seconds later),
not DSP tags or SIP answer. The regression selection with NumPy available passes
**101 tests in 21.61 s**; the three new offline-analysis tests pass independently.
@@ -0,0 +1,126 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"600000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"6000",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d36304454363331330d"
],
"exit_code": 1,
"wall_seconds": 56.46214220800903,
"serial": "",
"error": "Apple audio helper closed (see its stderr)",
"bridge_error": "Apple line: Apple audio helper closed (see its stderr)",
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8641.23446206601,
9600.0
],
"connected": false,
"control_updates": 4,
"error": "Apple audio helper closed (see its stderr)",
"frames": 2707,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_worker_polls": 119980,
"off_hook": true,
"off_hook_pcm_seconds": 44.91308574761812,
"output_gap_samples": 0,
"preparation_ms": 721.3067499687895,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": -105.25344562457533,
"raw_rx_near_rail_samples": 12652,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 559260,
"samples_sent": 559260,
"tx_gain": 0.25
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 12,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,34 @@
{
"10.69.70.221_6000--192.168.88.122_18438--6fba4fe1": {
"packets": 2029,
"payload_bytes": 324640,
"first_time": 1792632333.992575,
"last_time": 1792632374.549978,
"gaps": [],
"max_interval_ms": 29.42490577697754
},
"10.69.111.3_5004--192.168.88.122_18446--207e6f7d": {
"packets": 2017,
"payload_bytes": 322720,
"first_time": 1792632334.146562,
"last_time": 1792632374.546955,
"gaps": [],
"max_interval_ms": 90.52205085754395
},
"192.168.88.122_18438--10.69.70.221_6000--207e6f7d": {
"packets": 2012,
"payload_bytes": 321920,
"first_time": 1792632334.218692,
"last_time": 1792632374.531649,
"gaps": [],
"max_interval_ms": 90.5001163482666
},
"192.168.88.122_18446--10.69.111.3_5004--6fba4fe1": {
"packets": 2016,
"payload_bytes": 322560,
"first_time": 1792632334.229533,
"last_time": 1792632374.530273,
"gaps": [],
"max_interval_ms": 29.480934143066406
}
}
@@ -0,0 +1,128 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"600000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"6000",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d36304454363331330d"
],
"exit_code": 0,
"wall_seconds": 122.79401254095137,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 6000,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_worker_polls": 269411,
"off_hook": false,
"off_hook_pcm_seconds": 82.96888975306241,
"output_gap_samples": 0,
"preparation_ms": 733.6414580931887,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": 66.91439787935396,
"raw_rx_near_rail_samples": 33024,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 1239245,
"samples_sent": 1239245,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,98 @@
{
"number": "6311",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"0.25",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331310d"
],
"exit_code": 0,
"wall_seconds": 51.86475099995732,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 96791,
"off_hook": false,
"off_hook_pcm_seconds": 29.943612677425627,
"output_gap_samples": 0,
"raw_rx_mean": 232.27880702204246,
"raw_rx_near_rail_samples": 105954,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514779,
"samples_sent": 514779,
"tx_gain": 0.25
},
"digit_commands": {
"0013:0001": 2,
"0013:0003": 1,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,99 @@
{
"number": "6312",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"0.25",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331320d"
],
"exit_code": 0,
"wall_seconds": 53.33048516709823,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 96792,
"off_hook": false,
"off_hook_pcm_seconds": 29.943612677425627,
"output_gap_samples": 0,
"raw_rx_mean": 271.4168448984904,
"raw_rx_near_rail_samples": 55529,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514779,
"samples_sent": 514779,
"tx_gain": 0.25
},
"digit_commands": {
"0013:0001": 1,
"0013:0002": 1,
"0013:0003": 1,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,98 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"0.25",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331330d"
],
"exit_code": 0,
"wall_seconds": 51.547995332977735,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"native_lane_io": true,
"native_worker_polls": 96792,
"off_hook": false,
"off_hook_pcm_seconds": 29.943612677425627,
"output_gap_samples": 0,
"raw_rx_mean": 275.26134127460523,
"raw_rx_near_rail_samples": 55473,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514779,
"samples_sent": 514779,
"tx_gain": 0.25
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,78 @@
# Reset/hang-up continuity: fixed and tested
**Later dialing correction:** these attempts used the original 0.25 TX gain;
correct routing to the full extension was not yet established. The later
[unity-gain test](../apple-dtmf-gain/README.md) verifies full-number SIP routing
and answered CDRs for 6312/6313. The reset-continuity results below remain valid.
## Live hardware, explicit pause (no dialing)
`hardware-pause.json` / `.log` record:
1. Start duplex PCM on-hook at 10286 Hz.
2. Seize the powered line with **explicit DSP-reset silence** enabled.
3. Stop sending PCM for **350 ms**, well beyond the old ~100 ms cushion.
4. Resume one second of strict-mode PCM: no underrun or input overflow.
5. Release the hook using a **zero-sample control request**, then wait another
200 ms without PCM. Readback and helper shutdown confirm on-hook.
The helper counts 6144 reset-silence samples and 6144 discarded reset RX
samples, separately from the zero active-gap/overflow counters. The test does
not dial any digits or alter receive/transmit gain registers.
## Real 6311 retry: clean final modem result
`6311/summary.json`, `6311/report.json` and `6311/hardware.log` capture the same
optimized 403 firmware and `ATX1S7=20DT6311` used by the earlier failed attempt.
Earlier captures were preserved in `artifacts/apple-dial-extensions/6311/`.
- Recorded codec TX independently decodes as **6311**.
- Original firmware returns **`NO CARRIER`**; worker exits **0**, no bridge error.
- **Zero active output gaps, zero input overflow**, including DSP teardown.
- 96,791 native worker polls; native lane I/O remains active.
- Seven immediate control updates; 1536 explicit reset-silence samples and
1536 discarded reset RX samples, not counted as active-stream loss.
- Firmware requests on-hook; USB readback verifies hook clear, including an
independent post-call `--status` snapshot.
`verification.json` summarizes these checks. This is a clean modem timeout,
**not** a successful connection or an identification of the remote extension's
state. The existing RX level/clipping problem remains separate.
## Subsequent 6312 and 6313 attempts
Both were tried separately on request after the reset fix. Each returned cleanly
with **`NO CARRIER`**, worker exit 0, zero active output gaps/input overflows, and
verified hook release. Codec TX independently decodes as **6312** and **6313**
respectively. See `extensions-6312-6313.json` and each numbered capture directory.
Neither attempt established a connection.
Reproduce only if another call to that extension is wanted:
```sh
.venv/bin/python tools/build_apple_line.py
.venv/bin/python artifacts/apple-dial-extensions/run_attempt.py 6311 \
--output artifacts/NEW-DIRECTORY
```
## Implementation and safety
A zero-length protocol request carries hook and explicit-reset flags and is
acknowledged immediately, without needing a codec rate or ADC sample. The bridge
sends reset control **before** resetting/rebuilding a core and follows the
firmware hook relay edge immediately, even while the DSP is inactive.
The HAL continues independently: explicit reset produces silence and discards
ADC data that the reset codec cannot consume. A generation boundary discards
retired TX without letting the callback consume newly primed PCM during resume.
The first actual PCM batch returns atomically to strict streaming. An off-hook
reset has a five-second watchdog; unexpected starvation outside explicit reset
still fails closed. The FIFO was not enlarged, nor was active underrun checking
disabled.
`apple_line --selftest` checks callbacks against memory buffers without touching
USB, HAL or microphone permission: reset silence, generation flushing, strict
underrun detection, and the watchdog. Python tests additionally verify control
without PCM/rate, release when a resampler produces no output, servicing before
the inactive-DSP guard, native/non-native equivalence, and a full firmware dial
timeout returning `NO CARRIER`. The focused regression set passes **79 tests**.
@@ -0,0 +1,16 @@
{
"extension": "6311",
"decoded_codec_tx_dtmf": "6311",
"serial": "\r\nNO CARRIER\r\n",
"exit_code": 0,
"native_worker_polls": 96791,
"control_updates": 7,
"helper_counters": {
"active output gaps": 0,
"input overflow": 0,
"reset silence": 1536,
"reset RX discarded": 1536
},
"verified_hook_clear": true,
"transport_error": null
}
@@ -0,0 +1,74 @@
# Active-training underrun: cold filter construction at retune
The original diagnosis below was offline. Filter preflight has since been
implemented and tested in a new live 6313 call; see the verification below.
This fixes the identified cold-retune stall, not every possible underrun.
The corrected-level 6313 call in `../apple-dtmf-gain/default/6313/` reaches and
is answered by the requested endpoint, then fails with **130 active output gap
samples** (12.64 ms at 10286 Hz). This is not a DSP-reset silence interval.
## Trace timing
The failed transaction is immediately after the original firmware retunes:
- service 1056: 43 codec samples at 7200 Hz;
- service 1057: 1 sample at transient 8641.234462 Hz;
- service 1058: 151 samples at 9600 Hz;
- service 1059: next 193 samples at 9600 Hz, transport reports EOF.
There are approximately **90.86 ms** between the starts of service 1056 and
1059, while the first three chunks represent only **21.82 ms** of codec PCM.
The helper's original priming is 1024 / 10286 = 99.55 ms, but the remaining queue
at any instant depends on callback phase and earlier delivery jitter. It is not
a guaranteed 100 ms deadline available to every transaction.
## Identified synchronous work
`BandLimitedResampler.convert` calls `_kernel_for` directly on a new rate ratio.
A cache miss constructs **1024 phases × 128 taps = 131,072 coefficients in
Python**, in the same thread that feeds hardware output. The receive resampler
needs two previously unused tables at this transition, even though the
intermediate clock carries only one input codec sample. The actual clock
boundary must not simply be rounded away.
`retune-benchmark.json` reconstructs the same rate/chunk sequence offline,
prewarming only the already-used boot/dial rates and native retune plumbing:
- transient receive kernel: **20.29 ms**;
- 9600 Hz receive kernel: **21.09 ms**;
- total cold conversion for the short sequence: **43.95 ms**;
- identical sequence with cached tables: **2.53 ms**.
This is a concrete avoidable real-time stall at exactly the observed rate
change, on top of DSP execution, USB status work and callback scheduling.
The successful 6312 call crosses the same edge without an underrun, consistent
with variable remaining FIFO headroom. These measurements identify a strong
contributor; they are not a full live per-function profile ruling out every
other scheduling delay.
## Implemented preflight and verification
`AppleLine` now prepares both resampling directions, native tables/bindings and
26 exact/common/transient 403 clocks before starting the helper. Histories and
actual clock boundaries are retained. `prepare_codec_rates()` permits additional
rates only on-hook; an unprepared active rate fails closed instead of allocating
FIR tables during the call. Reports expose `prepared_codec_rates`,
`preparation_ms` and `live_filter_misses`.
- `preflight-benchmark.json`: **44.47 ms cold → 2.65 ms prepared**, zero live
kernel builds; benchmark opens no hardware.
- `prewarmed/6313/`: **698.48 ms** preparation before opening the line;
**97,362** native polls; no live filter misses or active sample loss.
- Asterisk routes **6004 → 6313**, ANSWERED, **25 billed seconds**; see
`prewarmed-6313-cdr.json`. The worker exits **0**, returns `NO CARRIER`, and
releases the hook. There is still **no CONNECT**.
- `verification.json` retains the 130-sample failure versus the clean retry.
FIFO sizes, priming and strict active-error policy are unchanged.
The subsequent [negotiation investigation](../apple-negotiation-6313/README.md)
independently decodes CRC-valid INFO0 in both directions in this capture. A
longer, separately attenuated call also crosses the retune without a filter
miss, but eventually suffers a **different, late 55-sample active underrun**
after 44.9 seconds off-hook. Its helper log is authoritative; the failed socket
reply leaves Python's reported gap counter stale at zero. This remains open.
@@ -0,0 +1,132 @@
{
"number": "6313",
"command": [
"/Users/scottcryan/courier-emu/.venv/bin/python",
"-m",
"courier_emu.worker",
"/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"--instructions",
"260000000",
"--with-dsp",
"--daa-codec",
"--daa-codec-line",
"1",
"--daa-codec-rate",
"9600",
"--daa-codec-revision",
"4",
"--apple-modem",
"/Users/scottcryan/courier-emu/.build/apple_line",
"--apple-rate",
"10286",
"--apple-tx-gain",
"1.0",
"--line-frames",
"2500",
"--daa-line",
"quiet",
"--nvram-fixture",
"idsdl403",
"--tick-ms",
"5",
"--board-id",
"7",
"--dip",
"result-codes",
"--serial-schedule",
"5000000:4154583153373d32304454363331330d"
],
"exit_code": 0,
"wall_seconds": 52.12087458302267,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"bridge_error": null,
"line": {
"audio_trace": [],
"backend": "apple-usb-modem",
"codec_direct": true,
"codec_queue_peak": 0,
"codec_rates": [
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0,
8641.23446206601,
9600.0,
8000.0,
7200.0,
8000.0,
7200.0,
8000.0,
7200.0
],
"connected": true,
"control_updates": 7,
"error": null,
"frames": 2500,
"input_overflow_samples": 0,
"live_filter_misses": [],
"native_lane_io": true,
"native_worker_polls": 97362,
"off_hook": false,
"off_hook_pcm_seconds": 29.989111413571845,
"output_gap_samples": 0,
"preparation_ms": 698.4751670388505,
"prepared_codec_rates": [
7200.0,
7578.9473684210525,
7800.3482298316885,
7980.997624703088,
8000.0,
8211.812627291243,
8228.0,
8228.57142857143,
8229.0,
8400.0,
8520.710059171597,
8641.23446206601,
8667.239896818573,
8867.385089069716,
8969.96662958843,
9000.0,
9095.420708323934,
9241.347696539078,
9467.011035454332,
9600.0,
9727.382388419783,
10266.666666666666,
10267.379679144386,
10285.0,
10285.714285714286,
10286.0
],
"raw_rx_mean": 129.9522411377561,
"raw_rx_near_rail_samples": 12448,
"raw_rx_peak": 32768,
"resetting": false,
"ringing": false,
"rx_peak": 32768,
"sample_rate": 10286,
"samples_received": 514627,
"samples_sent": 514627,
"tx_gain": 1.0
},
"digit_commands": {
"0013:0001": 1,
"0013:0003": 2,
"0013:0006": 1
},
"final_line_status": {
"hook": 8,
"status": 64,
"sense": 50,
"auxiliary": 2,
"rx_gain_register": 0,
"tx_gain_register": 0,
"protection_register": 12,
"termination_register": 0
}
}
@@ -0,0 +1,43 @@
{
"before": {
"worker_exit": 1,
"serial": "",
"active_output_gaps": 130,
"error": "Apple audio helper closed (see its stderr)"
},
"after": {
"worker_exit": 0,
"serial": "\r\nNO CARRIER\r\n",
"error": null,
"helper_counters": {
"active output gaps": 0,
"input overflow": 0,
"reset silence": 1536,
"reset RX discarded": 1536
},
"native_worker_polls": 97362,
"live_filter_misses": [],
"prepared_rate_count": 26,
"preparation_ms": 698.4751670388505,
"hook_released": true,
"cdr": {
"source": "6004",
"destination": "6313",
"channel": "PJSIP/6004-0000056d",
"destination_channel": "PJSIP/6313-0000056e",
"start_utc": "2026-10-22 00:02:50",
"answer_utc": "2026-10-22 00:02:51",
"end_utc": "2026-10-22 00:03:17",
"billsec": "25",
"disposition": "ANSWERED",
"uniqueid": "1792627370.2120"
}
},
"retune_benchmark": {
"cold_ms": 44.47195678949356,
"preflighted_ms": 2.653082017786801,
"live_kernel_builds": 0
},
"fifo_size_or_error_policy_changed": false,
"regression_tests_passed": 98
}
@@ -0,0 +1,45 @@
# 3453 normal/bootmodem execution checks
Implementation and reproduction: [3453 flash boot](../../docs/3453-flash-boot.md).
The initial `bc-normal.json` records the previous unprocessed AT input;
`c-normal.json` records the previously working stock C execution. Intermediate
`*-first.json`/`*-fixed.json` files preserve bring-up results, not a guarantee
that every diagnostic trace represents the final implementation.
Whole-flash B/C runs demonstrate:
* `bc-whole-normal.json` and `bc-whole-boot.json`: firmware-generated `5608`
and OK using the private captured settings; verified resident download.
* `bc-whole-normal-ati7.json` and `bc-whole-boot-ati7.json`: full profile output
from the original firmware, with 2.2.09 / DSP 2.0.34 and the captured serial.
Product type, DAA revision and flash ID are not hardware-faithful yet.
* `bc-switch-to-boot.json` and `bc-switch-to-normal.json`: original guest
`ATZ!!` handlers cross the verified entry vectors; the final mode and the
transition instruction count appear in `flash`.
* `bc-roundtrip.json`: normal → bootmodem → normal, with `5608` and OK in each
resulting mode and zero remaining serial input.
The assembled image and raw settings live only under the Git-ignored private
archive. They are not part of this public evidence bundle.
Final regression command:
```sh
.venv/bin/python -m pytest -q tests/test_3453* tests/test_machine_map.py \
tests/test_cli_link.py tests/test_native_machine.py
```
Full power-on initially had **79 passing tests**. The hardware-model follow-up
now covers **91 tests**: the full run passed 89, and the two corrected split-image
fixture assertions passed on focused rerun (no implementation changes afterward).
See [hardware-model progress](hardware-model-progress.md) for banking, flash ID,
DAA identity and board-tick fixes, plus the remaining failed call bring-up. Tests cover all four public
captured supervisors, complete-flash round trips, DSP source/table cache
isolation, code-hash guards, actual-PC diagnostics, CLI forwarding and existing
3453/older ROM behavior. Power-on cases execute `FFFF0` and the original loader:
valid application CRCs select normal, a momentary selection input selects
recovery, and corrupt application/supervisor bytes or an absent normal image
cause genuine CRC-driven recovery. Both families answer AT commands after these
paths with matching DSP bootstrap. A cold B/C startup also passes a subsequent
`ATZ!!` round trip. Carrier operation remains untested.
@@ -0,0 +1,71 @@
# Hardware-model follow-up
All operations are offline. Captures and credential-bearing settings are not
modified. The assembled B/C source remains private and Git-ignored.
## Implemented
* EB chip-select decoding for LCS, UCS and GCS2, using the start/stop fields,
enable, memory-space and ignore-stop bits documented in the 80C186EB manual.
* Firmware-derived GCS2-to-flash-A19 mapping: `800A` gives the normal half-bank
decode, `000E` produces the low-flash alias used by the boot DSP downloader.
Entry-point hooks no longer rewrite flash memory; they select execution ABI.
* The transfer sender's temporary RAM-copy window is decoded independently of
which supervisor is running. Flash-view refreshes skip currently selected
SRAM ranges. Separate physical SRAM backing/alias behavior remains incomplete.
* Read-only AMD-compatible unlock/autoselect/reset commands. Ordinary RAM-size
probes cannot program flash. Manufacturer/device values come from recorded
hardware ATI7: B/C **20-22EC**, C **C2-22D6**. Erase/program are unsupported,
not silently treated as successful updates. Sector protection is not modeled.
* ASIC DAA identity is queued over the actual CPU-facing mailbox after native
codec PLL/link setup. Firmware receives `007B:0013` on the healthy model;
explicit revision zero is covered as an invalid-identity case. This is an
ASIC model report, not a DSP-originated report or an ATI/RAM patch.
* Both mailbox IRET paths are relocated for B/C normal and both bootmodems.
Missing translation previously left the timer-in-handler latch set and
suppressed DSP-paced board ticks. The four-profile regression checks actual
IRET opcodes, continuing ticks, AT replies and resident-download matching.
## Identity results
The private B/C full image now executes its original `ATI7` formatter and emits:
```
Flash ROM 1024k, 20-22EC
DAA rev 0013
```
Follow-up: Internal came from the legacy default strap code 2, not RAM `1C04`.
Captured 3453 profiles now model External with code 7 (physical 7 versus 13
remains unmeasured). The newest valid private settings record, version 32,
has an erased product-ID override; versions 29–31 contain `00345303`. The
original getter rejects `FF`, explaining the blank normal ID. `1C04` only
gates whether the ID line is printed. Nothing is patched to conceal this.
See [the product/RAM/calibration audit](../../docs/3453-product-ids-and-calibration.md).
## Offline dial control
```sh
./courier run "$FLASH" --with-dsp --exchange --instructions 24000000 \
--summary --at 'ATX3S7=3' --at 'ATD5551212'
```
Before IRET translation: no board ticks, zero exchange calls, no line seizure.
After translation: **4,547 ticks**, **one exchange call**, **301 DTMF analysis
blocks**, line subsequently released; **no decoded digits**, no call-overlay
downloads, `NO CARRIER`. DTMF analysis blocks are not evidence that actual
DTMF was transmitted. No connection or payload delivery is claimed.
A `--real-delays` control with 18 million instructions had not reached the
command loop; it cannot be counted as a call test. Calibration/clock behavior
still requires investigation rather than assuming accelerated waits are faithful.
## Remaining work
* Product/country/board identification producer and complete ATI7 agreement.
* Serial-codec calibration, hook/control timing and nonzero dial audio.
* Board-specific DSP RAM aliasing (32K-word hybrid versus 64K-word C).
* Guest-driven XMODEM transfers and their exact byte/CRC checks.
* A complete lower-rate call before V.34/V.90/V.92 or payload interoperability.
See [implementation and usage](../../docs/3453-flash-boot.md).
@@ -0,0 +1,24 @@
# Failed independent bidirectional 60-second traffic gate
The call holds carrier, but fails sustained traffic: 2 complete upstream and
14 downstream records, with long gaps and incomplete outstanding records.
It negotiates 52000 downstream / 33333 upstream. Full-window 53333 controls
also fail. The three-minute extension was not run.
`verification.json` independently replays all captured traffic prefixes from
`result.json`: 7,553 analog-received bytes and 1,390 I-modem-received bytes.
Complete-record hashes and partial prefixes match. Verification still fails
because traffic stalls and too few upstream records arrive.
Post-window ATI6 reports 623 BLERs, 63 resent blocks and 10 link timeouts.
The measured health snapshot has no UART drops, PCM underruns, occupied-bank
writes or changing unacknowledged read pairs. These observations do not yet
locate the first bad bit or establish the block errors' underlying cause.
Recheck without placing a call (expected exit status 1):
```sh
PYTHONPATH=. .venv/bin/python artifacts/imodem-analog-x2-native-traffic-independent-60s-20261018/verify.py
```
See [the diagnosis, controls and reproduction command](../../docs/imodem-analog-x2-traffic-20261018.md).
@@ -0,0 +1,169 @@
{
"analog_board": "403",
"analog_image": "/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"protocol": "default",
"speed_index": 0,
"disable_v34": false,
"analog_settings": "X1S27=1S54=0S58=48&A3&B1Q0&U26&N39",
"wallclock": true,
"analog_result_mode": 1,
"imodem_settings": "S54=0S58=48&A3&B1Q0",
"foreground_overlay_assist": false,
"connected": true,
"data_delivery": {
"analog_to_imodem": null,
"imodem_to_analog": null
},
"imodem": {
"clock": {
"wall_seconds": 89.20811716699973,
"native_io_live": true,
"native_io_wallclock": true,
"pcm_frame_service": false,
"realtime_cycles": 3245223492,
"active_idle_samples": 0,
"native": {
"peak_lag_cycles": 1937348,
"bounded_advances": 48775,
"advances": 1278223,
"data_posts": 413160,
"data_acks": 235132,
"data_byte_reads": 470604,
"bank_0_busy_writes": 0,
"bank_1_busy_writes": 0,
"bank_2_busy_writes": 0,
"bank_3_busy_writes": 0,
"bank_4_busy_writes": 0,
"bank_5_busy_writes": 0,
"data_torn_words": 0
}
},
"serial": "\r\nOK\r\n\r\nCONNECT 33333/ARQ/x2/LAPM/V42BIS\r\n~CEMU:O:00000000:f8926d74415cf3a56c001bccddb5a3082abda93c148d61a8028b8a4588016855d00c51db894945dc52f68996aef96663a535e9bc2cf22c405508a327c4561955131f5912fce0f80830a0d553081b1fcf05867e702787ada8b1cb51d5d80b9b9903f000adbf13519dcdb94ee1870550f3ccbc7f0b61fac59f09600e2499a482eef879f84538387efbcf41f4002548456efeb2058a8946b0c33245fc008cd7144c45a1171eccf4e3c1c89c9ad1750db8e110ae9724672eb57211705227c0f6a466ecbed6e2d193f87e7291fa73300ce0e10a7bcde49198f545a263f58bc1d479e54509a3a1d9c086609125c34f15b808c96f4d156a18f31f354979f7e69200ad3e\r\n~CEMU:O:00000001:5459a02e85f6c6ce450684274f3e0ca530b0a4f73108c3a5669fba5e879d0033ca63fff0407943bf4954af0dfebf977390cfad055b7ad6acfb3041902b2c722687b3de3cffb84f398ce48154992e5b2951e5d25cc12aa0172f822e75b5f4055b99079c338510440a664e246dcb51d547d99e378f3260c7dbd625ff1e62d885374a75057cb4e8d29ab8108f8e23743fb315fff4c88e7c6bec47a64ff9be2946acf8ed4a20a3830a977e74709adc8bdbe7258f506677b451326210ad266a301d2710bd397158d04fb378f9b326508a22d7b396f1998dfcc0d93bb050d2223fffb3431b93afd6b2a7cc4fec746089f327541dbe29d2cf09f7715294c27f0da2cfbe\r\n~CEMU:O:00000002:d38c020c8d8a6d22999859d6338d8bb87af9199390b7cb8acfac26a0c2e5dc86976e2bfc7c9b7c55f1b710337223b45c4a42314697cb4e0e9661af1493b9664998e553c4f8c484f7f802378be506ba05a8919f347c9dee988939a2c068976124cf068d22620baf3b50737949e195547a7b75e44217d3dcca2784fb0ad8713770632c1f923aa66d6c9c94924d15d5d68fa2b4e56674503351a7e4299d0b8698224c901b22e388710b4e1919e00c4cc07e8911b762410b2658a7ae40e20634993ca92a7961cbe7a5a73ad4b71f9f9c037\r\nOK\r\n\r\nUSRobotics Courier I-Modem with ISDN/V.34 Link Diagnostics...\r\n\r\nChars sent 6144 Chars Received 0\r\nChars lost 0\r\nOctets sent 5007 Octets Received 1217\r\nBlocks sent 152 Blocks Received 180\r\nBlocks resent 63\r\n\r\nRetrains Requested 0 Retrains Granted 0\r\nLine Reversals 0 Blers 623\r\nLink Timeouts 10 Link Naks 0\r\n\r\nData Compression V42BIS 2048/32\r\nEqualization Long\r\nFallback Disabled\r\nProtocol LAPM\r\nSpeed 28800/54666\r\nCurrent Call 00:00:33\r\n\r\nOnline\r\nOK\r\n",
"connect_rate_bps": 33333,
"carrier_connected": true,
"isdn_call_state": "active",
"dsp": {
"pc": 51402,
"op": 24971,
"acc": -55,
"accb": 1826,
"preg": 3286088,
"dp": 7,
"arp": 3,
"flags": 50,
"idle": false,
"instructions": 3636655396,
"cycles": 4255653799,
"io_events": 8192,
"ar0": 60,
"ar1": 704,
"ar2": 2429,
"ar3": 2549,
"ar4": 19,
"ar5": 56985,
"ar6": 1123,
"ar7": 3024,
"arcr": 60,
"indx": 60
},
"recent_mailbox": [
"73.3376 reply 0020:000c",
"74.1374 reply 0020:000c",
"74.9376 reply 0020:000c",
"75.7375 reply 0020:000c",
"76.5375 reply 0020:000c",
"77.3375 reply 0020:000c",
"78.1376 reply 0020:000c",
"78.9375 reply 0020:000c",
"79.7376 reply 0020:000c",
"79.9945 cmd 005b:0001",
"79.9970 cmd 005b:0001",
"80.4746 cmd 005b:0001"
],
"error": null
},
"analog": {
"serial": "\r\nCONNECT 52000/ARQ/x2/LAPM/V42BIS\r\n~CEMU:A:00000000:c184ebbce35b6b6e9b08e52994694897b175834f978763ab9b48f445405f45b5193d6860efe3400b8a304e16162bfb6a2fc149685be2e2bc8a0aae32338cc2dbfcaadf8a9713cef18b93111c5274279142d0a622e77d83a663e7b1af831fa7faa38923e7089d7652724fca9aab6c3e67687eaf4a690b4835c6555da0de0aae9b796f077ad6dfaf5776e6c7149bb6cd1bd9038c09a8343e34648cf0c2200a14cf23b872102aae917f3078cb499a13e2a7d06d80acd16d955cc7a34299ceda8b4cdb31d50f35da47fc55a2bb26ab49d9895b7105968f21606a9f6dd7595cea2fcdb20104d9f8d2873026ddb4a38b90ef5521404fcbbd7f9741e4938f5abbc9c152\r\n~CEMU:A:00000001:081a6737466ee4a9d6148050ea5ea9f2efdc4b15cf3a55bcc5791d2b7a2e0535bc7d8b60e0ba16679608f5b1748bae54d12b40a8f7ec92eab155668b39c7504ac49b3176c55c29eaadcf9511f17fe6d17f823a76e75aa53ced109d14ee2e164f3f9971a802fa45daff52614209b6ec69c035dc4cd6a85e991be344f1d81b10db4f0b2a86ad8a7fa05c359cf468110c2c028f7d726788aff1663b6e36d8913c2b7240fad522e196667056a0bc7b8dc6e9f9d4c4974cdf7313739c15439cdebd7ed6725fd8becc61b2b3bb4e311bea7fda37854811c750f372b36941cb8c9a226410d01897ab7d7e82c8d98c142d85e48377b4cd6084d21f94aa22eb0f54fe1d6d\r\n~CEMU:A:00000002:da8b1539a81dcfacc7a0054143e937099b36a0157d12f8feb119e256c6170dfcf42273061729bb74d8015658b88b92a46c329c8f118fc38644ff48e99a9f6200212a11a1fe6a2e693a0a2616c3a4d0d51949593117220591f6a228939ee2f0bc7f0294cc1aa2ac3946a79fb6aea1a3b733be28d7d157928cfe9886e204ac45f482d7c0b54f0e7143b22c00fe40cebb8b0a8a4aeaf4b963fccd52638428c90cfa64d900ebd5df2c4dd68af87a006e30110c5bc3e6e1bc971b2a67a77d8f7830056615d1e77543b992c3ca0c367b004b1c9ffcb922f6cb3f730c5955d0e973ec849ac349351a949eb8d9c252123865f8cad5f87413f9182e457db7d8cd49c7da67\r\n~CEMU:A:00000003:0995ddb4f839667fb5f107b91526c967ebb7ab8b4f37c90673105603d95cfe3c97ccaf1ea4577e8e665a208ecaedfa5e540689155b89d8aabaccf9e495a39bc4e2a63c735ea7417335763a727763d71d4a4be85a9a621c99fb02bddec5d6c9cba82857d5e03dacd829cf817e5a2abe50c42dd0d8ac33aa18079a0ee038bb416e1991d8ceefba61c6b76b7b95e4190fb98b63d8bbae7313e7f73cb8f81295c9f1d5f33cbebd65dbc325647479e0bb401753a41f9fcbb82db0090fdbd5227ce1354bb3cc63fb4e70a9d6b9b137bbaed1380a7d50143a9fcee5174d37296851eaa2ae5843aa6078182c2c965ff83e9234d037f2e876a898f322fe574b2aa4030f72\r\n~CEMU:A:00000004:be3e250ae6a49a8a4e26dabe9a51c73546205bfe8ab9c7666fd40887b04bc9c95ae0f96585f797146772caf5828e9061eba48cb5a5fad04430e7147f23b5af081be46ab690c65005d10148bf964d3a0d6aef24478502ac14f3f321ea90ede4a2e8dd42ec8e755d9817fb34853404542bcab5589b0ace1d84ba6fc73cc649d11523e3bf0cdaf7db94783e3f5417585fd27548c14f86899bdefd4ed7e806d4638dd077e4841756368ec597c4e58ec49c3f642fdadf48fee60aeeefad960ab74fad1ae29104a91df978cc80ef21a3039d13b4a0f4cde61df4eeef668be8c26f7d0379d8ba3acc7d154fb31f48c65067e78be62cd810ef1b6d9fa97bf314e02b60f4\r\n~CEMU:A:00000005:7bfd96e70911d318aa6851ab786455366afd1e26c6b4f5dfbdff5fdb0703aad52b21eeaf44c862bb3d2d88b2ad70f43d71c8807574d2716eba0b7daf1ea12e1581a995f34459703d76291b80f4a0dd1fffe50729abf365f5c312f42fd34671c49b630e2df607423095b32b0274b4f4707585c57e755efb4c56e271e68a13cfa82761aa5b2d9e1842c7144a25b0b5e7752787db577754cfea2233a28d30985bdc4d7a38cd6ebd56996326049281668b8189b0a251d9fd83db51af791db22e158247c803e947676313a163f6a30e856917973580c82b363038d6eb5d79833e0b14cdd8829996485b51e6a1fafae060d33d559ad35219db14ad0bb613a242ed24b9\r\n~CEMU:A:00000006:0ee1e571536cb580ef125c51472db7d7312844cd83ccc592ae94ec319d6a929ab4f65a25322359510433c8a5c220820a237a677bdaa4aaf1ac3a8d6c07fab20d42f9a1277f7670ebee253a048423dececc72926d1e3c17a587dcb04eff2d0df83f41c3cb21d7564e403e05baa5d540dea3cd398a7e47ed9c734de45364a2e0d6737a48642f6a22eaf1847cf521c5ab60dbde839b325ef1c1ef83edba5420c225d527d443bb7d575148d5f9a25e5c30bf68817bc8b92afe5eb87057f60c9adbe8830be56331c60158ed3b7091532b1e79f1b6d35fb164352173a381dcc07c589a5af0335730947cc50835bc3f29235797850413f6e3c9c2687db5caa14772edde\r\n~CEMU:A:00000007:7cea7fd8859d80a04d39ecd17128515be421a872828db8a6356a1e878a339a8884bd57f2ad02a58998671f21df949289a76a2b44d92baa669c79fa0d9c1bee6427c0b255821a13302c27279bf0d55c71a28653abc6cdb1d933a4b8a684140cb675758eecc838b5bfc3ce3424e70f0a48c21ee8b8a0e7eb687024f5cbde4428186f4dd6c2f7be7d9c61bb073fe6c3ea58e714f67cc614367787d1f843b481f63ead629b492a33a0a27a660345181bc360c0ba561fc2245a6b9b0f2bb5daaa2a3a1735b2f043dfccc65879764d2687d176c71d8087a79111e22afcc6a3c7abadde960e89cca05f292e8646f99e41d787e66383f81ae58ec15eaa107d13fe6b6db5\r\n~CEMU:A:00000008:dd70f52accc2302a7413b625a5720f47f908e722f66f97de830ec0b6d9089b9a11ff330c499138180118eb59f4d3ce852de21d94795f9719049c5e27dd5131edc1c72b9433c765013348934226834c95d7f1969b76e47d59768a0fa7cf94cbb5ce1f4f36518baf95fc6463bdd4db7824686a2512a58954311920ea2c5b459cc5ca0a938e99c5a8ba56527fb420b693058c851d6059df18b56244ba3aa9f9271c06996fd1c3b82dbf1493168704941aa0967097029496165bd4a1af210e0d03f3cab39a85d2572228c20566c42ebf618494ab7664e04b6b4cbedc5ec6e2511802d299bc051e4775817a2d7492ac507e315622ead747594deed20e09a083294a48\r\n~CEMU:A:00000009:5210da1be9f0c176b531c262468774a5eceff65e0451c1143fc7dbddb383637599528d4b3a03c4bc48b245a4b5b0e4208972f2ec7b146ac47305474cd21d9c57d5Line truncated
"connect_rate_bps": 52000,
"carrier_connected": true,
"error": null
},
"bridge": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-qv74zjmr/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 5276,
"connected": false,
"peer_off_hook": false,
"peer_call_state": "cleared",
"peer_instructions": 458714000,
"samples_sent": 844160,
"samples_received": 844160,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": true,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 643840,
"from_line": 643840,
"pending": 133
},
"silence_frames": 1252,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 943: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
]
},
"bridge_at_limit": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-qv74zjmr/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 5276,
"connected": true,
"peer_off_hook": true,
"peer_call_state": "answered",
"peer_instructions": 458714000,
"samples_sent": 844160,
"samples_received": 844160,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": true,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 643840,
"from_line": 643840,
"pending": 133
},
"silence_frames": 1252,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 943: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
]
}
}
@@ -0,0 +1,179 @@
{
"passed": false,
"errors": [
"analog: traffic stalled",
"imodem: insufficient verified traffic"
],
"integrity": {
"analog": {
"matches_saved_bytes": true,
"checked_bytes": 7553,
"complete_records": 14,
"partial_bytes": 119,
"complete_record_sha256": "e17304e1283f4a425270b9d586f0528b4c593e986483a8f5d5b04b5f54c98710"
},
"imodem": {
"matches_saved_bytes": true,
"checked_bytes": 1390,
"complete_records": 2,
"partial_bytes": 328,
"complete_record_sha256": "b4249f63dfb9deede21d372e004614ae35d9106da84d4169c8ac49db9106d4b5"
}
},
"carrier_at_window_end": true,
"host_transport_clean": true,
"windows": {
"analog": {
"elapsed_frames": 600,
"errors": [],
"largest_receive_gaps": [
{
"end_frame": 15,
"gap_frames": 8,
"sequence": 1,
"start_frame": 7
},
{
"end_frame": 23,
"gap_frames": 8,
"sequence": 2,
"start_frame": 15
},
{
"end_frame": 31,
"gap_frames": 8,
"sequence": 3,
"start_frame": 23
},
{
"end_frame": 39,
"gap_frames": 8,
"sequence": 4,
"start_frame": 31
},
{
"end_frame": 47,
"gap_frames": 8,
"sequence": 5,
"start_frame": 39
},
{
"end_frame": 55,
"gap_frames": 8,
"sequence": 6,
"start_frame": 47
},
{
"end_frame": 63,
"gap_frames": 8,
"sequence": 7,
"start_frame": 55
},
{
"end_frame": 71,
"gap_frames": 8,
"sequence": 8,
"start_frame": 63
},
{
"end_frame": 79,
"gap_frames": 8,
"sequence": 9,
"start_frame": 71
},
{
"end_frame": 87,
"gap_frames": 8,
"sequence": 10,
"start_frame": 79
}
],
"last_rx_frame": 110,
"max_gap_frames": 8,
"mean_receive_gap_frames": 7.857142857142857,
"pending_bytes": 119,
"received_bytes": 7434,
"received_records": 14,
"received_sha256": "e17304e1283f4a425270b9d586f0528b4c593e986483a8f5d5b04b5f54c98710",
"record_size": 512,
"sent_bytes": 1593,
"sent_records": 3,
"sent_sha256": "761598c66d045d018ef64f5a04a7a9ba0d9edbb38fbd167170aaa9b42bc03125",
"started": true,
"target_frames": 600,
"target_receive_bytes_per_second": 123.9,
"target_received_bytes": 7434
},
"imodem": {
"elapsed_frames": 600,
"errors": [],
"largest_receive_gaps": [
{
"end_frame": 274,
"gap_frames": 274,
"sequence": 0,
"start_frame": 0
},
{
"end_frame": 357,
"gap_frames": 83,
"sequence": 1,
"start_frame": 274
}
],
"last_rx_frame": 357,
"max_gap_frames": 274,
"mean_receive_gap_frames": 178.5,
"pending_bytes": 328,
"received_bytes": 1062,
"received_records": 2,
"received_sha256": "b4249f63dfb9deede21d372e004614ae35d9106da84d4169c8ac49db9106d4b5",
"record_size": 512,
"sent_bytes": 7965,
"sent_records": 15,
"sent_sha256": "ba9daf1d8310b6cd1f8fcd5d970ce37b6f4cb11811428c6399e75bba22a3c140",
"started": true,
"target_frames": 600,
"target_receive_bytes_per_second": 17.7,
"target_received_bytes": 1062
}
},
"throughput": {
"analog": {
"payload_bytes_per_second": 119.46666666666667,
"record_bytes_per_second": 123.9
},
"imodem": {
"payload_bytes_per_second": 17.066666666666666,
"record_bytes_per_second": 17.7
}
},
"clock": {
"active_idle_samples": 0,
"native": {
"advances": 1191781,
"bank_0_busy_writes": 0,
"bank_1_busy_writes": 0,
"bank_2_busy_writes": 0,
"bank_3_busy_writes": 0,
"bank_4_busy_writes": 0,
"bank_5_busy_writes": 0,
"bounded_advances": 45122,
"data_acks": 218940,
"data_byte_reads": 438178,
"data_posts": 382567,
"data_torn_words": 0,
"peak_lag_cycles": 1937348
},
"native_io_live": true,
"native_io_wallclock": true,
"pcm_frame_service": false,
"realtime_cycles": 3062304472,
"wall_seconds": 84.65703866700642
},
"connect": {
"analog": "\r\nCONNECT 52000/ARQ/x2/LAPM/V42BIS\r\n",
"imodem": "\r\nOK\r\n\r\nCONNECT 33333/ARQ/x2/LAPM/V42BIS\r\n"
},
"ati6": "\r\n\r\nChars sent 6144 Chars Received 0\r\nChars lost 0\r\nOctets sent 5007 Octets Received 1217\r\nBlocks sent 152 Blocks Received 180\r\nBlocks resent 63\r\n\r\nRetrains Requested 0 Retrains Granted 0\r\nLine Reversals 0 Blers 623\r\nLink Timeouts 10 Link Naks 0\r\n\r\nData Compression V42BIS 2048/32\r\nEqualization Long\r\nFallback Disabled\r\nProtocol LAPM\r\nSpeed 28800/54666\r\nCurrent Call 00:00:33\r\n\r\nOnline\r\nOK\r\n"
}
@@ -0,0 +1,20 @@
# Verified 53333 analog x2 native wallclock repeat
`verification.json` passes all checks: 53333 downstream, 33333 upstream,
both direction-specific markers intact, native wallclock I/O active,
no per-frame Python callback, no active idle fill, no CPU/DSP errors,
no receive underruns or I-modem UART drops, and both sides answered before
the harness closes the socket. The call carries 74.36 seconds of active
media, including training and the idle tail after marker delivery.
The final analog `NO CARRIER` follows socket shutdown. `bridge_at_limit`
preserves the live carrier boundary before shutdown.
Recheck the saved evidence with:
```sh
.venv/bin/python artifacts/imodem-analog-x2-native-wallclock-bounded-repeat-20261018/verify.py
```
See [the audit and reproduction command](../../docs/imodem-analog-native-wallclock-20261018.md)
for the failed unbounded controls and the focused scheduling correction.
@@ -0,0 +1,154 @@
{
"analog_board": "403",
"analog_image": "/Users/scottcryan/courier-emu/dumps/courier-board-21210-capture-403/courier-board.rom",
"protocol": "default",
"speed_index": 0,
"disable_v34": false,
"analog_settings": "X1S27=1S54=0S58=48&A3&B1Q0&U26&N39",
"wallclock": true,
"analog_result_mode": 1,
"imodem_settings": "S54=0S58=48&A3&B1Q0",
"foreground_overlay_assist": false,
"connected": true,
"data_delivery": {
"analog_to_imodem": true,
"imodem_to_analog": true
},
"imodem": {
"clock": {
"wall_seconds": 86.19628791604191,
"native_io_live": true,
"native_io_wallclock": true,
"pcm_frame_service": false,
"realtime_cycles": 2998401621,
"active_idle_samples": 0
},
"serial": "\r\nOK\r\n\r\nCONNECT 33333/ARQ/x2/LAPM/V42BIS\r\nANALOG-X2-53333-BOUNDED-REPEAT",
"connect_rate_bps": 33333,
"carrier_connected": true,
"isdn_call_state": "active",
"dsp": {
"pc": 51471,
"op": 41872,
"acc": 1096,
"accb": 518,
"preg": 4092,
"dp": 7,
"arp": 1,
"flags": 58,
"idle": false,
"instructions": 3438775432,
"cycles": 4008828201,
"io_events": 8192,
"ar0": 60,
"ar1": 646,
"ar2": 2488,
"ar3": 2608,
"ar4": 19,
"ar5": 57034,
"ar6": 1123,
"ar7": 3030,
"arcr": 60,
"indx": 60
},
"recent_mailbox": [
"65.3381 reply 0020:000c",
"66.1380 reply 0020:000c",
"66.9380 reply 0020:000c",
"67.7380 reply 0020:000c",
"68.5381 reply 0020:000c",
"69.3381 reply 0020:000c",
"70.1380 reply 0020:000c",
"70.9381 reply 0020:000c",
"71.7380 reply 0020:000c",
"72.5381 reply 0020:000c",
"73.3380 reply 0020:000c",
"74.1381 reply 0020:000c"
],
"error": null
},
"analog": {
"serial": "\r\nCONNECT 53333/ARQ/x2/LAPM/V42BIS\r\nIMODEM-X2-53333-BOUNDED-REPEAT\r\nNO CARRIER\r\n",
"connect_rate_bps": 53333,
"carrier_connected": true,
"error": null
},
"bridge": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-4wgf0n8o/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 4970,
"connected": false,
"peer_off_hook": false,
"peer_call_state": "cleared",
"peer_instructions": 432104240,
"samples_sent": 795200,
"samples_received": 795200,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": true,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 594880,
"from_line": 594880,
"pending": 120
},
"silence_frames": 1252,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 943: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
]
},
"bridge_at_limit": {
"line": {
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-4wgf0n8o/line.sock",
"listen": false,
"audio_only": false,
"digital": true,
"sample_rate": 8000,
"frame_samples": 160,
"frame_ms": 20,
"record_prefix": null,
"frames": 4970,
"connected": true,
"peer_off_hook": true,
"peer_call_state": "answered",
"peer_instructions": 432104240,
"samples_sent": 795200,
"samples_received": 795200,
"error": null
},
"analog_codec": "ac01",
"realtime_clock": true,
"analog_to_ulaw_db": -5.860000000000002,
"ulaw_to_analog_db": -5.539999999999999,
"call_state": "answered",
"answered": true,
"dialled": "",
"cleared": false,
"octets": {
"to_line": 594880,
"from_line": 594880,
"pending": 120
},
"silence_frames": 1252,
"active_idle_samples": 0,
"events": [
"the line is ringing us at frame 943: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
]
}
}
@@ -0,0 +1,75 @@
{
"passed": true,
"checks": {
"analog_at_least_53333": true,
"both_x2_lapm": true,
"analog_to_imodem": true,
"imodem_to_analog": true,
"native_wallclock": true,
"no_per_frame_python_callback": true,
"no_active_idle_fill": true,
"isdn_active_at_limit": true,
"analog_carrier_at_limit": true,
"no_imodem_no_carrier": true,
"no_cpu_dsp_errors": true,
"no_receive_underruns": true,
"no_imodem_uart_drops": true
},
"analog_rate_bps": 53333,
"imodem_rate_bps": 33333,
"analog_terminal": "\r\nCONNECT 53333/ARQ/x2/LAPM/V42BIS\r\nIMODEM-X2-53333-BOUNDED-REPEAT\r\nNO CARRIER\r\n",
"imodem_terminal": "\r\nOK\r\n\r\nCONNECT 33333/ARQ/x2/LAPM/V42BIS\r\nANALOG-X2-53333-BOUNDED-REPEAT",
"clock_at_limit": {
"active_idle_samples": 0,
"native_io_live": true,
"native_io_wallclock": true,
"pcm_frame_service": false,
"realtime_cycles": 2998401621,
"wall_seconds": 86.19628791604191
},
"bridge_at_limit": {
"active_idle_samples": 0,
"analog_codec": "ac01",
"analog_to_ulaw_db": -5.860000000000002,
"answered": true,
"call_state": "answered",
"cleared": false,
"dialled": "",
"events": [
"the line is ringing us at frame 943: offering the I-modem a 3.1 kHz call",
"the I-modem answered at frame 1252: off hook"
],
"line": {
"audio_only": false,
"connected": true,
"digital": true,
"error": null,
"frame_ms": 20,
"frame_samples": 160,
"frames": 4970,
"listen": false,
"path": "/var/folders/_1/yfx80wlx5g38qqrwdkzxncz00000gn/T/courier-imodem-analog-4wgf0n8o/line.sock",
"peer_call_state": "answered",
"peer_instructions": 432104240,
"peer_off_hook": true,
"record_prefix": null,
"sample_rate": 8000,
"samples_received": 795200,
"samples_sent": 795200
},
"octets": {
"from_line": 594880,
"pending": 120,
"to_line": 594880
},
"realtime_clock": true,
"silence_frames": 1252,
"ulaw_to_analog_db": -5.539999999999999
},
"instruction_limits": {
"analog": 450000000,
"imodem": 900000000
},
"analog_no_carrier_in_final_capture": true,
"shutdown_note": "The analog worker continues after the I-modem closes the socket. Carrier acceptance uses the saved pre-close boundary."
}
@@ -0,0 +1,28 @@
# Two-minute symmetric x2 traffic: PASS
Two unmodified `Ie030002.nac` supervisors/native DSPs, byte-exact PCMU bearer.
Run with `S54=0S58=48&K0`, the existing 230400-bps NI-1 NVRAM profile,
`--instructions 1200000000 --traffic-seconds 120 --check-connect --check-x2`.
Both ends returned `CONNECT 64000/ARQ/x2/LAPM`. The caller received all 221
answer records (117,351 bytes); the answer received all 222 caller records
(117,882 bytes). No partial or in-flight records remained. Last receive
completion was at 119.8/120.3 seconds after CONNECT; the largest gaps were
4.5/4.6 seconds. Both ISDN calls remained active through 215.4/215.5 seconds
post-CONNECT. There were no corruption events, CPU/DSP errors, UART drops,
UART overruns or PCM underruns. `summary.json` records `traffic_verified: true`.
The 64-KB serial **report capture** is truncated by design; `serial_session`
contains the live terminal stream and the traffic verifier checked it during
execution. Legacy `data_delivery` fields in this run's summary refer to empty
marker arguments; use the `traffic` fields for numbered-record delivery.
Firmware SHA256:
`3f9a7aa8033323c28eebfee950b53267a67b7ad9141ebf30271918d0babbe358`
NVRAM (`../imodem-pair-x2-full-rate-routed-20261002/nvram-230400-switch2.sav`)
SHA256: `ddd313b85f2d57c0c157a46b2bc014a814f0cff0a853af35faa839aeca87db35`
This is sustained bidirectional delivery, not 64-kbit/s saturation or analogue
Courier interoperability. See `../../docs/imodem-x2-traffic.md` for the capture
bug, failing controls, traffic framing and reproduction command.
@@ -0,0 +1,44 @@
# Three-minute symmetric x2 traffic: PASS
Two unmodified `Ie030002.nac` supervisors and native C51 DSPs exchange a
byte-exact PCMU B channel. No carrier or received payload is injected.
```sh
PYTHONPATH=. .venv/bin/python tools/probe_imodem_pair.py \
--protocol x2 --settings 'S54=0S58=48&K0' \
--nvram artifacts/imodem-pair-x2-full-rate-routed-20261002/nvram-230400-switch2.sav \
--instructions 2000000000 --traffic-seconds 180 \
--check-connect --check-x2 --output artifacts/imodem-pair-x2-traffic-repeat
```
| Observation | Caller | Answerer |
|---|---:|---:|
| CONNECT | 64000/ARQ/x2/LAPM | 64000/ARQ/x2/LAPM |
| Sent records | 340 | 340 |
| Received records | 340 | 340 |
| Verified received bytes | 180,540 | 180,540 |
| Last received record, seconds after CONNECT | 180.0 | 180.1 |
| Largest receive gap, seconds | 4.5 | 4.6 |
| Active bearer duration after CONNECT, seconds | 375.4 | 375.5 |
| Partial/in-flight records remaining | 0 | 0 |
| Corruption, UART drops/overruns, PCM underruns | 0 | 0 |
| CPU/DSP errors | none | none |
`summary.json` has `traffic_verified: true`; the strict five-second receive
gap limit is unchanged. Adjacent terminal chunks are coalesced in
`serial_session`, while verification checks each byte during execution.
The UART's 64-KB report capture is deliberately only a prefix. Legacy
`data_delivery` fields in this run refer to unused short-marker arguments;
`traffic` and `verification.json` describe the actual numbered records.
Firmware SHA256:
`3f9a7aa8033323c28eebfee950b53267a67b7ad9141ebf30271918d0babbe358`
NVRAM SHA256:
`ddd313b85f2d57c0c157a46b2bc014a814f0cff0a853af35faa839aeca87db35`
This validates **three minutes of bidirectional digital symmetric x2 traffic**
and over six minutes of carrier survival, not continuous traffic throughout
the final idle tail, full-rate application saturation or analogue Courier
interoperability. See `../../docs/imodem-x2-traffic.md` for failing controls
and the UART capture-limit fix. The full test suite passes (397 tests).
@@ -0,0 +1,51 @@
{
"firmware": "Ie030002.nac",
"firmware_sha256": "3f9a7aa8033323c28eebfee950b53267a67b7ad9141ebf30271918d0babbe358",
"nvram": "../imodem-pair-x2-full-rate-routed-20261002/nvram-230400-switch2.sav",
"nvram_sha256": "ddd313b85f2d57c0c157a46b2bc014a814f0cff0a853af35faa839aeca87db35",
"settings": "S54=0S58=48&K0",
"instructions_per_worker": 2000000000,
"requested_traffic_seconds": 180,
"max_allowed_receive_gap_seconds": 5,
"traffic_verified": true,
"x2_verified": true,
"bidirectional_data_verified": true,
"injected_carrier_or_received_payload": false,
"sides": {
"originate": {
"connect_result": "CONNECT 64000/ARQ/x2/LAPM",
"sent_records": 340,
"received_records": 340,
"sent_bytes": 180540,
"received_bytes": 180540,
"last_receive_seconds_after_connect": 180.0,
"maximum_receive_gap_seconds": 4.5,
"active_bearer_seconds_after_connect": 375.4,
"corruption_events": 0,
"partial_bytes": 0,
"uart_output_dropped": 0,
"uart_overruns": 0,
"pcm_receive_underruns": 0,
"cpu_error": null,
"dsp_error": null
},
"answer": {
"connect_result": "CONNECT 64000/ARQ/x2/LAPM",
"sent_records": 340,
"received_records": 340,
"sent_bytes": 180540,
"received_bytes": 180540,
"last_receive_seconds_after_connect": 180.1,
"maximum_receive_gap_seconds": 4.6,
"active_bearer_seconds_after_connect": 375.5,
"corruption_events": 0,
"partial_bytes": 0,
"uart_output_dropped": 0,
"uart_overruns": 0,
"pcm_receive_underruns": 0,
"cpu_error": null,
"dsp_error": null
}
},
"scope": "Digital symmetric x2; one outstanding ASCII record per direction. No full-rate saturation or analogue interoperability claim. Traffic stops after 180 seconds; carrier survives the subsequent idle tail."
}
@@ -0,0 +1,135 @@
# Quad / I-modem x2 role decompilation
The server-to-server explanation is consistent with the recovered code:
the I-modem can change its advertised role while both tested paths still
arm marker receivers. A client-side marker sender has not been identified
on that path. No working x2/V.34 digital pair is established.
## Actual Ie030002 S58 builder
S58 is at supervisor `2600:d1b5`. The original instructions at
`b27fd..b2833`, after the common V.34 capability builder, reduce to:
```c
word = (v34_capability & 0xf9ff) | 0x1800;
if (s58 & 0x04) word |= 0x0200; // A-law
if (s58 & 0x10) word |= 0x0400; // constellation option
if (s58 & 0x02) word &= ~0x1000; // disable advertised server capability
if (s58 & 0x08) word &= ~0x0800; // disable advertised symmetric capability
send_to_dsp(0x70, word);
```
The earlier eligibility routine checks x2-disable bit `01`; the later
V.90 eligibility routine checks bit `20`. Neither unnamed upper S58 bit
changes this role word. The bounded original-instruction test exercises
all 256 S58 values with common V.34 input `21ff`:
| S58 | Tag 70 | Requested availability |
| --- | --- | --- |
| 48 | `3dff` | server + symmetric |
| 50 | `2dff` | symmetric; server disabled |
| 56 | `35ff` | server; symmetric disabled |
| 58 | `25ff` | server + symmetric disabled; constellation option set |
| 42 | `21ff` | server + symmetric disabled; constellation option clear |
This confirms that S58=58 was already clearing the two relevant advertised
capabilities. S58=42 is the corresponding lower-power control.
`s58-builder.asm` is the original supervisor code. The actual Ie030002
resident host-command table starts at **88d5**, not the older IM020104
882b table: its tag 70 entry is **926d**. `tag70-handler.asm` shows that
handler masking/storing the capability word in **ffdc** and updating
companding/reversal state; it does not directly select a client datapump.
## Why advertisement does not settle implementation
The original INFO0 gate at `9596..95ef` tests peer 3200/high capability,
the two symmetric bits, and XOR of the CME role bits. Eight native
contexts (four peer configurations, both call-role values) produce:
| Local / remote INFO0 roles | Branch |
| --- | --- |
| client / server | `95ca`, asymmetric receiver setup |
| server / client | `95ca`, the same setup |
| server / server | `965c`, drop x2 |
| both symmetric | `958f`, symmetric setup |
After `95ca`, **95e3/95e4 arms the seven-bit INFO receiver**, via `93de`.
There is no branch on which side has CME set in this continuation. Quad's
corresponding server continuation arms its seven-bit receiver at
`9790/9791`. This explains why clearing a capability bit alone is not proof
of a complete client implementation. It is consistent with both digital
datapumps awaiting a client marker in the live control; it does not prove
that every possible client-side path elsewhere in the image is absent.
### Scheduled receiver and fallback boundary, 19 October continuation
The original instructions have now been executed past that gate for both
INFO0 orientations and both originate/answer roles. `8cbb` is a scheduler
yield: it POPs the CALL return address into callback cell `006d` and returns
to the outer caller. First it installs `95dd` (delay 96 for originate, zero
for answer). The next callback installs tone generator `9e9e`, seven-bit
receiver length `0322=7`, buffer `0324=f6a8`, then yields to `95ed`.
Neither setup changes transmit-script cell `03cb`. Classifier `039f`
remains set at this boundary. `asymmetric_setup_cases` records four native
executions, with a sentinel identifying any transmit-script replacement.
The wait callback calls `96be`. That routine compares counter `031a` with
`bb80` (48000). Until the counter exceeds that threshold it POPs return
address `95ef`, adds two, and branches to `95f1`, skipping the two-word
fallback branch. Above the threshold it returns normally to `95ef`, which
branches to recovery `92e2`. `asymmetric_wait_cases` executes the original
instructions on both sides of that boundary, including equality.
Linear disassembly that treats `8cbb` or `96be` as normal returning
functions gives an incorrect immediate-fallback interpretation.
The fresh actual Quad/I-modem call in
`../quad-imodem-classifier-trace-20261019` records classifier transitions
`0042 -> 1442 -> 1462 -> 0062`. It enters the INFO0 gate with `1462`, then
clears the x2 bits through APL at `92ef` (trace PC `92f0`, its second word).
Both ends connect at 33600/V34/LAPM and exchange both markers; the strict
x2 assertion fails. This establishes successful initial classification
followed by the original recovery path, rather than an initial classifier
failure. `classifier-analysis.json` retains the exact DSP instruction
indices and the source trace location.
This further supports a missing client sender on the selected path; it
does not justify patching the fallback gate, classifier bits, or received
marker. The analog Courier supplies a working sender, but it is not the
requested I-modem. A complete digital client implementation is still not
established.
## Live register controls
`live-controls.json` retains both actual tests:
| I-modem S58 / Quad S76 | Result |
| --- | --- |
| 58 / 133 | Both 33600/V34/LAPM; both payloads intact; x2 rejected |
| 42 / 5 | Same fallback and payload result; x2 rejected |
| 56 / 134 | Reverse roles: both 33600/V34/LAPM; both payloads intact; no Quad tag 70 |
The first two have Quad x2 status `8954=00`, `895f=013f`. The original live reports
and DSP snapshots remain in their linked capture directories. The later
caller NO CARRIER occurs after the bounded Quad worker exits.
The reversed control is saved in `../quad-imodem-reversed-roles-20261019`.
Its actual digital configuration `a87e=20h` takes the original supervisor
gate `c913d..c914d`: with `(S76 & 6) == 6`, it skips the tag-70 builder,
even when S76's client-disable bit is clear. The original exchange log
confirms no tag 70 was sent. This rules out that straightforward role
reversal as a way to select a digital Quad client.
## Reproduce the decompilation checks
```sh
PYTHONPATH=. .venv/bin/python tools/decompile_imodem_roles.py \
--output /tmp/imodem-role-decomp
.venv/bin/python -m pytest -q tests/test_imodem_x2_roles.py
```
`verification.json` contains the image hash, all 256 original supervisor
executions, eight native DSP gates, four scheduled asymmetric setups and
five wait-boundary executions. The focused role,
pair-verification and analog-control selection passes **49 tests**.
These are bounded semantic checks, not a working mixed-mode digital call.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,190 @@
# Quad traffic and asymmetric x2 — 2026-10-18
**Update:** the high-rate corruption was traced to a packet-boundary PCM
sample insertion and fixed in media scheduling. The original failed captures
below remain unchanged. See [PCM slip fix and verified high-rate traffic](pcm-slip-fix/README.md).
## Asymmetric server: verified short-data control
`asymmetric-server/summary.json` passes the strict x2/data, retained-carrier,
execution-health and shared-duration checks in `tools/probe_quad_analog_pair.py`.
Original endpoint reports are `analog-result.json` and `quad-result.json`.
| Endpoint | Original CONNECT | Result |
|---|---|---|
| Analog Courier client | `52000/ARQ/x2/LAPM` | `QUAD-TO-ANALOG-731954` intact |
| Digital Quad server | `33333/ARQ/x2/LAPM` | `ANALOG-TO-QUAD-482619` intact |
Both stop at line frame 3000, 20 ms per frame: 60 seconds **including startup
and training**, not a 60-second connected soak. Both remain online, with no
CPU/DSP errors. Quad PCM underruns/UART overruns and the analog connected
receive-underrun counter are zero. The analog aggregate codec counter retains
149 startup empty frames; these are not erased or mislabeled as connected loss.
QF selects `8954=01`, and its original DSP status changes `895f=0007 -> 00ff`.
```sh
PYTHONPATH=. .venv/bin/python tools/probe_quad_analog_pair.py \
--check-x2 --output /tmp/quad-asymmetric
```
The server uses genuine chassis feature provisioning `01f2=20`, acknowledged
AT configuration `Q0V1&A3&B0S76=133S81=32`, and chassis answer after an actual
analog caller rings. The analog client uses the captured 403 ROM with
`ATX1S27=1S58=48&M5&K0DT5551234`. The media adapter reuses the existing
calibrated exchange codec and line levels, with one 20-ms transit reserve.
No modem flags, payloads, firmware instructions or receive callbacks are forced.
`digital-role-controls/` preserves failed forced-asymmetric Quad/I-modem
controls at 100 and 20 ms. Both retain `895f=013f` and fail x2/data checks.
The changed delay alone is not the fix. Vendor documentation names both as
server-family products and explicitly states the Quad does not support client
mode. The successful asymmetric test uses a real analog client; symmetric
x2 remains the proper working control for the two digital endpoints.
This is short ASCII data evidence, not sustained asymmetric throughput,
binary interoperability, or an implemented Quad client personality.
## Original sustained V.34 failure (before the PCM fix)
`v34-stall/summary.json` is deliberately **not** a passing traffic report.
The 30-second diagnostic uses 64-character bodies in 83-byte numbered
records. The 180-second attempt with 16-character bodies reproduces a stall
as well, so the default-rate multi-minute acceptance target remains unmet. The probe
fails early after five bearer seconds without a complete receive record.
The lower-rate 180-second control below does pass.
```sh
PYTHONPATH=. .venv/bin/python tools/probe_quad_pair.py \
--traffic-seconds 180 --traffic-size 64 --trace-data-lanes \
--check-connect --output /tmp/quad-soak
```
The saved 64-character control has genuine 31200/33600 V.34 CONNECT results,
retained Quad carrier, zero PCM underruns, zero UART overruns, and no CPU/DSP
errors. Nevertheless Quad receives only four complete caller records (332
bytes), and the caller receives three complete Quad records plus an 11-byte
prefix (260 bytes). UART reception remains enabled, no unread character is
stuck, all queued Quad input is consumed, and the caller's normal `46cc` data
callback remains installed. Progress snapshots retain these observations.
The compressed `quad-data-lanes.json.gz` is the bounded raw CPU/DSP bank
capture. `hdlc.json` is offline analysis, reproducible with:
```sh
PYTHONPATH=. .venv/bin/python tools/inspect_quad_hdlc.py \
artifacts/quad-traffic-and-asymmetric-x2-20261018/v34-stall/quad-data-lanes.json.gz \
--output /tmp/quad-hdlc.json
```
After detection, the interface carries framed octets rather than raw bits:
RX `1000` terminates bytes including received FCS; TX `10f3` terminates bytes
for which the DSP supplies flags, stuffing and FCS. The inspector verifies
279 received FCS values. It does **not** pretend to verify a TX FCS that the
host capture does not contain.
The Quad emits 275 single-character I-frames. The caller stops advancing at
N(R)=4 after sequence wrap, leaving 15 outstanding frames N(S)=4..18. RR
poll/response traffic continues. This explains the full LAPM transmit window;
it does not by itself identify why the caller ceased acknowledging. The strict
checker correctly rejects the run despite CONNECT and some intact data.
The second capture additionally records the caller's DSP output. Its Quad
bank capture is byte-identical to the first (SHA-256
`97f84e079efd872c352f9d91297378da9fb25d1204f9ce6f0359b9136ef3c5c3`).
`imodem-data-lanes.json.gz` and `imodem-hdlc.json` show **273 FCS-valid frames
(260 I, 13 RR), then corrupted frames beginning at media frame 250**. This is
already present in the caller DSP's host output, before its supervisor LAPM
receive processing. No DTE handoff reset or new DSP mode command explains the
transition. Next investigate the high-rate V.34 signal/receive path, not an
injected LAPM acknowledgement.
The I-modem uses `ff00`, rather than Quad `1000`, as its framed-RX delimiter:
```sh
PYTHONPATH=. .venv/bin/python tools/inspect_quad_hdlc.py \
artifacts/quad-traffic-and-asymmetric-x2-20261018/v34-stall/imodem-data-lanes.json.gz \
--rx-delimiter 0xff00 --output /tmp/imodem-hdlc.json
```
## Three-minute lower-rate traffic control
`v34-9600/180s-verification.json` passes the full **180 connected seconds**
at 9600/V.34/LAPM. Both original terminals report 9600/ARQ; the caller also
prints V34/LAPM. In-window receive counts are 70 records at the caller and
71 at Quad. After the real short drain, both receive **71 complete records
(5893 bytes) each**, with a 59-byte prefix of the next Quad record still in
flight at the caller. There are no corrupt records, UART losses, PCM
underruns or CPU/DSP errors. Maximum receive gaps are 4.1 and 2.9 seconds.
These are deliberately paced records, not a negotiated-rate throughput test.
```sh
PYTHONPATH=. .venv/bin/python tools/probe_quad_pair.py \
--settings 'S54=0S58=43&M5&K0&N6' \
--traffic-seconds 180 --traffic-size 64 --quad-dsp-slice-cycles 512 \
--check-connect --output /tmp/quad-9600-soak
```
The 512-cycle optional runtime batch preserves cycle debt and PCM sample
yields; boot/download windows keep their existing 64-cycle batches. The
30-second control below uses the original 64-cycle runtime batches.
### Corrected end-of-window accounting
The initial checker incorrectly compared counts from two different window
ends: caller CONNECT was at frame 155, Quad at frame 170. Thus their 180-second
snapshots end at frames 1955 and 1970. Comparing Quad's 72 queued records
against the caller's earlier snapshot of 70 falsely called two records lost.
The full, untruncated caller UART capture actually contains 71 complete records
and a valid prefix of record 72; only one record is in flight. No bytes or
snapshots have been changed to produce that result.
`180s-initial-summary.json` deliberately preserves that initial false
rejection. `180s-imodem.json` and `180s-quad.json` are the original worker
reports, not rewritten results. The corrected verifier checks timing and
health from the original window snapshots, and record conservation against
the actual UART drain. Future workers stream this drain directly; for these
historical reports it replays the full captured UART output offline. The
same one-final-in-flight rule still applies; missing records, corrupt
prefixes and truncated captures have rejection regressions.
Recheck without running or modifying either modem:
```sh
PYTHONPATH=. .venv/bin/python tools/quad_traffic.py \
artifacts/quad-traffic-and-asymmetric-x2-20261018/v34-9600/180s-imodem.json \
artifacts/quad-traffic-and-asymmetric-x2-20261018/v34-9600/180s-quad.json \
--output /tmp/quad-180s-verification.json
```
### Live streamed-drain regression
`10s-streamed-drain-summary.json` is a fresh successful run of the corrected
worker/checker path, not an offline reclassification. Both modems negotiate
9600, both complete the ten-second window, and streamed UART drain accounting
verifies 29 records at the caller and 28 at Quad, with no partial records or
corruption left in either parser. This uses 16-character bodies, runtime
slice 512 and online byte spacing 10000. The original reports are saved
beside the summary. It validates the new drain path and configurable online
pacing; the three-minute stability evidence above uses the original slower
100000-instruction online spacing.
### Original 30-second control
`v34-9600/30s-summary.json` passes 30 connected seconds at **9600/V.34/LAPM**,
selected by the original caller AT setting `&N6`. Quad receives 12 intact
records (996 bytes); the caller receives 11 (913 bytes), with one final
in-flight record allowed. Both retain carrier, no record corruption occurs,
and UART/PCM/CPU/DSP health checks pass. This is a deliberately paced traffic
test, not a 9600-bps application-throughput measurement.
```sh
PYTHONPATH=. .venv/bin/python tools/probe_quad_pair.py \
--settings 'S54=0S58=43&M5&K0&N6' \
--traffic-seconds 30 --traffic-size 64 --check-connect \
--output /tmp/quad-9600-control
```
Before the PCM scheduling fix, increasing online host pacing tenfold
(`--quad-online-byte-interval 10000`) delivered more data but still stalled.
Pacing alone was not the fix; the corrected 60-second high-rate control is
archived under [pcm-slip-fix](pcm-slip-fix/README.md).
@@ -0,0 +1,29 @@
{
"topology": "digital Quad server / analog Courier client",
"frame_ms": 20,
"analog_connect": "CONNECT 52000/ARQ/x2/LAPM",
"quad_connect": "CONNECT 33333/ARQ/x2/LAPM",
"analog_terminal": "\r\nCONNECT 52000/ARQ/x2/LAPM\r\nQUAD-TO-ANALOG-731954",
"quad_terminal": "\r\nOK\r\n\r\nCONNECT 33333/ARQ/x2/LAPM\r\nANALOG-TO-QUAD-482619",
"quad_x2_status": {
"8838": 239,
"8954": 1,
"895f": 255,
"9f56": 2,
"89b2": 0,
"a889": 8,
"a8a2": 0,
"a8a3": 0
},
"payload_checks": {
"analog_to_quad": true,
"quad_to_analog": true
},
"x2_data_verified": true,
"verification_failure": null,
"line_frames_requested": 3000,
"line_frames": {
"analog": 3000,
"quad": 3000
}
}
@@ -0,0 +1,156 @@
# High-rate V.34 PCM slip: cause and correction
## Before: one inserted sample, not a DSP receive arithmetic defect
`before-*-pcm.json.gz` contain the read/write traces of the DSP PCM rings
between requested snapshots at media frames 230 and 270. Each bounded trace
retains its latest 200,000 accesses, including the corruption boundary.
`before-*-snapshots.json` record live CPU/serial/codec registers.
`before-quad-tx.g711.gz` retains the native transmitter output: all 28,572
captured Quad TX-ring samples match it, ruling out a transmitter-side slip.
Both rings have correct read/write ordering, with no stale TX reads or
unconsumed RX samples overwritten. Comparing transmitted and received octets
instead reveals:
* **Quad → I-modem:** one extra **`ff`** at received sample 6225 in the retained
trace, equivalent to offset **198750** in Quad's complete `tx.g711`. All
22,223 actual source samples in the overlapping capture remain in order.
* **I-modem → Quad:** all **20,972** overlapping samples match exactly.
* The caller's AM79C30 records an RX underrun at bearer frame **199200**;
its C5x receive-FIFO underrun counter remains zero. The MUX inserted silence,
shifting the waveform by one sample and corrupting subsequent HDLC frames.
The later underrun at 240001 is after peer shutdown, not the original fault.
Reproduce the analysis without executing firmware:
```sh
PYTHONPATH=. .venv/bin/python tools/inspect_quad_pcm_ring.py \
artifacts/quad-traffic-and-asymmetric-x2-20261018/pcm-slip-fix/before-quad-pcm.json.gz \
--peer-trace artifacts/quad-traffic-and-asymmetric-x2-20261018/pcm-slip-fix/before-imodem-pcm.json.gz
```
The expected report has `transport.quad_to_imodem.ok: false` and one `insert`.
`before-analysis.json` also records the uncompressed trace SHA-256 hashes.
The original `v34-stall/` captures have not been changed.
## Correction
`G711Peer.requires_frame_service` requests per-PCM-frame media servicing from
`IsdnMachine`, even for offline calls. Completed output blocks reach the
synchronous peer and its replies reach the MUX before the next RX clock;
waiting until the next supervisor timer poll could empty the receive queue
at a packet boundary. This fixes the scheduling error rather than adding
receive padding, changing DSP clocks, forcing carrier or modifying guest
callbacks, payloads or LAPM acknowledgements.
Traffic health now checks AM79C30 bearer underruns as well as the C5x FIFO.
`tests/test_g711_peer_pacing.py` reproduces the original insertion with
poll-only service and verifies continuous sample identity with per-frame
service, using both Python and native bearer queues.
Separately, the investigation corrected interrupt-shadow handling of XF and
RETI's INTM preservation against TI SPRU056D. Focused tests cover the pin and interrupt mask.
Those corrections alone did **not** fix the corruption: their Quad waveform
and both DSP host traces were byte-identical to the original failing run.
## After: default-rate 30-second connected control
`30s-summary.json` passes genuine CONNECT and numbered duplex traffic checks:
* Caller **31200/ARQ/V34/LAPM**, Quad **33600/ARQ**; no rate cap.
* Both complete **30 connected seconds** with retained carrier.
* **12 complete records / 996 bytes** drained in each direction, no parser
errors, UART loss, native FIFO underruns or AM79C30 MUX underruns.
* Default 64-cycle DSP service and 100000-instruction online byte spacing.
This is a paced stability control, not a full-rate application-throughput
benchmark. The archived endpoint reports retain independent measured windows
and actual UART-drain accounting.
```sh
PYTHONPATH=. .venv/bin/python tools/probe_quad_pair.py \
--traffic-seconds 30 --traffic-size 64 --trace-data-lanes --check-connect \
--output /tmp/quad-v34-pcm-fixed
PYTHONPATH=. .venv/bin/python tools/quad_traffic.py \
artifacts/quad-traffic-and-asymmetric-x2-20261018/pcm-slip-fix/30s-imodem.json \
artifacts/quad-traffic-and-asymmetric-x2-20261018/pcm-slip-fix/30s-quad.json
```
## After: faster 60-second connected control
`60s-summary.json` and `60s-replay.json` pass **60 connected seconds** on both
endpoints at the same uncapped 31200/33600 rates. With 256-character bodies,
10000-instruction online spacing and 512-cycle runtime batches:
* **53 intact records / 14575 bytes** arrive at the caller and **52 / 14300**
at Quad, matching the actual far-end sends after UART drain.
* Both retain carrier; there are no parser errors, UART losses, CPU/DSP errors,
MUX underruns or native FIFO underruns. MUX health is explicitly included
in the measured snapshot, not inferred from the C5x FIFO counter.
* Maximum receive gaps are 3.0/1.7 seconds, including initial latency.
```sh
PYTHONPATH=. .venv/bin/python tools/probe_quad_pair.py \
--traffic-seconds 60 --traffic-size 256 --quad-online-byte-interval 10000 \
--quad-dsp-slice-cycles 512 --trace-data-lanes --check-connect \
--output /tmp/quad-v34-pcm-fixed-60s
PYTHONPATH=. .venv/bin/python tools/quad_traffic.py \
artifacts/quad-traffic-and-asymmetric-x2-20261018/pcm-slip-fix/60s-imodem.json \
artifacts/quad-traffic-and-asymmetric-x2-20261018/pcm-slip-fix/60s-quad.json
```
This is roughly 240 application bytes/s, still not line-rate throughput or a
three-minute high-rate soak.
## After: 20-ms packet control
The original 20-ms-frame long-marker control failed to connect at the caller.
`20ms-summary.json` now passes with **33600/ARQ at both ends** and both full
**630-byte** distinct marker strings intact. The wire runs for 2325 frames
(46.5 seconds including training). The I-modem's first MUX underrun is at
frame 372000, exactly after the peer closes (2325 × 160 samples); the later
post-shutdown silence is not a connected traffic-window claim.
```sh
COURIER_LINE_FRAME_MS=20 PYTHONPATH=. .venv/bin/python tools/probe_quad_pair.py \
--quad-instructions 160000000 --imodem-instructions 1000000000 \
--quad-dsp-slice-cycles 512 \
--imodem-send "$(printf 'I%03dabcde' {1..70})" \
--quad-send "$(printf 'Q%03dzyxwv' {1..70})" \
--check-data --output /tmp/quad-v34-pcm-fixed-20ms
```
## Asymmetric x2 regression control
`asymmetric-summary.json` passes the unchanged strict analog-client control:
**52000/ARQ/x2/LAPM** at the analog Courier and **33333/ARQ/x2/LAPM** at
Quad, both distinct payloads intact, both retaining carrier at the shared
3000 × 20-ms-frame boundary. This is 60 seconds including training, not a
connected x2 soak. Endpoint reports are `asymmetric-analog.json` and
`asymmetric-quad.json`.
The final targeted DSP/Quad/media regression suite passes **369 tests**.
## Revalidation — 2026-10-19
Replaying the original caller host capture again finds 273 valid frames
before the first bad FCS at media frame 250. Replaying the PCM traces finds
exactly one inserted `ff` toward the caller (22,223 source samples matched),
and no reverse-direction slip (20,972 samples matched). The archived
60-connected-second high-rate reports still pass the current traffic verifier.
The pacing regression now exercises the actual `G711Peer` default, rather
than setting its frame-service flag explicitly in the positive control.
It covers 160- and 800-octet production packets as well as the four-octet
minimal reproduction, with both Python and native bearer queues. Each case
crosses three packet boundaries in one offline DSP catch-up pass. The
poll-only negative control still inserts idle while the native C5x FIFO
underrun counter stays zero; the default path preserves every sample.
Pacing, packet sizing and PCM inspection tests pass **22 tests**; the broader
targeted media, native-port, handoff and traffic selection passes **101 tests**.
This revalidation uses saved firmware captures and a fresh deterministic
scheduler probe, without claiming a new live firmware soak.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,60 @@
# Working Quad / I-modem V.34 LAPM data
Original QF060003 supervisor and C51 answering an original Ie030002 I-modem
across a byte-exact PCMU B-channel. The controller loads the Quad firmware;
chassis requests arm/configure/answer through the real mailbox. No carrier,
LAPM completion, DSP program, receive callback, or received bytes are injected.
The explicit Quad byte-terminal adapter substitutes for raw-pin autobaud and
feeds online DTE bytes into the original UART handler without patching it.
```sh
PYTHONPATH=. .venv/bin/python tools/probe_quad_pair.py \
--quad-instructions 100000000 --imodem-instructions 500000000 \
--trace-dsp --post-call-diagnostics \
--imodem-send IMODEM-TO-QUAD-482619 \
--quad-send QUAD-TO-IMODEM-731954 \
--check-data --output artifacts/quad-v34-lapm-online-handoff
```
## Result
- I-modem: `CONNECT 31200/ARQ/V34/LAPM`.
- Quad: `CONNECT 33600/ARQ`.
- Both distinct 21-character payloads arrive intact at the opposite terminal.
- `summary.json`: `data_verified=true`, both payload checks true.
- Neither CPU/DSP reports an error. Both PCM receive-underrun counters are zero.
- No host UART overruns or I-modem host-output drops.
- Quad remains connected at its 100M-instruction limit (`8311=04`).
- After the Quad process closes its socket, the I-modem reports NO CARRIER.
Its original ATI6 identifies **Loss of Carrier**, not Keypress Abort,
and reports 21 characters sent/received, zero lost, zero retransmitted
blocks, retrains, link timeouts or link NAKs. It also retains **86 blers**;
this is not a demonstrated error-free line or throughput soak.
## Two fixes
1. **Operating-mode wire enum:** chassis parameter `003f=2` selects firmware
mode 4 (normal/error control). The previous value 4 selected firmware mode
6 and left the receive callback at the no-op `cfdb:3210`. Both probes now
default to wire value 2; the original firmware performs the conversion.
2. **DTE handoff:** seeing CONNECT is not yet permission to send data in this
firmware. At instruction 112,719,872 / bearer frame 154 the caller's
receiver is `ec8d`, callback `0e0e` (abort on keypress). At instruction
112,720,384, still frame 154, the original firmware selects receiver
`eca9`, callback `46cc`, which stores terminal characters in its data queue.
The harness now waits for that read-only readiness indication, rather than
sending into the abort handler or imposing an arbitrary five-second delay.
`imodem.json` retains this transition in `terminal_handoff`. The preceding
immediate-send failure's ATI6 reports **Keypress Abort** with zero characters
sent (`../quad-v34-lapm-disconnect-diagnostics/`). A five-second delayed
control and a fixed-9600 control also deliver both payloads, but neither delay
nor a rate restriction is required by this passing run.
## Scope
This verifies short bidirectional ASCII data over digital V.34/LAPM, not x2,
full-rate application throughput, multi-minute Quad traffic, binary DTE
framing, raw-pin autobaud, or the physical card's unspecified DRR upper-byte
behavior. ATI6 reports speed 31200/33600; neither result should be advertised
as symmetric 33600 throughput.
File diff suppressed because it is too large. Load diff
Loaded 100 of 430 files, more files were not shown because too many files have changed in this diff. Show more