Commit Graph
58 Commits
Author SHA1 Message Date
Claude d86e24bbca Tests: each run's logs in its own folder, a file for each test
build/test-runs/<date_time>/<module>-<task>/<class>/<test>.log: what
each test printed, as it printed it, and a failure's stack trace (the
root build's listener on every test task, the JVM's and Kotlin/Native's).
A task's folder goes when nothing in it failed, the run's when empty;
the build names a folder it keeps.

The line tools' logs (peer_host, codec_line's filter, fax_line,
t30_line, sip_fax_line), the class 1 and peer line logs, and the
transfer traces into the test's log (TestLogs) instead of /tmp or one
build/ file each run overwrote; peer_host's speaker recording (read by
nothing) gone. The README says where to look.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 21:13:21 +00:00
Claude 5f9cce10f1 Tests: shorter calls on the test lines, less needless work
- native-test's line tools (fax_line, codec_line, t30_line) at
  LINE_SPEED times the sample clock (line_speed.h); the fax tests ask
  for 2x (DMODEM_LINE_SPEED, 1 a phone line's pace): 4x leaves the DTE
  a quarter second for what class 1 times in a second, too tight on a
  busy machine
- t30_line's first page some 70 KB in MH, not 220 KB (still two ECM
  blocks)
- the Kermit and lrzsz interop tests' byte traces only when asked
  (KERMIT_TRACE, TRANSFER_TRACE): a file opened for each chunk; Kermit's
  big file 64 KB
- two test JVMs at once

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 21:05:23 +00:00
Claude 7642aaa59f Shared io: background() on threads as many as the work, not I/O's 64
Blocking reads held on coroutines' I/O dispatcher (64 threads at most)
could leave the next background job waiting for a thread that never
came free: PeerLoopbackTest's PIN call hung in the full suite, after the
other tests' readers. The peer line, PPP and the transfers each hold a
few such threads in the app too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 19:31:55 +00:00
Claude 58de26df2e Fax: over T.38 end to end; none on mobile calls
T.38 tested end to end (SipFaxTest): the app's engine dialling dmodemd,
which asks for T.38 a second after it answers, before its CED; the
engine's call progress then waited for a CED that never came on audio.
D-Modem-RE's claude/t38-caller (the submodule here) takes T.38 on a fax
call still waiting for its answer tone as the answer. With ECM and
without, and on audio with T.38 off.

Fax through a mobile call's speech codec doesn't train even at 2400
bit/s (CellFaxTest: AMR-NB 12.2, about a bit in sixteen wrong), so the
app turns fax down on the mobile-call line with why.

The interop test receiving without ECM from D-Modem-RE's T.30 at 12000:
at 14400 a page's row of 1-pel runs comes spoilt the same way each time
on a clean line, before our T.30 (D-Modem-RE's DSP; ECM hides it).
sip_fax_line waits for its dmodemd to end; the README's fax section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 19:30:16 +00:00
Claude 97a816ee45 Fax tests: against D-Modem-RE's own T.30, and over SIP with T.38
native-test's t30_line: a class 1 modem on a line to dsp/t30.cpp's fax
machine (ECM or not, noise if asked); sip_fax_line: the app's engine
dialling a dmodemd over loopback SIP with T.38, each DTE a pty. The
tests (T30InteropTest, SipFaxTest) drive our T.30 on them, skipped
without the programs; FaxLineProcess and Pbm shared among the fax tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 18:48:49 +00:00
Claude b534be0dbc Fax: error correction mode (T.30 Annex A), sending and receiving
ECM when both machines have it (DIS/DCS bits 24 and 27): the page in
blocks of up to 256 FCD frames of 256 octets on the fast modulation,
RCP three times, then PPS; the receiver's MCF, or PPR with a map of the
frames that didn't come, sent again; after four PPRs CTC at a rate lower
(with the long training), after three CTCs EOR; RR for RNR; a PPS again
for an MCF lost. A class 1 modem carries ECM's HDLC as bits, so the
framing is ours (EcmHdlc: flags, zero stuffing, FCS-16).

A setting (on by default); FaxProgress.ecm. Tests: common Kotlin on
two class 1 modems in memory that spoil what they're told (PPR, CTC,
EOR, no ECM); the real modems with and without ECM; efax (no ECM) still.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 18:30:42 +00:00
Claude 7b60aedd9d Phone-to-phone line: an optional PIN, as a challenge and response
With a PIN set, the phone called answers RING with CHALLENGE <nonce>
(16 random octets), the caller AUTH <md5("DMODEM/1:" nonce ":" PIN)>:
the PIN never goes on the connection. A wrong PIN (or none) gets DENIED
before the phone rings, the caller's modem NO CARRIER (FAILED 403), and
each failure in a row a longer wait (1 s doubling, up to a minute) before
the next PIN is checked. Mobile calls have none of it.

