Skip to content
2 changes: 1 addition & 1 deletion device/cheetah/MODEM-CLIENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Two packages:
| `sit.py` | ported | The single-owner IPC0 transport: framing, token matching, indication queue (signal and physical-channel snapshots coalesced so telemetry can't crowd out an SMS reply). Two guards: the allow-list of requests this stack sends, and our do-not-send list (NV, identity, carrier lock, AT forwarding, VSIM, satellite) checked first, so an edit to the allow-list can't let one through. Dial and SMS sends need the owner's flags |
| `sit_names.py` | ours | The 602 message names, for logs |
| `bringup.py` | ported, carrier values moved to the config | The start-up order (section 1.1) |
| `data_call.py` | ported, APN from the config | Setup (983 bytes), initial attach (251), data profile (246), PDU sessions; bearer ownership recorded in RAM before each setup, never retried blindly |
| `data_call.py` | ported, APN from the config | Setup (983 bytes; no PDU session ID on cellular, as stock), initial attach (251), data profile (246); bearer ownership recorded in RAM before each setup, never retried blindly |
| `ims.py` | ported (identity strings ours) | IMS stack start, hidden-menu configuration, ADD_PDN_INFO from the IMS bearer, the registration indication |
| `radio_settings.py` | ported | NR mode byte (3 -> 0 keeps LTE; the original kept in RAM) |
| `sms_codec.py` | ported | GSM 7-bit / UCS-2 SMS-SUBMIT with concatenation, SMS-DELIVER with the SMSC prefix the modem adds, WAP push kept as bytes |
Expand Down
3 changes: 2 additions & 1 deletion device/cheetah/MODEM-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,8 @@ tools/phone-ssh 'omamobile-sit status; systemctl is-active omamobile-sitd; /usr/
# stop: the unit fails before "ready". The journal names the step: "SIM not usable: ..." (S1);
# "No ready USIM within 120 s (...)"; "Modem registration deadline exceeded" (no service, the APN, or
# the SIM not activated: check coverage and activation in the other phone); "data call did not become
# active" with its status (36 = APN refused: check the APN); a CP crash (the watcher writes
# active" with its status (Android DataFailCause numbers: 27 or 33 is a refused APN, 36
# REGULAR_DEACTIVATION); a CP crash (the watcher writes
# /var/log/omamobile/modem-crashes.log). Record step and status, then reboot before another try
# rollback: `omamobile-sit radio off` (AT+CFUN=0: deregisters; on again may stall until a reboot), then
# `systemctl stop omamobile-sitd`; or reboot (one UFS pass)
Expand Down
83 changes: 80 additions & 3 deletions device/tegu/MODEM-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ SoC within minutes. Kept on
(<https://github.com/derekross/linux-omarchy-mobile/pull/172>), five
sessions ran with no reset, the longest 30 minutes and 3759 link cycles
(G3-L1).
Left: the GNSS and CPIF drivers aren't in the published kernel, and GNSS
still starts by hand. Next: the SIM.
**The SIM (2026-11-02): registered on LTE, mobile data up, texts both
ways** on the owner's kernel, with `omamobile-modem-sit` 0.3.8 (its first
five data requests were refused with status 36 until the RIL let the
modem settle after the data permission; "SIM test results" below).
Left: the GNSS and CPIF drivers aren't in the published kernel, GNSS and
the modem still start by hand, and calls have no audio route.
The staged plan (sections F, K, U and runbooks M0.2-M6, G1-G4) is below,
with each step's results under it. Kernel branches `omamobile-tegu-modem` and `omamobile-tegu-gnssif`
(section K).
Expand Down Expand Up @@ -1905,7 +1909,8 @@ tools/phone-ssh 'omamobile-sit status; systemctl is-active omamobile-sitd; /usr/
# Not the PLMN, the carrier or any number.
# stop: the unit fails before "ready"; the journal names the step ("No ready USIM within 120 s", "Modem
# registration deadline exceeded": coverage, activation or the APN; "data call did not become active" with
# its status, 36 = APN refused; a CP crash). Record step and code, reboot before another try (SIM-5).
# its status (Android DataFailCause numbers: 36 is REGULAR_DEACTIVATION, not a refused APN, which is 27
# or 33); a CP crash). Record step and code, reboot before another try (SIM-5).
# rollback: omamobile-sit radio off (deregisters; the radio may not come back until a reboot), then
# systemctl stop omamobile-sitd; or the reboot

Expand Down Expand Up @@ -1951,6 +1956,78 @@ tools/phone-ssh 'test -d /sys/module/cpif && echo cpif-loaded || echo cpif-not-l
# pass: cpif-not-loaded; the SIM can stay in the tray
```

#### SIM test results (2026-11-02, `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`)

The prepaid nano-SIM arrived a day early and the test ran the same
afternoon, six CP starts over six boots, all attended on the charger, with
`omamobile-modem` 0.1.10 (installed with `pacman -U -dd`: the package
depends on `omamobile-device-cheetah`, which conflicts with
`omamobile-device-tegu`; the `omamobile-modem-policy` virtual planned in
raven's plan is the fix) and the carrier's published APN, IPv4v6, no
authentication, `ims = yes`, `nr = off`. No identifiers here: the carrier
is a US MVNO on a large LTE network.

- **SIM-0 to SIM-4 passed.** The NV partitions matched the 2026-10-28
backup and read `ro=1`, unmounted, before and after every boot.
- **SIM-5 passed six times:** CP ONLINE in about 9 s, UFS error handler 0.
- **SIM-6:** the first probe timed out on GET_SIM_STATUS and the CP
answered it 9.4 s later, so the probe's first request now waits 20 s
(0.3.6). Then: card state 1, applications (2, 5) and (5, 5) (a USIM and an
ISIM, both ready), radio state 10, SMSC present.
- **SIM-7 failed five times the same way, then passed.** Each time: PS
registration state 1, reject 0, RAT 14 (LTE, at home) within a few
seconds; `SET_INITIAL_ATTACH_APN` and `SET_DATA_PROFILE` error 0; NR mode
set to 0; then `SETUP_DATA_CALL` answered within 150 ms with status 36
(Android's REGULAR_DEACTIVATION, not "APN refused"), CID 1, active 0,
and `GET_DATA_CALL_LIST` empty before and after. Three changes were
tried one at a time, each on its own boot:
1. 0.3.5: no PDU session ID on cellular bearers (stock sends 0; sitd
reserved one). Still 36.
2. 0.3.7: the APN-type bitmap at 0xf1 of the setup request (stock sends
the APN's types; sitd sent 0, taken for an MTU). Still 36.
3. 0.3.8: the recording build (0.3.6) had shown that about a second
after every refusal the modem sent three IND_REG_FAILED, two
IND_NTW_STATE_CHANGED and an empty data-call list. With 0.3.8 the
same indications arrived after the data permission
(SET_MOBILE_DATA_STATE, SET_PS_SERVICE) and before the setup; the
three IND_REG_FAILED read domain CS+PS, PS, PS, each with LTE cause
10 (implicitly detached) and additional cause 0 (decoded with the
stock library's layout). Whether the permission writes trigger the
detach isn't proven; the setup succeeds once it is over. The RIL now waits until the modem has
been quiet for 3 s after the permission (at most 20 s), reads the
registration again, and then sends the setup. On its first run the
six indications came and went in the wait, the registration read 1,
0, 14 again, and the setup answered status 0, CID 1, active 1, PDP
type 3 (IPv4v6). The IMS bearer followed (status 0, CID 2, PDP type
2), AIMS registration came back "LTE, IMS voice and SMS registered",
and the RIL reported "Calls and SMS service ready".
The first two changes stay in: they match stock's requests, and the
9a's stock libraries (verified against the owner's `vendor_a.img`) write
both fields that way.
- **SIM-8 passed:** `omamobile-sit data on` brought `rmnet0` up with an
address and the default route at metric 700; three pings over it to
9.9.9.9 answered (78 ms average); an HTTPS GET over it returned 200.
- **SIM-9 passed:** the carrier's welcome text had already arrived during
SIM-7 ("SMS stored and acknowledged"), the owner's text from another
phone arrived within seconds, and a text sent from the palmtop
(`omamobile-sit sms send`) reached the owner's phone. A text sent to
the palmtop's own number was accepted ("sent") and never came back,
which is common on this network.
- **SIM-10:** no call; the 9a has no audio route.
- **SIM-11 passed:** radio off, the RIL stopped, an attended reboot
(the unit's stop powered the CP off during shutdown), then M0.1: the
six partitions unchanged, `cpif` not loaded, UFS error handler 0.

The run kept the full refused record (292 bytes: status 36, CID 1, the
IPC extension version at 132, an unidentified extension byte at 133, the
suggested retry time at 235-242 as an s64) and the raw indications of the passing run in
`logs/tegu-sim-20261102/private/` (off the repository). The open
question is what triggers the implicit detach. Stock's handlers send the
two permission requests separately (SET_PS_SERVICE's success path then
sleeps 500 ms) and its setup path doesn't send them; the libraries don't
show when Android's callers do. Sending them earlier, before the last
registration check, is a reasonable next try, with the wait kept.

**Unqualified after a passing run:** suspend with the modem on (the
inhibitor stays; M6, two reboots with the CP up: this runbook's attended
reboots count toward it but don't pass it; a power-off from Linux with the
Expand Down
Loading