Commit Graph
50 Commits
Author SHA1 Message Date
Claude 582a8221bf docs: rewrite README, lines, fax and layout in Simplified Technical English
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRRR4BV2CBsQMqfrT6
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-14 10:24:53 +00:00
Claude 98aa27f9ea Add voice calls and a local answering machine
Calls through D-Modem's V.253 voice mode, on the phone's earpiece or
loudspeaker and microphone: a number called, the ringing call answered,
the keypad (DTMF), mute. The answering machine, off until the user turns
it on, answers after the rings set, plays the greeting and a beep, and
keeps the caller's message as a WAV file on the phone.

The call is the shared Kotlin's VoiceJob (with G.711, tones and WAV
files, tested against a fake V.253 modem). Android has Home's Phone
section, a settings page and the incoming call popup's two new answers;
iOS a Phone tab. D-Modem bumped to main (Rockwell/USR voice, #109).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvbHMpudRfQWK4c4H
2026-11-11 12:34:44 +00:00
Claude dc27f3cd52 Licence: AGPL-3.0-only, or a commercial licence from the D-Modem Authors
The suite's licence, as D-Modem, bbs, menu and brand: the AGPL-3.0-only
by default, and a commercial licence from the D-Modem Authors for uses
that can't meet its terms (COMMERCIAL-LICENSE.md).  The contributor
agreement grants the licence for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U
2026-11-07 11:01:35 +00:00
Claude 7efa6813a8 Contributor agreement: CONTRIBUTING.md and a sign-off check on pull requests
Each contribution comes with the suite's contributor agreement (the one
bbs, menu and brand already use): the contributor keeps the copyright
and licenses it to the D-Modem Authors under the repository's licence
and any other terms, commercial ones included.  Each commit's
Signed-off-by line says they agree.  The new workflow checks for that
line on every commit of a pull request, except pull requests from the
owner, the organization's members and bots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U
2026-11-07 10:58:30 +00:00
NeoandClaude dc3fbe8c86 README: link the website (#27)
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-05 18:21:33 -08:00
Claude b72452fafc README: add the header banner
The 1280x320 banner from D-Modem/brand (banner/app@2x.png), kept at
.github/banner.png.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRR7XmhWoFbzJFFFqde
2026-11-06 01:32:14 +00:00
Claude 71c649bce1 README as a landing page; D-Modem-RE is now D-Modem; CI skips doc-only changes
The README, titled for Android only, now introduces the app on Android
and iOS with a short feature list, a quick start, the suite's
repositories and the licence. Its sections move to docs/: the modem's
lines, fax, adapters and phone lines, the app screen by screen, building,
the iOS app and the source layout.

D-Modem-RE becomes D-Modem in comments, docs, workflows and the
generator's header, as in brand's naming guide; the build info line says
'D-Modem core <commit>' for the submodule's commit. Identifiers and the
external/d-modem-re path keep their names.

The Android and Apple workflows no longer run for a change to Markdown,
docs/ or COPYING alone (tag pushes still run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn
2026-11-05 10:46:04 +00:00
Claude 4f01904472 USB serial adapters: a modem on one as the line, /dev/ttyUSB0 in Linux, Start PPP
- A new line, "a phone line, through a modem on a USB serial adapter": an
  external Hayes modem on a PL2303 (PL2303GS too), FTDI, CP210x, CH34x or
  CDC-ACM adapter takes D-Modem's modem's place, as a Bluetooth modem does.
  The terminal, the internet, fax and /dev/ttyDM0 talk to it; its status
  from its result codes and DCD; DTR up while it runs, down when it stops.
  Its speed (8N1) and RTS/CTS in the line's settings.
- The local Linux gets the adapter as /dev/ttyUSB0: a pty bridged to it,
  opened when a program opens the port, closed (DTR down) when it closes;
  the speed, stop bits, RTS/CTS and B0 follow the program's termios
  (pty.c's new Pty.termios reads the slave's through the master).
- SerialAdapters keeps the modem's line, /dev/ttyUSB0 and the USB bridge
  off each other's adapter.
- The terminal's menu: Start PPP, the app's PPP on a call already up
  (dialled and logged in by hand), Internet.connect(dial = false).

Tests: SerialTtyTest, SerialModemTest, PppTakeoverTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTB3RLw6uwCRCpEmpk
2026-11-04 05:27:46 +00:00
Claude 9183a2d3aa Support the Apple USB Modem (05AC:1401) as the modem's line
D-Modem-RE (D-Modem) updated to its main with the Apple USB Modem's
driver (usb_apple.cpp), built into the engine. UsbModems knows it
(05AC:1401 and 05AC:8220, 9600 Hz), the app is offered when one is
plugged in, and native-test's usb_line_test.py runs calls on its fake
(apple_line).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSpDnDnJUjH5xnnnwz
2026-11-03 08:39:35 +00:00
Claude 772cdf3c9a Android signing from CI's secrets
The debug and release signing configs take a PKCS12 keystore from
ANDROID_KEYSTORE_FILE and its password, alias and key password (the
store's if empty) from the environment; without them debug builds keep
the SDK's debug key and release builds stay unsigned. CI decodes
ANDROID_KEYSTORE_BASE64 into that file: the build job with the
repository's (debug) secrets, a new release job (assembleRelease,
bundleRelease) with the protected release environment's on main and v*
tags, the debug key on a pull request. Fork pull requests, with no
secrets, build as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRuUkndpo3FJrWFe84
2026-10-31 16:36:20 +00:00
Claude 24525a0d17 Rename the Android app to org.dmodem.app.android
The application id, namespace and Kotlin package of the Android app
are now org.dmodem.app.android (was com.neodesktop.dmodem), with the
JNI symbols (pty.c, jni.cpp's class name), ProGuard keeps, the USB
permission action, README and the generator scripts to match. The
shared Kotlin Multiplatform code moves to org.dmodem.app alongside it,
so the app now imports what it used to see as its own package.

The iOS bundle ids are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRipoddxponCaexwE4
2026-10-31 13:08:06 +00:00
Claude 37a4ac710d AT command reference in the app: Settings, AT commands, and the terminal's menu
D-Modem-RE's A5 AT command manual (docs/at_commands.pdf, merged in
D-Modem/D-Modem #26) bundled in the assets and shown in the app: its
pages rendered with PdfRenderer, one under another, with a zoom, or
opened in the phone's PDF app (through the FileProvider, from the cache)
for its search and its contents' links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVNHPWcCitx9W4sAfc
2026-10-31 09:06:07 +00:00
Neo 69e30fc1a9 Merge pull request #7 from D-Modem/claude/project-thread-ai22rg
Mobile calls: send +MS=VCVM (V.cvm's new name)
2026-10-30 08:40:57 -07:00
Claude 3891c3b83f Mobile calls: +MS=VCVM, the core's new name for V.cvm
D-Modem-RE now names V.cvm VCVM (like K56 and VWB); the mobile-call
line sends +MS=VCVM. A saved V_CVM setting from an older version reads
as VCVM. The submodule moves to the D-Modem commit with the rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUhzHK9FsNkkr7T6X3
2026-10-30 15:20:30 +00:00
Claude 903e861dcf native-test: the engine and C API tests on GoogleTest
engine_test.cpp's five calls are now four GoogleTest tests, each with a
dmodemd of its own, and c_api_test.c is c_api_test.cpp, seven tests
(its header still compiled as C, c_api_header.c). ctest registers each
test on its own (gtest_discover_tests). GoogleTest is the system's
(libgtest-dev, added to the native job) or else fetched, v1.14.0 as
D-Modem-RE has it. The USB line tests stay as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSgB6M9Vp9dEP1haEE
2026-10-30 14:32:16 +00:00
Claude f0abbcc59b CI: read the D-Modem submodule with the DMODEM_TOKEN secret
Renamed from DMODEM_RE_TOKEN, now that D-Modem-RE is D-Modem/D-Modem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUwD2JJ5d6fgHmpVTw
2026-10-29 09:59:16 +00:00
Claude f632959ef9 Point repository references at the D-Modem organisation
The repositories moved from Neo-Desktop to the D-Modem GitHub
organisation: D-Modem-RE is now D-Modem/D-Modem, pico-serial is
D-Modem/hardware, modemmenu (PBX-Modem) is D-Modem/menu, bbs-sec is
D-Modem/bbs and go3270-sec is D-Modem/go3270.  Update links, module
paths, submodule URLs and source-location strings to match.  Copyright
notices still name Neo-Desktop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUwD2JJ5d6fgHmpVTw
2026-10-29 09:02:38 +00:00
Claude 84a7ff0a15 tools/doc_check.py: every function documented
A comment on the line just above each function (or above its
annotations) in Kotlin, Swift and shell, a docstring or comment in
Python; C and C++ through D-Modem-RE's own check. The README says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-27 08:13:10 +00:00
Claude 9382cf6fe2 A Bluetooth modem as the modem (Dial-Up Networking: a Sony BTA-NW1)
A new line, "A phone line, through a Bluetooth modem": the paired
modem's DUN service (then unencrypted, then its serial port) is
connected in place of D-Modem's modem, its streams on the DTE hub, so
the terminal, the internet and fax talk to it with its own AT commands.
Its status from its result codes (CONNECT and its speed, NO CARRIER,
BUSY...); no tones or adaptive answer of the app's; its connection
dropping, connected again once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 17:27:06 +00:00
Claude 9d6993a299 USB serial: Exar's XR21V141x, XR21B1411, XR21B142x and XR2280x
They show a CDC-ACM interface, which the library's CDC driver would
take, but their UART is set through Exar's vendor registers (the
XR21V141x ignores CDC's line coding): XrSerialDriver does that, from the
datasheets' register maps (our own code), its lines from its GPIOs.
Registered before the CDC driver; tested against a fake of the
registers (not yet on a real chip).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 12:40:43 +00:00
Claude d716171658 USB serial: the 1100 or so adapters on FTDI, CP210x, PL2303 and CH34x chips under their makers' own IDs
usb-serial-for-android's table has only the chip makers' IDs (18); many
adapters carry their own. tools/usb-serial-ids/generate.py takes the IDs
(only the numbers) from Linux's drivers' tables (v6.12: 823 FTDI, 203
CP210x, 76 PL2303, 6 CH34x; not FTDI's JTAG and infrared boards) into
UsbSerialIds and the device filter, and UsbSerialAdapters' prober adds
them to the library's table for the bridge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 12:37:37 +00:00
Claude e2b9d1ccfe Agere: on its ROM's own isochronous stream (D-Modem-RE), no patches in the app
D-Modem-RE now streams the Agere modem as Agere's Windows driver does:
alternate setting 1, the ROM's command 0x0c, a packet each way every 2
microframes, nothing downloaded into it. So the app ships no Agere
patches: the agereFirmware assets, installAgereFirmware and its test,
and the bring-up's environment variables go. The transfer counts log an
isochronous IN transfer's packets; the host test checks the alternate
setting and the packets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 09:22:48 +00:00
Claude f93ac19dbc Agere USB 2.0 soft modems as the line (D-Modem-RE a30aa39)
D-Modem-RE's third USB line, usb_agere.cpp (047E:2892, 047E:2828), in
the app's native build beside the SmartUSB56's and the pico-serial
Line's. Its ROM patches (D-Modem-RE's firmware/agere: Agere's, under
Agere's licence, with its LICENSE and NOTICE.md) are copied into the
APK's assets at build time (agereFirmware) and installed in the app's
files when an Agere modem is the line, DMODEM_AGERE_FIRMWARE pointing
D-Modem-RE at them. UsbModems knows the two IDs, and runs it at 8000 Hz
(the others at 9600); Android offers the app when one is plugged in;
the line's settings say so.

native-test: agere_host on D-Modem-RE's fake Agere modems
(fake_agere.cpp), their patches the tests' own in a firmware directory:
usb_line_test.py's agere run, ATI3, caller ID, CONNECT 33600 both ways,
data, hang up, unplugged. AgereFirmwareTest: the patches installed as
shipped (D-Modem-RE's SHA-256 sums), the licence beside them.

D-Modem-RE a30aa39 too: V.cvm's MPs through AMR-WB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 03:14:40 +00:00
Claude 00b335a9d3 File transfers: plain text, verbatim
Protocol TEXT: a file's bytes sent exactly as they are (no line ending
changed, nothing added), as if typed, to an editor, a BBS, cat > a file;
received, what comes saved as it is until the line has been quiet for
10 s (a cancel ends it, what came kept). No cancel bytes: no protocol.
TextTransfer; the terminal's dialogs say what it does; iOS's transfers
have it too.

TextTransferTest (JVM and native): CR, LF, CR LF, tabs, UTF-8 and every
byte value sent unchanged and received as sent; through Transfer, its
end, nothing sent on cancel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 07:43:39 +00:00
Claude d699982f2e File transfers: Intel HEX and Motorola S-records
Two more ways to send and receive a file, for EPROM programmers, monitor
ROMs and boot loaders on a plain serial line: HexRecords encodes an image
as Intel HEX (16-byte data records, an extended linear address at each
64 KB, the end record) or S-records (an S0 header of the file's name,
S1/S2/S3 by the image's end, S5's count, S7/S8/S9) and decodes them back,
checksums and lengths checked, other lines (prompts, echoes) passed over,
gaps as an erased EPROM's 0xFF. HexTransfer sends a file a record a line
(a file of the format's records already, as it is), and receives the
records until the end record (or a 10 s pause once they've come) into
the image they hold. Protocol INTEL_HEX and SREC: the terminal's send and
receive dialogs (with what each does), iOS's transfers too. A cancel sends
nothing: there's no protocol to tell.

HexRecordsTest (JVM and native): Intel's and the S-record examples, images
there and back at three base addresses, address sizes, gaps, wrong
checksums, and sent and received on a line through Transfer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 07:25:04 +00:00
Claude 42a50110ee The modem as /dev/ttyDM0 in the local Linux
A pty of the app's (pty.c's openPort: its slave raw, opened once and
closed so the master's poll says POLLHUP until a program has it) bound
into each distro by proot at /dev/ttyDM0. ModemTty serves it as a client
of the serial bridge: a program that opens it has the modem (one at a
time, with the TCP, Bluetooth and USB bridges), its writes to the DTE,
the modem's output to it (nothing while none has it open); closing it
drops DTR, the call hung up as a serial cable's end would. minicom -D
/dev/ttyDM0, pppd, efax: as on a real modem.

ModemTtyTest: open, ATI answered, RING unasked, closed in a call (hung
up), opened again, another client's modem left alone. LinuxSystemTest in
a real Alpine under proot: /dev/ttyDM0 a character device there, ATI to
the modem and its answer back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 06:45:33 +00:00
Claude 67d1d3fc85 Dial-in internet for callers; back goes Home, then to the background
Dial-in (Settings, Dial-up internet): the phone as an ISP for whoever
calls the modem, on SIP or any line. DialIn watches the modem's lines: a
RING answered (unless the fax settings answer already), a CONNECT after
it the caller's: the DTE taken, a PPP server on the call (10.64.64.2,
DNS at 10.64.64.1) with the serial host's NAT on the phone's network.
The caller's PPP over (or none started): +++ ATH, the DTE given back;
the call dropped: PPP stopped. Home shows the caller online, bytes each
way, Hang up. DialInLineTest: two of D-Modem's modems back to back
(fax_line), our PPP client as the caller's: CONNECT 33600, the address,
DNS and a ping through the phone, the hang-up.

Back: from another tab to Home; on Home the task to the background (the
modem keeps running), not the activity finished. BackNavigationTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-24 00:05:30 +00:00
Claude dc9e15aff1 D-Modem-RE: SmartUSB56 caller ID and its extras, SmartDAA, V.22 (7d1790f)
- dmodemd --usb: SmartUSB56 caller ID and the ST75951 silicon DAA; its
  LEDs, wake on ring, handset, international line controls, voice codec,
  RHOM and buzzer (each opt-in).
- SmartDAA (Conexant): its power up, line setup, hook and country table.
- V.22: 1200 bit/s symbols decided around their point.
- Clang preferred where it is installed.

The app says the SmartUSB56 has caller ID now too. The host's USB test
links D-Modem-RE's fake stick alone, without the real libusb behind it:
libusb_get_port_numbers (wake on ring's, unused there) stubbed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-23 23:53:39 +00:00
Claude d353ae2b02 USB modems as the modem's line: SmartUSB56 and pico-serial Line
A new line, "A phone line, through a USB modem": the phone runs the
modem, a Smart Link SmartUSB56 (0483:7554) or a pico-serial Line stick
(1209:0002) plugged into it carries its samples to a real phone line,
with D-Modem-RE's usb_line.cpp as dmodemd --usb drives them (the
stick's caller ID and the country's DAA settings too).

- libusb 1.0.27 (D-Modem-RE's pinned release) built for Android
  (usb/libusb.cmake); usb_line.cpp built with libusb_init,
  libusb_get_device_list and libusb_open renamed to usb_android.cpp's,
  which start libusb without device discovery and give it the
  descriptor Android opened for the app, wrapped, as the only device.
- usb_modem.cpp: the core on that line, the run loop of dmodemd's
  run_line() with a stop pipe and the engine's status; Engine::Config
  usb_fd and usb_rate, through JNI.
- UsbModems: the devices by their IDs, Android's permission asked when
  the modem starts, the connection held while it runs; ModemSettings
  LINE_USB (no SIP account, not a peer line); the settings, Home and the
  notifications say so; Android offers the app when one is plugged in.
- native-test: usb_host (the engine on D-Modem-RE's fake stick, linked
  in as libusb) and usb_line_test.py: two of them through its simulated
  exchange: caller ID, CONNECT 33600, data each way, hang up, unplugged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-22 19:16:22 +00:00
Claude 7e75fea461 Dockerfile for building the Android app
The toolchain CI builds with (JDK 21, SDK platform 37, NDK 29, CMake
3.31.6, gawk for proot) on Ubuntu 24.04, plus the unit tests' host
compilers and SSH tools. `docker build --target apk --output out .`
gives the debug APK; the default target is an image to run Gradle in.
The submodules come from the checked-out tree (D-Modem-RE is private).
A proxy's CA can be given as a build secret, and HTTPS_PROXY is passed
on to Java.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-19 02:38:13 +00:00
Claude 05143cb764 Adaptive answer: a call answered is a fax or data by what it sends
D-Modem-RE up to 24e48f3: its adaptive answer (AT+FAA=1: the caller's
CNG, a V.8 fax call or T.38 from the far end make it FAX, +FCLASS=1 and
a class 1 answerer; a modem's handshake makes it DATA, then CONNECT)
and its CNG detector widened to T.30's 1100 Hz +-38 Hz.

The app turns it on as the modem starts (Settings: "Fax or data, as
each call turns out", on by default). When the modem says FAX, the fax
receiver takes the DTE at once, on its reader's thread before the
CONNECT goes to the terminal, with no set-up commands (the modem is
waiting for our first frames), and receives the pages as an answered
fax always did. A data call stays the terminal's.

With it on, the incoming call popup and notification offer Answer and
Ignore (no "Answer as fax"), and the fax settings' auto-answer answers
every call adaptively.

Tests: FaxAppTest.aFaxMachinesCallAnsweredAdaptively (a fax machine
dials, a plain ATA, the page received and saved),
aDataCallAnsweredAdaptively (DATA, CONNECT, no fax).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-19 01:32:58 +00:00
Claude 39e687f9a1 A call ringing in: a notification and a popup in the app
While the modem's line rings (its RINGs: a SIP call, the other phone,
a mobile call):
- the phone's incoming call notification (CallStyle, a new high
  importance "Calls" channel with the ringtone, full screen over the
  lock screen): Answer, Answer as fax, Ignore
- a popup over whatever tab the app shows, with the same three
- who's calling when the line says (the other phone's name), else the
  line's word for it ("A SIP call")

Answer opens the terminal and says ATA; Answer as fax starts the fax
call; Ignore puts it out of sight while it rings on. It's over when the
modem goes off hook (answered here, by a computer on a bridge, by S0)
or no RING has come for 8 s (IncomingCalls).

Tests: IncomingCallsTest (rings, the caller's name, answered, given up,
ignored), CallShotsTest (the popup, ignored, answered to the terminal;
build/screens/call-1-incoming.png).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-19 00:34:03 +00:00
Claude 06e4a41050 No line: the modem started on its own, without a SIP account
A fifth line, "No line (the modem on its own)": the engine starts as on
a peer line (no SIP, no network needed) with nothing behind it. It
answers AT commands in the terminal and on the serial bridges; a dial
gets NO DIALTONE, as a modem with no phone cable plugged in (the
engine's new peer event NO LINE), an answer NO CARRIER.

Home offers "Start without a line" beside "Set up SIP" when there's no
account: the line set to none and the modem started in one tap. iOS has
the same line and button.

Tests: c_api_test (NO LINE: NO DIALTONE), DModemKitTests.testNoLine
(started without an account, a dial NO DIALTONE, commands still
answered), PeerShotsTest.noLine, DashboardShotsTest.firstRun.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 23:57:13 +00:00
Claude 7a986263e6 The country's call progress tones: dial, ringing, busy, congestion
D-Modem-RE's ITU table (dsp/tones.cpp, 192 countries after E.180) in
the shared Kotlin (tones/: generated by tools/country_tones.py, checked
against the submodule by CountryTonesSourceTest), with a synthesizer
for its tones (two frequencies, or one modulated; the cadence, its
edges ramped).

Android:
- Settings: the country picked from the list (searched, each with its
  tones, a button to hear them), for the modem (its line settings, how
  it hears busy) and the tones; "Call progress tones" on or off
- dialling a directory entry plays a second of the country's dial tone
  before ATD
- CallProgress plays the busy tone on BUSY, the congestion tone for a
  dial that ends (NO CARRIER, NO DIALTONE) before the far end answered,
  and the ringing tone while the other phone rings on the phone-to-phone
  line (no network there to play one); a handshake stops them
- CallTones plays them on the phone's speaker, in their own stream

iOS: the country picker in Settings (it had the setting, not the UI).

Tests: CountryTonesTest (the table, each tone's frequencies and cadence,
on the JVM and natively), CallTonesTest (when each plays; a second of
the UK's dial tone, stopping, the preview).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 23:24:55 +00:00
Claude 8868e97b0a pico-serial: the board's lines and settings on the USB bridge
pico-serial (github.com/Neo-Desktop/pico-serial) is a USB-C to DB25
adapter made for the phone to be a vintage computer's modem. Its
firmware's control protocol (firmware/PROTOCOL.md, version 1) is found
by its vendor interface (class FF, subclass 50, protocol 01) and used:

- as DCE, the modem's DCD, DSR and RI each their own (SET_OUTPUTS): a
  call ringing in raises RI on the computer
- the computer's DTR from GET_INPUTS: dropping it hangs up (the CDC
  driver can't read DSR, so before this it never did)
- the board's role, baud source, flow control and counters shown in the
  serial port settings, and set from there (kept in its flash)

Other CDC-ACM adapters' SERIAL_STATE notifications (their interrupt
endpoint, which usb-serial-for-android doesn't read) now tell the
computer's DTR too, so it hangs up there as well.

UsbBridgeTest: the structures against bytes compiled from the
firmware's protocol.h; a board faked as its firmware answers, its lines
following the modem's and its DTR hanging up; a CDC adapter's
notifications hanging up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 06:34:52 +00:00
Claude a6a2f5ef50 iOS: CallKit, and the fax, file transfer and dial-up screens
- CallKit: the modem's RING rings as a phone call (answered with ATA or
  turned down on the phone's screen); a call the modem dials is an
  outgoing call, hung up from the call screen; both in Recents
- Fax tab: PDFs, images and text drawn at the fax's width (CoreGraphics,
  then the shared FaxImage), sent; a ringing call answered as a fax, by
  hand or every one; received faxes as PDFs in Documents/Faxes
- File transfers from the terminal's toolbar: ZMODEM, YMODEM, XMODEM,
  Kermit; a remote's sz or kermit -s starts receiving by itself, its rz
  asks for files; received files in Documents/Received (the Files app)
- Internet tab: dial-up to an ISP on the shared DialUpJob, the phone's
  traffic through the new DModemTunnel packet tunnel extension, its
  packets to the app's PPP over the loopback
- the log moves to a button on Home; tabs: Home, Terminal, Fax,
  Internet, Settings
- PeerLine passes LogOut objects (Kotlin lambdas aren't plain closures)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 04:17:48 +00:00
Claude befcd0d5ef iOS: the line to another phone over Wi-Fi, found with Bonjour
shared (Kotlin/Native, iOS and Linux): FdDuplex (a socket: the engine's
line, a TCP connection; closing it wakes a blocked read), PosixTcpTransport
(calls taken on a port, polled so close() always ends it; host[:port] and
[IPv6]:port called within 5 s; no SIGPIPE: Linux's send flag, Apple's
socket option), and PeerHost: PeerLine on it from plain values for Swift
(no default arguments or flows there), its state as text. PosixPeerTest
(native): two phones over real TCP on the loopback, the modems socket
pairs: a call rung, answered and heard both ways, busy, the hang-up, a
wrong PIN turned away, nobody there.

DModemKit: ModemSession.onLine, the peer line's modem off hook to the
app (tested: a dial reaches it, its FAILED a NO CARRIER).

The app: the settings' line (a SIP account or another phone on Wi-Fi:
whom ATD calls, the port, the PIN, taking calls), phones found with
Bonjour (_dmodem._tcp, as the Android app's NSD offers them), this one
offered while it takes calls; Home's line its state and last failure.
And a start fixed: the modem's log while it started ended the
background audio (and now the line) before it was running.

The Swift and appleMain's Kotlin aren't built here (no Xcode); the
Kotlin is built and tested for Linux native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 02:27:41 +00:00
Claude 133d5acb61 iOS app: SwiftUI on DModemKit and the shared terminal
ios/DModem (XcodeGen's project.yml, iOS 16): Home (the modem's state, the
rates and what the CONNECT was, the call's time, start, hang up, stop, an
AT command line and its last words), the terminal (the shared Kotlin
emulator through TerminalBridge, drawn run by run in a Canvas; CP437 and
the VGA colours; the keyboard and a hardware one's arrows and Esc; Esc,
a sticky Ctrl, Tab and the arrows on a bar; pinch for the font), the log
(shared as text) and the settings (the SIP account or user:password@host,
incoming calls, T.38, the speaker, the AT commands at start, the log
levels). The modem's speaker on AVAudioEngine; the audio session (its
sound, or quiet) keeps a call going in the background. The DNS servers
from the resolver's state (SystemDNS.c: iOS has no resolv.conf for the
engine).

shared: TerminalBridge, the terminal for Swift (octets as Latin-1 strings
both ways, rows as runs, keys, replies, the title, the look and the
character set), tested on the JVM and natively; the framework also as an
XCFramework (assembleDModemSharedXCFramework).

CI: the macOS job builds the shared XCFramework, runs DModemKit's tests
and builds the app for the simulator; the Linux job runs DModemKit's
tests on the host engine. Not built here: no Xcode on Linux (DModemKit,
TerminalBridge and SystemDNS.c are).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 02:15:16 +00:00
Claude dfb7699317 Mobile-call line: V.cvm, by default
D-Modem-RE's V.cvm (+MS=V_CVM), made for speech codecs: V.8, 15 to 20 s
probing the codec, a mode loaded for it, LAPM. Through AMR-NB 12.2 the
app's engines connect at CONNECT 1200/CVM/LAPM/V44 (750 to 1200 bit/s
coded each way, one renegotiation): four times V.21's 300. The mobile-
call line starts in it, S7 long enough for the start-up; V.21, V.22 and
V.22bis stay as choices (V.cvm offers modems without it V.22, which a
codec garbles: V.21 for those). Settings saved before keep their speed.

The dashboard says what the CONNECT was beyond its rate (ConnectInfo:
"V.cvm · LAPM · V.44"). CellLineTest's call in V.cvm through AMR 12.2:
the data whole each way, +CVM?'s figures; the README's mobile section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 01:04:20 +00:00
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 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 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 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 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 ab18a2d722 UI: a dashboard as Home
In the Modem tab's place: a card with what the modem is doing (off,
starting, ready, off hook, connecting, online with its rates down and up
and the call's time, hanging up) and the action for it (set up SIP, start,
hang up, stop, the terminal); the line (the SIP account, incoming calls,
the default network as Wi-Fi or mobile data, fax); quick dial of the four
systems last dialled (or a card to add one); shortcuts to the terminal and
the directory; the modem's console, folded, with its AT command line.
StatusScreen is gone (its console is the dashboard's).

DashboardShotsTest draws it first run, ready with a directory and online
into app/build/screens/.  37 tests pass; lint: no issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 16:23:39 +00:00
Claude 0564a2dea5 Terminal: built-in fonts
Cascadia Code, Sauce Code Pro (Nerd Font Mono), Source Code Pro, Roboto
Mono, JetBrains Mono, Fira Code, OpenDyslexic Mono, Inconsolata and Droid
Sans Mono in assets/fonts with their licences (OFL 1.1; Droid Sans Mono
Apache 2.0), and the system's monospace:

- the variable fonts at weight 400 and a real 700 for bold (Source Code
  Pro's and Fira Code's default instances are light), the others bold by
  the paint;
- ligatures (Cascadia Code, JetBrains Mono, Fira Code) on or off;
- glyphs a font hasn't got come from a fallback font: a run whose width
  isn't its cells' is drawn a glyph per cell, centred and narrowed to fit,
  so the grid holds;
- the cells' height holds the glyphs' ink where a font declares less
  (OpenDyslexic);
- Settings: the font with a preview in the theme's colours, ligatures,
  the fonts' licences.

OpenDyslexic Mono has no compiled release: it is built from its upstream
source with fontmake (assets/fonts/README.md).  Sauce Code Pro is Nerd
Fonts' patched Source Code Pro (Regular, 2.4 MB).

Tests (34 pass): every font loads, keeps the grid with glyphs it hasn't
got (CP437's), and the variable fonts' bold is heavier.  Lint: no issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 16:07:58 +00:00
Claude a691f12509 Terminal: a JuiceSSH-class terminal on the modem, a dialing directory
- TerminalEmulator (pure Kotlin): VT100/VT220 with xterm's extensions:
  cursor movement and addressing, erase/insert/delete of characters and
  lines, scrolling regions, SGR with 16, 256 and 24-bit colours (; and :
  forms), the alternate screen (47/1047/1049), origin, autowrap, insert
  and newline modes, application cursor keys and keypad, bracketed paste,
  DEC line drawing (G0/G1, SO/SI), tab stops, REP, DSR/CPR, DA1/DA2, ENQ
  answerback, OSC titles, DCS/PM/APC skipped, C1 controls, RIS/DECSTR;
  ANSI.SYS's CSI s/u and clear-home for BBSes; scrollback; resize that
  keeps the cursor's line; text extraction joining wrapped lines.
- Charsets: UTF-8 (streamed across reads), CP437, ISO 8859-1, both ways.
- KeyEncoder: xterm key sequences with modifiers, Ctrl/Alt on characters,
  BS or DEL, CR / CR LF / LF.
- TerminalView: cells drawn in runs on whole pixels, bold as bright, iCE
  colours, faint, italic, underline, strike, blink, inverse and reverse
  video; box drawing and block elements drawn to fill their cells (no
  gaps in ANSI art); block/underline/bar cursor with blink; fixed 80/132/40
  columns or pinch zoom (kept); scrollback with drag and fling, Shift+PgUp;
  long-press selection with copy, paste, select all, share and open link;
  a soft keyboard input connection without suggestions, hardware keys;
  volume keys as font size or Ctrl/Alt; bell as vibration or flash.
- TerminalSession: the emulator on the DTE hub, sticky Ctrl/Alt, local
  echo, (bracketed) paste, capture to a file shared through a
  FileProvider, hang up with +++ guard times.
- UI: Terminal tab (status and call time, keyboard, snippets, capture,
  hang up, charset, clear, reset, full screen; an extra keys bar with Esc,
  Ctrl, Alt, Tab, arrows with repeat, Home/End/PgUp/PgDn, F1-F12), Dial tab
  (a directory with each system's init commands, charset and backspace;
  dialling starts the modem), snippets with escapes, terminal settings
  (11 themes and the rest).
- Tests (JVM, 32 pass): the emulator (17), the session (7), and the view
  drawn for real with Robolectric's native graphics (ANSI art in CP437 at
  80 columns, its cells' colours checked).  Lint: no issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 15:55:06 +00:00
Claude f97c2a2767 App: Gradle project, the modem's foreground service, SIP settings
- Gradle 9.8.1, AGP 9.4.1 (its built-in Kotlin, 2.4.21), compileSdk 37,
  minSdk 26; the native library built by externalNativeBuild for
  arm64-v8a, armeabi-v7a, x86_64 and x86 (only dmodem_jni, NDK r29), 16 KB
  page aligned; R8 keeps NativeModem's natives and callbacks.
- ModemService: a foreground service (specialUse) that runs the native
  modem with its DTE on DteHub, sends the init commands (ATX3), holds a
  wake lock and a low-latency Wi-Fi lock while on, takes the DNS servers
  from the active network, and starts the modem again when the default
  network changes (after the call in progress); a notification with the
  call's state and Stop.
- DteHub: the modem's DTE shared by any number of listeners (console,
  terminal, bridges), kept across the modem's restarts.
- ModemState: the run state, the call's status, the log and the
  console's text, for the UI and the notification.
- Settings in DataStore: the SIP account (or user:password@host pasted),
  incoming calls, T.38, init commands, country, log levels; no backups
  (the password).
- UI (Compose, Material 3): Modem (start/stop, status, an AT command line
  and the modem's output), Settings, Log.
- Tests: DteHub and the settings (JVM, 5 pass); NativeModemTest
  (instrumented: the library loads, binds, answers AT, ATI3, ATX3, stops,
  and closing the DTE stops it), compiled here, run by CI on an emulator.
- CI: the APK, unit tests and lint; native-test on the runner; the
  instrumented tests on an x86_64 emulator.  The private submodule needs
  a DMODEM_RE_TOKEN secret.

Lint: no issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-16 15:19:57 +00:00
Claude b56434076a Native library: D-Modem's modem on SIP for Android, with JNI
- external/d-modem-re: D-Modem-RE as a submodule (claude/android-support:
  libdmodem_sip, the modem on a SIP line as a library, cross compiling
  with libre on Mbed TLS).
- app/src/main/cpp: libdmodem_jni.so.  engine.cpp runs dmd::SipModem in
  a thread of its own, its DTE one end of a socket pair whose other end
  is the app's; stop() from any thread, start() again after; the log
  (the modem's and SIP's) and the call's status to callbacks.  jni.cpp
  binds it to com.neodesktop.dmodem.NativeModem (log lines made
  printable ASCII for NewStringUTF: SIP messages come from the network).
- NativeModem.kt: the Kotlin side of the binding.
- native-test: the engine on the build host against a dmodemd over
  loopback SIP.  Passes: dialling out (CONNECT 62666, V.91), data both
  ways, the status online with its rates, a hangup, stop() and a second
  call after start() again, a call coming in (RING, ATA, CONNECT), and
  the app closing its end ending the engine.

Built with NDK r29 for arm64-v8a and x86_64 (android-26).

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