The setting in the Wi-Fi and Bluetooth line's fields; secureRandomBytes
in the shared io (SecureRandom, /dev/urandom natively); tests in common
Kotlin and with the real modems (peer_host).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 18:13:13 +00:00
Claude 8e85d1a465 Shared Kotlin: the line to another phone (PeerLine), the fax test page
PeerLine moves to shared/'s common Kotlin: its connections (Duplex) on
Source and Sink, its threads coroutines' I/O threads (background()), a
latch, atomicfu's locks and atomics; the transports (TCP, Bluetooth, the
mobile call) and the native modem's line stay the app's, on the same
interface.

The fax test page (a frame, bars, dashes, a checkerboard) is shared code
(FaxTestPage): the app's fax tests and T4Test both have it. (The fax
move left the app's fax tests without it: they compile again.)

PeerLoopbackTest (common: the JVM and native): two phones' lines in
memory, each modem answering every sample with its own; the call rung,
answered and heard both ways after the exchange's tones, a third phone
busy, the hang-up. The app's tests on two real modems pass on the shared
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 15:16:15 +00:00
Claude 0fba297f3c Shared Kotlin: fax (T.4's MH, T.30, class 1, the PDF of the pages)
T4, T30, Class1 and FaxPdf move to shared/'s common Kotlin (the PDF
written to a Sink); the documents' rendering (Android's PdfRenderer) and
the fax manager stay the app's. T4Test in common Kotlin: the JVM and
native. The app's fax tests pass on the shared code, efax's calls over
two modems among them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 15:02:04 +00:00
Claude 9387f5eb21 Shared Kotlin: PPP (HDLC, LCP/PAP/CHAP/IPCP, client and server), IP packets, the chat scripts
Hdlc, Ip, Ppp and ChatScript move to shared/'s common Kotlin; the NAT
(its sockets) and Android's VPN stay the app's. What they needed of the
JVM, common: an IPv4 address (Inet4: on the JVM java.net.Inet4Address
itself, the app's code as it was), MD5 for CHAP, a timer (coroutines, one
piece at a time, as the scheduled executor), atomicfu's synchronized.

