mirror of
https://github.com/D-Modem/courier-emu.git
synced 2026-11-28 20:38:07 -08:00
Type into a connected session: 7E1 CONNECT, and the data-mode receiver
Nothing typed after CONNECT ever reached the firmware, so the &T1 loopback could not be exercised at all. Two faults in the DTE path, one behind the other. The data-mode boundary was never detected. This DTE runs 7E1, so the result code comes out as `8d 0a c3 cf 4e 4e c5 c3 d4 8d 0a` - CONNECT with an even-parity bit in the eighth - and matching raw bytes against b"CONNECT" missed it, because only the characters whose parity is even survive the comparison. online_mode stayed False for the rest of a connected run. Compare the seven data bits instead. The receive gate then held the queue shut. Past CONNECT the command parser is not in the path: the firmware installs its data-mode receiver in the same callback cell, 4502 on this ROM, and the whitelist of command_idle / command_collecting read that as "parser busy, discard" - the state the gate exists to wait out between a command and its result. In data mode there is no command to wait for, so let the byte through. With both, `AT&N1&T1` followed by HELLO delivers all five bytes: the trace shows rom-rx 48/45/4c/4c/4f against the data-mode callbacks and serial_input_remaining reaches 0, where it stuck at 5 before. Nothing comes back yet. There is no echo on the DTE, and the transmitted line signal is identical with and without the typed bytes - line_tx_nonzero 203675 either way - so the firmware accepts the characters but they do not reach the modulator. The receive side is unchanged: rx_consumed 0. No regressions: the AT&N1&T1 report is identical field for field, CONNECT included, except online_mode now reads True; a linked 302 pair is unchanged on both sides. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2858e52d40
commit
32faa8eb3b
1 file changed
+14
-1
+14
-1
@@ -751,7 +751,14 @@ class CourierMachine:
|
||||
self.serial_truncated = True
|
||||
# CONNECT is the DTE boundary: subsequent bytes are payload, not AT
|
||||
# commands. The firmware still owns the transition unless forced.
|
||||
if not self.online_mode and b"CONNECT" in bytes(self.serial[-10:]).upper():
|
||||
#
|
||||
# Compare the seven data bits. This DTE runs 7E1, so the result code
|
||||
# arrives as `c3 cf 4e 4e c5 c3 d4` - CONNECT with an even-parity bit
|
||||
# in the eighth - and matching raw bytes missed it on every character
|
||||
# whose parity happened to be odd. The run stayed in command mode for
|
||||
# ever after its own CONNECT.
|
||||
recent = bytes(byte & 0x7F for byte in self.serial[-10:])
|
||||
if not self.online_mode and b"CONNECT" in recent.upper():
|
||||
self.online_mode = True
|
||||
self.serial_trace.append("entered-data-mode")
|
||||
if self.console is not None:
|
||||
@@ -1691,6 +1698,12 @@ class CourierMachine:
|
||||
and (
|
||||
not self._rom_dte_opened
|
||||
or self.uart.holding
|
||||
# Past CONNECT the command parser is not in the path at
|
||||
# all: the firmware has installed its data-mode
|
||||
# receiver in the same cell (4502 on this ROM), which
|
||||
# this test read as "still busy" and never typed
|
||||
# another character into a connected session.
|
||||
or self.online_mode
|
||||
# Let the parser finish its command/result before
|
||||
# starting the next queued byte. Its busy RX handler
|
||||
# deliberately discards input during this interval.
|
||||
|
||||
Reference in new issue
Block a user