Commit Graph
10 Commits
Author SHA1 Message Date
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 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 b54bf8bd13 D-Modem-RE: upstream's merge of the speaker, Apple portability and T.38 caller branches
The submodule on 5a66126 (D-Modem-RE's claude/awesome-curie-vuq5tj),
which has all three, and V.cvm since. The APK, the host tools and their
tests build and pass on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 21:55:50 +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 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 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 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 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 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