PppLoopbackTest (common: the JVM and native): a client and a server in
memory, the link up, the address and DNS given, IP both ways, the
hang-up; MD5 against RFC 1321's vectors. The app's PPP tests (the ISP,
the chat scripts, the internet line over two modems, the phone as an
ISP) pass on the shared code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 14:54:05 +00:00
Claude 65be65b015 Shared Kotlin: the file transfers (X/Y/ZMODEM, Kermit) and the I/O they're on
shared/'s io: what the shared code needs of I/O the same on the JVM and
iOS: Source and Sink (the JVM's streams through asSource()/asSink()), a
byte buffer, a queue of bytes read with a timeout (on coroutines'
channels), IOException (java.io's own on the JVM), the monotonic clock,
a sleep, the local time zone's offset.

The transfers move there (TransferIo, X/Y/ZMODEM, Kermit, the CRCs, the
files' Outgoing and Incoming); a folder of received files and a JVM file
to send stay the JVM's (FolderIncoming, Outgoing.of). Kermit's dates by
arithmetic (civil from days and back) in the local zone.

TransferLoopbackTest (common: the JVM and native): each protocol both
ways in memory, the files and their dates as sent. It found Kermit's
dates read wrong when they came as yyyymmdd (the 6-digit form matched
first): the 8-digit form first now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 14:48:27 +00:00
Claude 74a9c84cfc Kotlin Multiplatform: shared/, what the Android and iOS apps share, starting with the terminal's emulator
The terminal's VT/xterm emulator, its screen, Sixel, the character sets,
the keys, the characters' widths and the themes move to shared/'s common
Kotlin (the same package: the app's code as it was), their JVM-only calls
in common Kotlin's ways (code points, ISO 8859-1, copyInto, Base64.Mime).
The Android app has its JVM side; iOS its framework, DModemShared (iOS
devices, simulator); Linux native runs the common tests too.

TerminalEmulatorTest in common Kotlin (kotlin.test): on the JVM and
native; XtermFeaturesTest on the JVM. CI: the shared tests on Linux
(JVM, native) and on an iOS simulator (apple.yml).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 13:57:05 +00:00
Claude fd3e12243d Toward iOS: the engine's C API, an XCFramework build for Apple's systems, its Swift tests
The engine for a program in C or Swift (dmodem_engine.h): started on SIP
or a peer line, its DTE a socket, the log, status, exit, peer line and
speaker as callbacks; native-test's c_api_test drives it (AT commands, a
dial handing the program its line, BUSY, the end).

ios/build-native.sh builds the engine with D-Modem-RE, libre and Mbed
TLS for iOS (devices, simulator) and macOS into DModemEngine.xcframework;
ios/DModemSmoke's Swift tests run it on macOS through the C API. CI
(apple.yml) does both on a macOS runner; android.yml's native job runs
the engine's tests with Apple's fallbacks on Linux too.

D-Modem-RE to its claude/apple-portability branch (portable.h: Apple's
ways where Linux has its own), on top of the speaker hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 13:45:11 +00:00
Claude f0e6458659 D-Modem-RE to its latest (the V.92 analogue modem's quick connect, PCM upstream, fast parameter exchange; an Intel 537EP interop peer) with the speaker hook rebased on it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 11:31:57 +00:00
Claude 7b863948f4 Cellular line: the phone's own mobile calls as the modem's line (privileged app, V.21)
The modem dials and answers on the phone's mobile line: Telecom places,
answers and ends the calls, Telephony tells their state, and Android 13's
call audio interception (CALL_AUDIO_INTERCEPTION, a privileged app's) has
their sound, on PeerLine as another transport (CellTransport): the
handshake made for the call, the exchange's tones played until it is
placed, the call's sound then.

On a rooted phone the app makes itself privileged: a Magisk module with
its APK in /system/priv-app and every privileged permission it asks for
allowed (Settings, Line).

Speech codecs decide the speed: native-test's codec_line puts AMR-NB or
GSM between two modems. AMR 12.2 carries V.21 (300 bit/s); V.22 and
V.22bis connect but lose data half the time; nothing faster connects;
GSM and AMR 4.75 carry nothing reliable. So the line starts at V.21
(+MS), with 1200 and 2400 bit/s to try.

Tests: CellTransportTest (the calls placed, answered, given up),
CellLineTest (two modems on mobile calls, clean and through AMR, on the
phones' audio clock), CellSettingsTest; the settings' screenshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 10:56:02 +00:00
Claude b91eb3d550 Modem lights: LEDs standing up on Home (the panel and the bare strip), lying down in the Terminal's compact strip
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 09:50:19 +00:00
Claude f66059c741 Modem lights: a vertical LED option (off; a mockup beside the horizontal ones: lights-vertical.png)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 09:30:40 +00:00
Claude b5d7fca041 PppHostTest: wait for the host's side of the link to come up (it may follow the computer's)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 09:10:56 +00:00
Claude 32bddae3f5 Modem speaker: hear the dialling, the answer tone and the training on the phone's speaker
As a modem's speaker had the line: on from off hook until CONNECT (ATM1,
the modem's default), all the call with ATM2, never with ATM0, at ATL's
volume; a switch in the settings silences it. The native modem passes
the line's sound (what came, its own at half level) on a socket the
app's player reads, never waiting for it; on SIP calls and on the line
to another phone.

D-Modem-RE to its latest (the V.90/V.92 analogue modem work) with
SipModem::on_speaker() on top (its branch claude/modem-speaker).

Tests: engine_test (SIP: the speaker on until CONNECT, nothing in data
mode, quiet with ATM0), PeerLineTest (the caller's speaker on a call to
another phone), ModemSpeakerTest (the player).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 08:57:09 +00:00
Claude b26dfe5028 LocalShellUiTest: scroll to Home's Shell shortcut before tapping it (the lights panel moved it down)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 08:31:28 +00:00
Claude 8608d076e3 Phone-to-phone line: two phones' modems call each other over Wi-Fi or Bluetooth
A line choice beside SIP: another phone running the app, on Wi-Fi (TCP,
found by NSD) or Bluetooth (RFCOMM). The native PeerModem hands the app
its line's samples off hook; PeerLine rings the other phone, carries the
samples both ways as they are and hangs up by closing. The loop runs on
the samples themselves (each side answers every sample, paced to the
sample clock), so nothing is lost and the phones' clocks can't drift:
the modems connect as on a perfect line (V.91, 62666 bit/s).

The calling side plays a dial tone and ringback as an exchange does, so
dialling works with X4 and S7. Busy, no answer and an unreachable phone
give BUSY, NO ANSWER and NO CARRIER.

Tests: peer_host (native-test) runs the engine on a peer line; PeerLineTest
calls between two or three of them over real TCP, through a slow and
uneven link as well. Also a missing alpha in the lights' glow colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 08:27:00 +00:00
Claude de30e1e7a9 Modem lights: the panel reads 56K V.92 Voice/Fax/Data Modem
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 07:40:58 +00:00
Claude 929b070256 Modem lights: angular rectangular LEDs, square panel; option to show them bare above Home's status
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 07:37:54 +00:00
Claude 552bfb62f7 Modem lights: the modem's state as an external 56K faxmodem's front panel
A charcoal case with a row of small red LEDs under their legends: MR
(on), TR (the DTE there), CS, AA (answering calls), CD, OH, RD and SD
flickering with the octets each way (the DTE hub counts them), ARQ/FAX
lit with error correction (LAPM/MNP in the CONNECT) and blinking in a
fax call. On Home under the status card, and a compact strip under the
terminal's bar for the modem's session. What's lit read out for
accessibility; an idle panel draws nothing new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 07:31:16 +00:00
Claude 6fd2af2002 Internet for serial computers: the phone as their dial-up ISP, no call
Bridges (TCP, Bluetooth, a USB adapter, the USB gadget) can give their
clients the internet instead of the modem: the computer dials (AT
answered OK, ATD answered CONNECT, Windows' direct cable connection's
CLIENT answered CLIENTSERVER, or PPP straight away) and gets PPP from the
phone:
- Ppp has a server role: the computer's address (10.64.64.2) and the
  DNS (the phone's, at 10.64.64.1) given; no login asked
- NatStack carries its IPv4 on the phone's own network, as slirp did:
  each TCP connection the phone's own socket (the computer's side kept
  here: handshake, sequence numbers, retransmission, window, the ends),
  UDP flows, DNS to the phone's DNS servers, pings answered when the
  host is reachable
- its DCD is its PPP link; its DTR dropped ends the link
- in that mode the bridges run in a service of their own: no modem, no
  SIP account; Settings' serial port section chooses what clients get
Tested: the computer's dialer and PPP against the host, a TCP download
through the NAT with a segment lost and resent, a refused connection
reset, UDP, DNS, a ping; and end to end on the TCP bridge (dial, PPP, a
web page, DTR dropped), the modem untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 07:25:54 +00:00
Claude afa358cecf USB serial: the modem on an adapter plugged into the phone, or on the phone's own USB port (root)
- an adapter (FTDI, CP210x, CH34x, PL2303, CDC-ACM; usb-serial-for-
  android, from JitPack for that alone) as another bridge: its speed and
  format set, its DTR out the modem's carrier (the computer's DCD on a
  null modem), the computer's DTR (its DSR) dropped hanging up; the first
  adapter found, again when one is plugged in; Android offers the app
  when one is (a device filter), its permission asked for
- with root: an ACM function added to the phone's USB gadget in
  configfs, so a computer on the phone's cable sees a modem, served on
  /dev/ttyGS0; taken out again when off; said plainly when the phone's
  kernel can't
- Settings' serial port section has both
Tested: an adapter's port faked (both ways, DCD, DTR's drop hanging up,
unplugged), the gadget on a pty with root faked, its scripts parsed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 07:09:33 +00:00
Claude 033b1db1a8 Dial-up internet: a login script before PPP, as chat(8) has them
Expect and send strings in turn, run on the call after the CONNECT and
before PPP: \U and \P the login, \d and \p waits, \c no return, ^X
control characters, an expect's alternative (ogin:--ogin:), ABORT and
TIMEOUT; the password kept out of the log. Set in the ISP's settings.
Tested on its own, and on a modem call to an ISP that asks login: and
Password: before its PPP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 01:43:59 +00:00
Claude bfb26a2171 Internet: Home's card connected, in the screenshots
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 01:41:02 +00:00
Claude 87df1f4c3f Dial-up internet: PPP on a modem call, the phone's traffic through a VPN
- Ppp: the client side of PPP in HDLC-like framing (RFC 1662): LCP (MRU,
  ACCM, magic, the authentication asked for), PAP or CHAP-MD5, IPCP for
  an address and the DNS servers; what it doesn't take, rejected
- Internet: the ISP dialled (data mode, the settings' AT commands), PPP
  on the call with the DTE to itself, the carrier or the modem going
  taking the link down, +++ and ATH at the end
- PppVpnService: the link as the phone's network (all IPv4 into it,
  IPv6 dropped, the app's own SIP traffic outside it)
- Home has an Internet card (Connect asks for the VPN the first time),
  Settings the ISP's number, login and AT commands
Tested: framing and FCS; PAP and CHAP against a server in the test (a
wrong password said); a call on native-test's fax_line at 33600 (V.42,
V.44) to that server: online, a UDP packet out and its echo back,
disconnected and hung up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 01:40:10 +00:00
Claude 292e23eccb Fax: lint's note on the manager's application context
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 01:18:27 +00:00
Claude e467cdf7d4 Fax in the app: send documents, answer calls as faxes, received faxes as PDFs
- Home has a Fax section: send a PDF, image or text to a number, answer
  a ringing call as a fax, the call as it goes (Cancel), the last faxes;
  Settings has this fax's number, answering every call as a fax, fine
  resolution and the fastest rate
- a call has the modem's DTE to itself (DteHub.claim) while it lasts
- documents become pages at the fax's resolution (PdfRenderer, images
  dithered, text set in a monospace font); received pages are saved as
  a PDF in the fax's own coding (CCITTFaxDecode) in Download/D-Modem
Tested: the app's fax on the hub to our T.30 on fax_line both ways,
the saved PDF read back by poppler, every pel as sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 01:02:08 +00:00
Claude 147736235c Fax: T.30 and T.4 on the modem's class 1
The fax machine's side in the app, over the modem's class 1 commands
(T.31): T.4's MH coding of the pages, T.30's procedure (DIS/DCS, the
training and its fallback to lower rates, the pages with MPS/EOP and
their MCF/RTN/RTP, DCN), V.17 to V.27ter as the modem has them.
Tested on D-Modem's own modems back to back (native-test's fax_line,
modem_test paced as a phone line): our sender to our receiver, efax
sending to us and receiving from us, the pages exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 00:38:49 +00:00
Claude 0d93f44999 Linux: Arch's first-login keyring setup takes no input (what's typed meanwhile reaches the shell); distro tests type once the shell has settled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 23:56:39 +00:00
Claude d35cb4de54 Linux: bash for root when its shell is plain sh (Void); lint's API level for Downloads; distro tests strip ST-ended OSC, use https mirrors for Alma and Devuan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 23:46:44 +00:00
Claude 1f1e68751c Local and Linux shells: the session listens before the shell starts (its first prompt was sometimes lost); ZMODEM: escapes in skipped data aren't a cancel
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 23:37:54 +00:00
Claude be435b52fa The modem as a serial port on TCP and Bluetooth
A client has the modem's DTE as if on a serial cable, one at a time:
- TCP, raw or Telnet with RFC 2217's port control (the speed and format
  answered, DTR dropped hanging up, DCD/RI/DSR/CTS notified and polled),
  this phone only unless other devices are allowed, an optional password
