The tests' and shared code's functions in two of eight batches (comment
lines only). doc_check.py skips only lines of annotations alone, so a
function under an annotated property (@Volatile var) needs its own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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