A switch over the transmit level: on, D-Modem-RE's DMODEM_USB_TX_GAIN=auto
sets it for each call from the remote's answer tone; off, the dB as
before. Bumps d-modem-re for it (and rings no longer hidden by caller
ID's listening).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
For a line or modem that hears the modem too faintly: the first Agere
device's remote does (V.34 asks for 7200 at most, V.22bis's carrier is
lost there) while its own samples check out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
A setting (the USB line's "Record each call") sets D-Modem-RE's
DMODEM_USB_REC to the captures folder: each call off hook to on hook a
stereo WAV (the line's, the modem's); the last 5 kept; the log screen's
Recording shares the newest. D-Modem-RE: the recording, and the Agere's
failed IN packets counted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
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
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
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
- 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
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
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
- 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
- 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
- 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
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
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
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
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
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
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
- 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