- Bluetooth SPP: the phone offers the port, or connects to a paired
  device's (an HC-05 on a vintage computer, say), again when it drops
The client going hangs up a call (as DTR dropping would), if set.
They run while the modem is on, set in the settings' new section.
Tested with sockets, pyserial's rfc2217:// client and Robolectric's
Bluetooth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 23:22:28 +00:00
Claude b28e79a9b6 Transfers in a terminal session tested: a remote's sz and kermit -s taken by themselves, its rz given files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 23:06:47 +00:00
Claude 5e5af6952d Transfers: ZMODEM sends without waiting on a header's trailing XON, C-Kermit's capital names in lower case, YMODEM's end sooner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 23:01:53 +00:00
Claude ada1b39c62 LinuxSystemTest: a failing distribution's shell closed too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 22:58:26 +00:00
Claude 885aea6898 Transfers: ZMODEM's repeated ZRINIT and ZRPOS no longer restart it, YMODEM's batch end
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 22:56:41 +00:00
Claude 88c1890e24 D-Modem-RE: the merged Android support (libdmodem_sip on the main branch)
The submodule follows D-Modem-RE's main branch now that the Android
branch is merged. What came with it reaches the app without changes
here: SIP's busy and no-answer results for a dialled call, the hook
flash as an RFC 4733 event, the far end's tone events. The engine's
host test passes and the arm64 NDK build links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 22:56:18 +00:00
Claude 0cbb7aae29 File transfers: XMODEM, YMODEM, ZMODEM and Kermit (work in progress)
Protocols in the transfer package with lrzsz and Kermit interop tests,
the session routing the line to a running transfer, auto-start on a
remote sz or kermit -s, and Send/Receive files in the terminal menu
with a progress banner. Received files go to Download/D-Modem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 22:46:13 +00:00
Claude 38e45cb1c6 Linux: Arch's pacman keyring set up on first login; distro tests over https
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 22:46:13 +00:00
Claude 6b94ab8c77 Terminal: xterm extensions and Sixel graphics
Wide and combining characters (wcwidth tables, ZWJ sequences), curly,
double and overline underlines, OSC 4/10/11/12 colours and queries,
OSC 8 links, OSC 52 clipboard, mouse reporting (1000/1002/1003 with
SGR, UTF-8 and urxvt encodings), focus events, DECSCUSR cursor shapes,
DECRQM/DECRQSS/XTVERSION/DA reports, XTWINOPS sizes, and Sixel images
placed as cell tiles so they scroll with the text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 22:39:33 +00:00
Claude c921531360 Linux: Debian, Ubuntu, Fedora, Arch and more, and any root file system by URL
- A catalog: Alpine (its own release list), Ubuntu 24.04 (its base
  image, the newest point release), and from the Linux Containers
  images (built daily, SHA-256 sums): Debian 13, Fedora, Arch Linux,
  openSUSE Tumbleweed, Kali, Void, Rocky, AlmaLinux, Devuan; those not
  built for the phone's processor shown as such (the images' index)
