Commit Graph
28 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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 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