Commit Graph
115 Commits
Author SHA1 Message Date
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 3209195582 Log: time stamps (a setting, [HH:mm:ss.SSS] by default), a line for each day; the build and USB modems logged from the app's start
Each line's time is kept as it comes; the log screen, Copy and Save
show it in the setting's date pattern (empty: none; one that isn't a
pattern: the default), with a line before each day's first. The app's
first line says its build and when it started, then the USB modems
plugged in, and each as it's plugged in or goes, the modem started or
not (the service's own watch, only while it ran, dropped).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 11:59:51 +00:00
Claude 7f28b05ef7 "Plugged in" follows USB modems plugged in and out while it's on screen
The home card and the line settings looked once, when shown: now they
follow Android's attached/detached broadcasts (one just detached left
out, as Android may still list it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 11:55:27 +00:00
Claude 482fef123c D-Modem-RE: the Agere's Polaris DAA driven, its hook the right way round
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 11:40:19 +00:00
Claude 601324744c D-Modem-RE: the Agere's OH LED on GPIO 4; the LED probe over all 32 GPIO bits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 11:04:08 +00:00
Claude d5bab92cf2 A special build to probe the Agere's LEDs (-Pdmodem.special=led-probe); D-Modem-RE: ring indices left alone off hook
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 10:50:43 +00:00
Claude 5cfa4d3ffa D-Modem-RE: the Agere's start-up step from Windows' driver, ring indices off hook, registers logged
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 10:38:50 +00:00
Claude 76dae57d52 Log the build when the modem starts: version, commits, -dirty, special builds
The app's and D-Modem-RE's short commits (with -dirty if tracked files
differ), the build type unless release, and -Pdmodem.special=<name> for
a special build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 10:22:29 +00:00
Claude 03a196af25 D-Modem-RE: the Agere modem's two LEDs (READY/DATA, OH); its playback catches up after a burst
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 10:09:42 +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 3f17b78714 Agere: the codec settings its ROM gives at boot tried at start (rate measured each way)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 08:07:35 +00:00
Claude e73aa87255 Agere: its descriptors, ROM and registers dumped to the log at start; transfers back to 2
8 in flight made no difference: the device sends a packet every 19.5 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 07:33:30 +00:00
Claude 75cd6b0370 Agere: 8 bulk transfers in flight each way; the IN round trips timed in the log
The device starts its next IN packet only once the last has gone; with
Agere's driver's 2 in flight an app's round trip through libusb seems to
leave it waiting (2459 samples a second, at every ARM clock). The log's
transfer counts now say how long the IN transfers take to come back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 07:07:09 +00:00
Claude 3e705c6e73 Agere: D-Modem-RE's command 0x10 in wIndex, and its clock sweep at start while it's brought up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 06:16:43 +00:00
Claude dfc58299ea D-Modem-RE: the Agere's stream state read back after command 0x10, its mode as wIndex if not streaming
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 05:39:44 +00:00
Claude b0119dbe5e USB modems: each transfer counted both ways, in the log; the first IN ones' heads
The Agere's samples don't come on the device (its clock stays at 0):
whether its IN transfers never come back, come back failed or come
back empty is now in the log, with the clock every 10 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 04:50:35 +00:00
Claude b040b4a6cb USB modems: say when the device's samples don't come (its clock against the wall's)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 04:20:29 +00:00
Claude 9e2cd1cf60 The log saved to a file; a USB modem leaving the bus logged
Log: Save, beside Clear and Copy: the log's lines to a file the user
picks (the system's picker), dmodem-<date>-<time>.log offered.

A USB modem as the line: Android's word when it goes from the bus (or
comes back) in the log, so a modem that resets (an Agere dropping off
USB as it goes off hook: LIBUSB_ERROR_NO_DEVICE, a new address after)
shows as such.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-26 03:47:17 +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 6a2880223e D-Modem-RE: zstd in LAPM, V.80, V.92 and V.34 fixes (79e00fa)
- zstd compression of its own (RFC 8878, no libzstd), negotiated in
  LAPM's XID in every mode beside V.44 and V.42bis; AT+DSZ; CONNECT
  .../ZSTD. V.cvm: V.44 with Annex E's preset dictionary, zstd's too.
- V.80 synchronous access mode (framed and transparent).
- Retrains and rate renegotiations on the DTE's request; V.92 FPE's
  restart at B1u (#257); a V.34 retrain's reversal.
- The escape keeps the data still waiting to go out.
- A FreePBX module (dialling out with profiles, Backup & Restore).
- The hang-up while ringing fix (a800759) merged in it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 22:31:53 +00:00
Claude 7e1eb444cc PeerLoopbackTest: what C got when its BUSY doesn't come
It has failed now and then ("no C's BUSY") in a full run, not since in
14 alone: the failure now says C's events, its line's state and error,
and A's and B's events, for the next time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 08:03:19 +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 919cf43870 Settings' menu: an icon for each page
Material Icons' phone, router, usb, fax, language, palette, terminal,
vpn_key and computer (filled, Apache License 2.0), their SVG paths as
ImageVectors (SettingsIcons): nine icons without the extended set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 07:03:41 +00:00
Claude 66efb03f7e Settings as a menu of pages
Settings was one long page (the line, the modem, the bridges, fax,
dial-up, appearance, the terminal, SSH keys, Linux). Now a menu: a row
for each, what it's set to beneath (the line's account or kind, the
modem's country, speaker and answering); each its own page with its
title and a back arrow. Back from a page: the menu; from the menu: Home.
The Settings tab again from within: the menu. Home's Set up SIP and its
line card open the line's page, its ISP settings the dial-up page.

The line's and the modem's settings keep one set of edits across their
two pages and a Save on each ("Not saved yet" until then, the menu's
line row too).

BackNavigationTest: the menu, a page and back, Set up SIP to the line's
page, the tab back to the menu. The UI tests that used Settings open
their page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 06:59:34 +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 cd97abbf1c Hanging up a ringing SIP call: at once (D-Modem-RE a800759)
D-Modem-RE's core stopped a call hung up while being set up after 48 of
the line's samples, and a SIP call ringing without early media has none:
ATH while it rang waited until the far end gave up. Its fix
(claude/hangup-while-ringing): the stop done on time once no samples
have come for 100 ms.

engine_test's call 5: the engine dials a dmodemd that rings and doesn't
answer, then ATH: the modem back in 0.1 s (it took until the engine was
stopped), the status idle and on hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 05:30:50 +00:00
Claude 4e94931656 D-Modem-RE: modern C++ throughout (2ca2a79)
D-Modem-RE's tree in C++17's ways: fixed-width types (u8 .. s64,
include/dm_types.h), std::string and std::vector in place of C strings
and malloc, C++ casts and headers; settings from the environment through
dsp/env.h. Its behaviour unchanged.

For the app: include/ on the include path of its native code and the
host's tests (D-Modem-RE gives it to its own directories alone); the
peer line's Host overrides in the new types (s16 start/stop/speaker,
s32 dte_write, u64 now_ms); t30_line's page callback and bits too.
The host's engine, USB line and C API tests pass, and DModemKit's Swift
tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 04:25:20 +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 6250dec5b5 D-Modem-RE: USB modems, Windows, Si3054/Si3056 line settings (ed4ee27)
- dmodemd --usb: the pico-serial Line stick beside the SmartUSB56, each
  country's line settings in its Si3056 DAA (Host::country()).
- The country's line settings on an HD-audio Si3054.
- Windows: dmodemd.exe, the USB modems there, its own virtual modem
  driver; an Alpine Dockerfile.

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 6fb50206f4 Android 17's local network permission; the log copied
An app targeting API 37 may reach the LAN only with ACCESS_LOCAL_NETWORK,
which the user grants: without it a SIP server there was refused with
"Operation not permitted" (sendto's EPERM) while baresip, targeting
older, had it implicitly. It's declared and asked for at launch with
notifications; the modem says what to allow when it starts without it,
and when SIP gets EPERM.

The log screen copies its lines (Copy), and a line can be selected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-22 11:18:53 +00:00
Claude a6f317e64f Dockerfile: Ubuntu pinned by digest
The same base image each build, and a cached one used without asking
Docker Hub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-19 02:51:35 +00:00
Claude a34edde3d0 Dockerfile: a CA bundle split for Java's keystore; no syntax image
Java's keystore takes only a file's first certificate, so a bundle given
as the ca secret is split into one file for each. The syntax line made
the build fetch docker/dockerfile from Docker Hub; the built-in frontend
has secret mounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-19 02:41:12 +00:00
Claude aed9ab62cc D-Modem-RE: adaptive answer and voice mode fixes (7d68d64)
- Adaptive answer: slow legacy callers (V.22, V.21, Bell 103) answered
  as data; fax senders with no CNG, or a cut-short one, found as fax.
- Voice mode: calling tones reported, the call kept for fax or data.

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 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 8078fd8f8a FaxShotsTest: scroll to Send a fax (adaptive answer hides Answer as fax)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-19 01:46:06 +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 e999857e57 Call tones without pops; the line chosen from a menu
The tones popped: the player asks for 50 ms at a time, and each piece
ramped its start in from silence (a counter that began at 0 each time),
some 20 dips a second. A burst's ramps now come from where the sample is
in the tone's cadence (Tone.burst), so the pieces are exactly one sound
(CountryTonesTest.inPiecesAsInOne: the same samples in pieces as in
one, and no jump bigger than the tone's own slope).

Settings: the line (SIP, Wi-Fi, Bluetooth, mobile calls) is a drop-down
menu instead of four radio buttons (PeerShotsTest.theLineFromItsMenu).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 23:45:14 +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 65872fe764 D-Modem-RE: up to 804e1aa (V.17's steadier receiver, country tones)
17 commits from upstream, among them:
- V.17: steady AGC and timing in the data, so a page at 14400 without
  ECM no longer loses a row (the bug T30InteropTest worked around)
- each of 192 countries' ring, dial, busy and congestion tones; pulse
  dialling
- voice: caller ID as V.253's event report, +VEM
- Windows (MinGW, MSVC) and musl builds; SmartUSB56 and HD-audio lines

T30InteropTest.weReceiveWithoutEcm runs at 14400 again. PeerShotsTest
looked for the mobile line's old V.21 label; it now checks V.cvm's (the
default) and V.21's current one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 22:58:40 +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 1ff80c180f Shared jobs for iOS: fax calls, file transfers, dial-up internet
The modem's DTE lent to a job as Swift drives it: octets as Latin-1
strings, callbacks through fun interfaces (DteOut, LogOut, Changed)
rather than Kotlin lambdas, state read when it says it changed.

- FaxJob: send pages to a number, or answer and save the pages as a PDF
- TransferJob: ZMODEM/YMODEM/XMODEM/Kermit on the shared Transfer, now
  in common code (the Android terminal uses the same one)
- DialUpJob: ISP dialled, login script, PPP, packets to a PacketTunnel
- FaxImage: grey pixels as fax pages, at a threshold or dithered
- nativeMain: PosixFiles/PosixFolderIncoming for files by path, and
  UdpPacketTunnel relaying packets to iOS's packet tunnel extension
- PeerHost takes LogOut for its events and log (Swift can't pass a
  Unit-returning Kotlin lambda as a plain closure)

JobsTest runs each job on the JVM and natively (the fax both ways on
the fake class 1 line, ZMODEM between two jobs, PPP to a fake ISP);
NativeJobsTest covers the files and the UDP relay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 04:17:40 +00:00
Claude 581873d915 iOS: the SIP password, PIN and ISP password in the Keychain
SettingsStore keeps the settings' secrets apart from the JSON in
UserDefaults: the Keychain on Apple's systems (this device only, after
first unlock), memory on Linux for the tests. A password an older
version left in the JSON is moved on its first read. Fax and dial-up
settings added for the screens to come.

ModemSession can lend its DTE to a job (claim/release): while it's
lent, what the modem says goes to the job alone, and what the job
didn't read goes back to the terminal after.

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