- Or any root file system tarball by its URL (.tar, .tar.gz, .tar.xz;
  xz with org.tukaani:xz), its SHA-256 checked when given; one in a
  single top folder moved up; anything else refused and removed
- Several systems side by side, each in linux/<id> with system.json;
  the first release's Alpine still known
- Set up for proot at each start: resolv.conf a file (not systemd's
  link), hosts, /etc/mtab, apt's sandbox user root, pacman without its
  sandbox or space check, a prompt named for the distribution; root's
  own login shell (bash where it has it), found through usrmerge's links
  as the system sees them
- Settings, Linux: the systems installed (open, remove), "Install a
  Linux" with the catalog or a URL; the terminal's "New Linux shell…"
  asks which when there are several; installs report done as a state
  the screens watch
- Tests: the sources' indexes, archives of each kind, the proot set-up,
  checksums and refusals (offline); Alpine and a custom URL's .xz
  through proot on this host; every catalog distribution's package
  manager installing Lua when DMODEM_DISTROS names them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 21:39:09 +00:00
Claude a02a578a5d Linux in the local terminal: Alpine with proot, the phone's storage at /sdcard
- proot (Termux's, external/proot) and its loader built with the NDK
  for each ABI by native-proot/build.sh (talloc fetched and checked by
  SHA-256, built as one file), run by Gradle before each build and
  packaged as libproot.so and libproot-loader.so: extracted on install,
  in the native library directory, the one place Android 10 on lets an
  app run its own programs
- LinuxSystem: Alpine's minimal root file system for the phone's ABI,
  found in Alpine's release list, downloaded with its SHA-256 checked,
  unpacked (Tar: ustar, pax and GNU names, links and modes, nothing
  written outside it, removed without following links), set up (the
  phone's name servers, a prompt) and run as root with proot: the
  device's /dev, /proc and /sys, made-up /proc files for those Android
  hides, hard links as proot's link2symlink, and the phone's shared
  storage at /sdcard when the app has "all files access"
- Settings, Linux: install (it goes on while the user moves about the
  app), size, open a shell, remove; the storage permission; the
  terminal's menu offers "New Linux shell (Alpine)", installing first
  when it isn't there
- Hang-up sent again shortly after the first, for a job the shell was
  forking as it went (found by the tests)
- Tests on the host: proot built by the same script, Alpine downloaded:
  a root shell, the storage both ways, the window's size, hard links,
  apk installing a package and running it, removal leaving the storage;
  the tar reader against GNU and pax tars and ones made to escape; the
  app installing it from Settings and opening its shell. CI installs
  gawk and mksh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 21:03:36 +00:00
Claude 7db6dfb673 Settings: each change made to what is saved, not to a stale copy
The appearance and terminal settings saved a whole copy of the settings
as the screen last showed them; two changes in quick succession (a theme
and a palette tapped one after the other) raced, the second undoing the
first. Each change is now applied to the stored settings inside the
store's own edit. The appearance test waits for the save it checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 21:03:36 +00:00
Claude cc7fd931f0 Local terminal: Android's shell on a pseudo-terminal
- libdmodem_pty (pty.c, plain POSIX + JNI): a program on a pty of its
  own as a session leader, UTF-8 input mode, window size, exit status,
  and hang-up of the whole session (the shell's jobs too, found in
  /proc: job control puts each in a process group of its own)
- LocalLink: the shell as a TerminalLink, like SSH's and Telnet's
- LocalShell: Android's mksh (/system/bin/sh, toybox's commands) as a
  login shell in a home of the app's, with TMPDIR, TERM=xterm-256color,
  COLORTERM, a UTF-8 locale and the app's own environment (so am, pm
  and cmd work), and ~/.mkshrc (the system's first, then a coloured
  prompt, aliases and history; kept as the user changes it)
- Shells open in tabs beside the modem's and the connections, from
  Home ("Shell") or the terminal's menu ("New local shell"); an exited
  one says so and offers a new one; the connection service keeps them
  going in the background
- Tests: pty.c built for the host and real shells on it (sh, and mksh
  with the app's start-up file): output, window size, Ctrl-C to the
  job not the shell, exit status, hang-up of background jobs, a shell
  that isn't there; the app opening one from Home, its exit, a new one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 20:21:00 +00:00
Claude 3b8de945bd PuTTY .ppk keys: import and export
- Import PuTTY's private key files, versions 2 and 3 (with their
  passphrase), their comment kept as the key's
- Export as .ppk version 3 (Argon2id, AES-256-CBC, HMAC-SHA-256, as
  PuTTYgen 0.75+ writes them) or version 2 (for older PuTTY and WinSCP),
  with or without a passphrase; chosen in the export dialog beside
  OpenSSH's form
- Imported RSA keys that come without their primes (sshj reads .ppk
  ones so) made whole again from n, e and d: Android's provider
  wouldn't encode them, so they couldn't be kept
- Tested against puttygen: every key type, both versions, with and
  without a passphrase, read by puttygen (MAC and decryption checked)
  and converted back to the same private key; puttygen's own keys
  imported; a wrong passphrase refused. CI installs putty-tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 19:42:31 +00:00
Claude a946d5d828 SSH port forwarding, SOCKS proxy, agent forwarding, ssh-keygen
- Port forwards per entry and live per session, in ssh's own syntax:
  local (-L), remote (-R) and dynamic (-D, a SOCKS 4/4a/5 proxy);
  each one's state (listening, port, connections, errors) shown in
  the session's "Port forwards, agent, keys" panel, more added there
- Agent forwarding (ssh -A): the app's keys served to the server over
  the agent protocol (Ed25519, ECDSA, RSA with rsa-sha2-256/512), each
  use confirmed by the user unless the entry says not to
- ssh-keygen: Ed25519, ECDSA P-256/384/521 and RSA 2048/3072/4096 with
  a comment; SHA256 and MD5 fingerprints and randomart as -lv draws
  them; the private key exported in OpenSSH's form, encrypted with a
  passphrase (bcrypt KDF, aes256-ctr) as ssh-keygen writes it; comments
  changed; a key put on the server once (ssh-copy-id)
- Tests against OpenSSH itself where installed (sshd, ssh, ssh-add,
  ssh-keygen): every key type read back by ssh-keygen with and without
  a passphrase, its randomart and fingerprints matched; forwards both
  ways and SOCKS through sshd; ssh on the server logging in onward with
  the forwarded agent, and refused when the user says no; ssh-copy-id.
  CI installs OpenSSH for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 18:28:38 +00:00