From ec5a2f9ede42cbe0db24b604b40cb6f8905ee913 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:16:23 -0647 Subject: [PATCH 1/7] omamobile-modem-sit 0.3.5: no PDU session ID on cellular bearers, as stock The palmtop's first SIM test registered on LTE and then got status 36 (REGULAR_DEACTIVATION) for the internet bearer, twice. Our setup differed from stock's in the PDU session ID: sitd reserved one with ALLOC_PDU_SESSION and sent it at 0xf6, but Android allocates one only for a bearer over Wi-Fi (IWLAN), and the 9a's own protocol library copies the framework's value, 0 on LTE and NR, into the request. Both bearers now send 0 and the modem picks the ID; an older ownership record with an allocated ID is still released on deactivation. sit-sim logs the ID it receives and the simulator test checks for 0 with no ALLOC or REL. The 0xf1 comment now says what stock puts there: the APN-type bitmap, not an MTU. It still sends zero. --- device/cheetah/MODEM-CLIENT.md | 2 +- packages/omamobile-modem-sit/lib/data_call.py | 50 ++++++++------- packages/omamobile-modem-sit/lib/ims.py | 2 +- .../test/test_data_call.py | 64 +++++++++++++------ packages/omamobile-modem-sit/test/test_sim.py | 4 ++ packages/omamobile-modem-sit/version | 2 +- tools/sit-sim | 4 +- 7 files changed, 79 insertions(+), 49 deletions(-) diff --git a/device/cheetah/MODEM-CLIENT.md b/device/cheetah/MODEM-CLIENT.md index 07ab68723..a1f504861 100644 --- a/device/cheetah/MODEM-CLIENT.md +++ b/device/cheetah/MODEM-CLIENT.md @@ -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 | diff --git a/packages/omamobile-modem-sit/lib/data_call.py b/packages/omamobile-modem-sit/lib/data_call.py index b271a97c2..868482a3e 100644 --- a/packages/omamobile-modem-sit/lib/data_call.py +++ b/packages/omamobile-modem-sit/lib/data_call.py @@ -4,7 +4,14 @@ The APN comes from /etc/omamobile/modem-sit.conf. Ownership is recorded in RAM before a setup is sent: a setup or release with an unknown outcome -keeps its record and its PDU session, and nothing is retried blindly. +keeps its record, and nothing is retried blindly. + +A cellular setup carries no PDU session ID (0), as stock's does: Android's +data stack reserves one (ALLOC_PDU_SESSION) only for a bearer carried over +Wi-Fi (IWLAN), and stock's builder copies the framework's value into the +request unchanged, so on LTE and NR the modem picks the ID itself. Records +from 0.3.4 and earlier hold an allocated ID, which deactivate() still +releases. """ import json import os @@ -62,7 +69,8 @@ def owned_ids(): state, _ = paths(cid) if state.exists(): owned = json.loads(state.read_text()) - if owned.get('cid') != cid or not 1 <= owned.get('session', 0) <= 15: + # session 0: no PDU session ID was sent (the modem chose one). + if owned.get('cid') != cid or not 0 <= owned.get('session', -1) <= 15: raise RuntimeError('invalid bearer ownership record') result.add(cid) return result @@ -88,8 +96,11 @@ def setup_payload(cid, radio_technology, pdu_session, apn, *, ims=False, ip_type full[0xda] = IP_TYPES['ipv6'] if ims else IP_TYPES[ip_type] full[0xdb] = 2 if ims else 0 # IPv6 P-CSCF request # No handover addresses, roaming override or slice. - # MTU at 0xf1 stays zero (network/default choice). + # 0xf1 (u32) is not an MTU: stock's builder writes the APN-type bitmap + # there (the field ApnSetting::CanHandleType tests). It stays zero, as + # the stack this was ported from sent it. full[0xf5] = 2 # stock caller selects the v3/983-byte form + # 0 on cellular: no PDU session ID, the modem picks one (module docstring). struct.pack_into(' Date: Mon, 2 Nov 2026 15:16:23 -0647 Subject: [PATCH 2/7] MODEM-PLAN: status 36 is a regular deactivation, not a refused APN The modem reports Android DataFailCause numbers, which stock's RIL passes through unchanged. A refused APN is 27 or 33. 36 is REGULAR_DEACTIVATION. The 9a's runbook pointed at the APN for the status it got on 2026-11-02. --- device/cheetah/MODEM-PLAN.md | 3 ++- device/tegu/MODEM-PLAN.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/device/cheetah/MODEM-PLAN.md b/device/cheetah/MODEM-PLAN.md index a0b1a3c56..417a82c15 100644 --- a/device/cheetah/MODEM-PLAN.md +++ b/device/cheetah/MODEM-PLAN.md @@ -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) diff --git a/device/tegu/MODEM-PLAN.md b/device/tegu/MODEM-PLAN.md index ff631ed46..f3d95ae17 100644 --- a/device/tegu/MODEM-PLAN.md +++ b/device/tegu/MODEM-PLAN.md @@ -1905,7 +1905,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 From 7a79fb67697dccc4a2235d6c7d75bdf697a5c351 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:27:47 -0647 Subject: [PATCH 3/7] omamobile-modem-sit 0.3.6: keep a refused setup's record, listen after it, and snapshot around the NR change A refused SETUP_DATA_CALL answered "36" three times on the palmtop on 2026-11-02 and nothing else was kept: the record beyond its first five bytes was dropped, and the two or three messages the modem sent about a second later were lost because sitd had already closed the channel. Now the whole record goes to a private file in RAM, the channel stays open five seconds while each indication is logged by name and length (a data-call list change decoded to status, CID, active and PDP type), and the registration state and data-call count are logged before and after the NR change, so the next refusal says more than a number. The probe's first request waits 20 s: the CP answered GET_SIM_STATUS 9.4 s after ONLINE. --- packages/omamobile-modem-sit/lib/bringup.py | 19 +++++++++ packages/omamobile-modem-sit/lib/data_call.py | 40 +++++++++++++++++++ packages/omamobile-modem-sit/lib/service.py | 3 +- .../omamobile-modem-sit/test/test_bringup.py | 1 + .../test/test_data_call.py | 26 ++++++++++++ packages/omamobile-modem-sit/version | 2 +- 6 files changed, 89 insertions(+), 2 deletions(-) diff --git a/packages/omamobile-modem-sit/lib/bringup.py b/packages/omamobile-modem-sit/lib/bringup.py index 718e7054b..9be800d65 100644 --- a/packages/omamobile-modem-sit/lib/bringup.py +++ b/packages/omamobile-modem-sit/lib/bringup.py @@ -58,6 +58,23 @@ def sim_lock(payload): return LOCKS.get(app[1]) + +def data_snapshot(client, label): + """Registration and the data-call list, as the modem reports them, before + and after the NR change: whether a bearer is ever listed before the + setup, and whether the change makes one appear or disappear. States, + codes and counts only.""" + try: + reg = client.request(0x0701) + calls = client.request(0x0602) + except (TimeoutError, RuntimeError) as error: + print(f'{label}: snapshot unavailable: {error}', flush=True) + return + state = (reg[0], reg[1], reg[3]) if len(reg) >= 4 else tuple(reg[:4]) + print(f'{label}: PS state, reject, RAT {state}; data calls listed {calls[0] if calls else "none"}', + flush=True) + + def packet_registered(payload, *, lte=False): return len(payload) >= 4 and payload[0] in (1, 5) and (not lte or payload[3] == 14) @@ -137,9 +154,11 @@ def usim_ready(): print('Startup: waiting for packet registration', flush=True) timeout = net.getint('register_timeout', 180) wait_for(service, lambda: packet_registered(client.request(0x0701)), timeout, stopped) + data_snapshot(client, 'before the NR change') if net.get('nr', 'off') == 'off': nr_mode(client) wait_for(service, lambda: packet_registered(client.request(0x0701), lte=True), 120, stopped) + data_snapshot(client, 'after the NR change') service.stage('data') activate(client, apn, ip_type=ip_type) service.pump() diff --git a/packages/omamobile-modem-sit/lib/data_call.py b/packages/omamobile-modem-sit/lib/data_call.py index 868482a3e..04a08d562 100644 --- a/packages/omamobile-modem-sit/lib/data_call.py +++ b/packages/omamobile-modem-sit/lib/data_call.py @@ -18,8 +18,10 @@ from pathlib import Path import re import struct +import time from paths import RUN +from sit_names import NAMES STATE = RUN / 'data-session.json' RESPONSE = RUN / 'data-call-response.bin' @@ -142,6 +144,38 @@ def provision_default_profile(client, apn, ip_type='ipv4v6'): print('default data profile accepted', flush=True) + +def listen_after_failure(client, seconds=5): + """After a refused setup, keep the channel open a few seconds and log + what the modem sends next: on 2026-11-02 two or three messages arrived + about a second after each status 36 and were dropped because the channel + had already closed. Message names and lengths only; for a data-call list + change, the per-record status, CID, active and PDP type, nothing else.""" + deadline = time.monotonic() + seconds + seen = 0 + while True: + remaining = deadline - time.monotonic() + if remaining <= 0: + break + packet = client.next_indication(min(1, remaining)) + if packet is None: + continue + seen += 1 + message, length = struct.unpack_from(' 1: + count = payload[0] + size = (len(payload) - 1) // count + records = [] + for index in range(count): + record = payload[1 + index * size:1 + (index + 1) * size] + if len(record) >= 5: + records.append(struct.unpack_from('= 3 and sim[2] <= 8 and len(sim) >= 3 + sim[2] * 63: print('SIM card state', sim[0], 'applications', [(sim[i], sim[i + 1]) for i in range(3, 3 + sim[2] * 63, 63)], flush=True) diff --git a/packages/omamobile-modem-sit/test/test_bringup.py b/packages/omamobile-modem-sit/test/test_bringup.py index e8f3e1911..a347908b7 100644 --- a/packages/omamobile-modem-sit/test/test_bringup.py +++ b/packages/omamobile-modem-sit/test/test_bringup.py @@ -52,6 +52,7 @@ def test_failed_data_setup_never_attempts_ims(self): with patch.object(bringup, 'wait_for'), patch.object(bringup, 'radio'), \ patch.object(bringup, 'initial_attach'), patch.object(bringup, 'provision_default_profile'), \ patch.object(bringup, 'nr_mode'), patch.object(bringup, 'activate', side_effect=TimeoutError), \ + patch.object(bringup, 'data_snapshot'), \ patch.object(bringup, 'start_stack') as stack, patch.object(bringup, 'register') as register: with self.assertRaises(TimeoutError): bringup.start(service, SETTINGS) diff --git a/packages/omamobile-modem-sit/test/test_data_call.py b/packages/omamobile-modem-sit/test/test_data_call.py index 278a9b5e3..a5214248a 100644 --- a/packages/omamobile-modem-sit/test/test_data_call.py +++ b/packages/omamobile-modem-sit/test/test_data_call.py @@ -19,6 +19,9 @@ def __init__(self, status=0, fail_release=False): self.status = status self.fail_release = fail_release + def next_indication(self, timeout=1): + return None + def request(self, ident, payload=b'', **kwargs): self.sent.append((ident, payload)) if ident == 0x0701: @@ -63,6 +66,29 @@ def test_rejected_setup_leaves_no_ownership(self): self.assertFalse(self.state.exists()) self.assertFalse(self.response.exists()) + def test_rejected_setup_keeps_the_record_and_listens(self): + # The refused record goes to a private file, and the modem's next + # messages are logged by name with a data-call list decoded to + # status, CID, active and PDP type. + modem = Modem(status=36) + record = bytearray(292) + struct.pack_into(' Date: Mon, 2 Nov 2026 15:29:52 -0647 Subject: [PATCH 4/7] omamobile-modem-sit 0.3.7: send the APN-type bitmap in SETUP_DATA_CALL, as stock The 983-byte setup request carries the APN's supported-types bitmap as a u32 at 0xf1: the Pixel 9a's stock builder copies ApnSetting's mask there (vendor.radio.base ApnSetting::SetSupportedTypesBitmask, member +0x160; the stream library's builders write it at 0xf1). Ours sent 0 there, under a comment calling it an MTU, and the 9a's modem answered every internet setup with status 36 (REGULAR_DEACTIVATION) on 2026-11-02, three times, with the session ID fixed in between. The internet bearer now sends DEFAULT (1) and the IMS bearer IMS (0x40). The attach request copies the setup's first 233 bytes, so it keeps bytes 0xf1 to 0xf4 zero explicitly: stock's 251-byte attach builder leaves them zero. Its roaming PDP type at 0xf8 is now named for what it is. --- packages/omamobile-modem-sit/lib/data_call.py | 16 +++++++++++----- .../omamobile-modem-sit/test/test_data_call.py | 11 +++++++++++ packages/omamobile-modem-sit/version | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/omamobile-modem-sit/lib/data_call.py b/packages/omamobile-modem-sit/lib/data_call.py index 04a08d562..65a5e0c75 100644 --- a/packages/omamobile-modem-sit/lib/data_call.py +++ b/packages/omamobile-modem-sit/lib/data_call.py @@ -98,9 +98,13 @@ def setup_payload(cid, radio_technology, pdu_session, apn, *, ims=False, ip_type full[0xda] = IP_TYPES['ipv6'] if ims else IP_TYPES[ip_type] full[0xdb] = 2 if ims else 0 # IPv6 P-CSCF request # No handover addresses, roaming override or slice. - # 0xf1 (u32) is not an MTU: stock's builder writes the APN-type bitmap - # there (the field ApnSetting::CanHandleType tests). It stays zero, as - # the stack this was ported from sent it. + # 0xf1 (u32): the APN-type bitmap, as stock's builder copies it from + # ApnSetting's supported types (vendor.radio.base + # ApnSetting::SetSupportedTypesBitmask, member +0x160; the 983-byte + # builder writes it at 0xf1). DEFAULT for the internet bearer, IMS for + # the IMS one. Until 0.3.6 this was sent as 0 (taken for an MTU), and + # the 9a's modem answered every internet setup with status 36. + struct.pack_into(' Date: Mon, 2 Nov 2026 15:38:31 -0647 Subject: [PATCH 5/7] omamobile-modem-sit 0.3.8: let the modem settle after the data permission before the setup On 2026-11-02 five setups in a row were answered with status 36 within 150 ms, each followed within a second by three IND_REG_FAILED, two IND_NTW_STATE_CHANGED and an empty data-call list: the modem was re-attaching around the request, whatever its cause. The setup now waits until the modem has sent nothing for three seconds after the data permission (at most twenty), logging each indication by name and keeping the raw packets in a private file for decoding, then reads the registration again and waits up to a minute for it if it was lost, and only then sends the setup. --- packages/omamobile-modem-sit/lib/data_call.py | 83 ++++++++++++++++--- .../test/test_data_call.py | 27 +++++- packages/omamobile-modem-sit/version | 2 +- 3 files changed, 96 insertions(+), 16 deletions(-) diff --git a/packages/omamobile-modem-sit/lib/data_call.py b/packages/omamobile-modem-sit/lib/data_call.py index 65a5e0c75..5a74f0114 100644 --- a/packages/omamobile-modem-sit/lib/data_call.py +++ b/packages/omamobile-modem-sit/lib/data_call.py @@ -151,6 +151,61 @@ def provision_default_profile(client, apn, ip_type='ipv4v6'): + +# After the data permission is switched on, the modem is given time to say +# what it does about it before the setup goes out: on 2026-11-02 every setup +# was answered 36 within 150 ms and was followed within a second by three +# IND_REG_FAILED and two IND_NTW_STATE_CHANGED, so the modem was re-attaching +# around the request. The wait ends after SETTLE_QUIET seconds without an +# indication, or at SETTLE_LIMIT. +SETTLE_QUIET = 3 +SETTLE_LIMIT = 20 + + +def keep_packet(packet): + """Append a raw indication to a private file in RAM (it may carry the + PLMN or cell identity), length-prefixed, for decoding later.""" + path = RESPONSE.with_name('indications.bin') + fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_APPEND, 0o600) + try: + os.write(fd, struct.pack(' 1: + count = payload[0] + size = (len(payload) - 1) // count + records = [] + for index in range(count): + record = payload[1 + index * size:1 + (index + 1) * size] + if len(record) >= 5: + records.append(struct.unpack_from('= deadline or now - last >= SETTLE_QUIET: + break + packet = client.next_indication(min(.5, deadline - now)) + if packet is None: + continue + seen += 1 + last = time.monotonic() + keep_packet(packet) + print(f'{label}: {describe(packet)}', flush=True) + print(f'{label}: {seen} indication(s), then quiet' if seen else f'{label}: quiet', flush=True) + def listen_after_failure(client, seconds=5): """After a refused setup, keep the channel open a few seconds and log what the modem sends next: on 2026-11-02 two or three messages arrived @@ -167,19 +222,8 @@ def listen_after_failure(client, seconds=5): if packet is None: continue seen += 1 - message, length = struct.unpack_from(' 1: - count = payload[0] - size = (len(payload) - 1) // count - records = [] - for index in range(count): - record = payload[1 + index * size:1 + (index + 1) * size] - if len(record) >= 5: - records.append(struct.unpack_from('= 4 and state[0] in (1, 5): + break + if second == 0: + print('registration lost after allowing data; waiting for it', flush=True) + time.sleep(1) + else: + raise RuntimeError('PS network is not registered after allowing data') + print('registration before the setup: PS state, reject, RAT', (state[0], state[1], state[3]), flush=True) # No ALLOC_PDU_SESSION on cellular (module docstring): session 0. session = 0 # Persist ownership before setup. A timeout has an unknown outcome: the diff --git a/packages/omamobile-modem-sit/test/test_data_call.py b/packages/omamobile-modem-sit/test/test_data_call.py index f1128b3fa..e7858c38d 100644 --- a/packages/omamobile-modem-sit/test/test_data_call.py +++ b/packages/omamobile-modem-sit/test/test_data_call.py @@ -48,7 +48,9 @@ def setUp(self): self.state = root / 'owned.json' self.response = root / 'response.bin' self.patches = [patch.object(data_call, 'STATE', self.state), - patch.object(data_call, 'RESPONSE', self.response)] + patch.object(data_call, 'RESPONSE', self.response), + patch.object(data_call, 'SETTLE_QUIET', 0), + patch.object(data_call, 'SETTLE_LIMIT', 0)] for item in self.patches: item.start() @@ -76,7 +78,8 @@ def test_rejected_setup_keeps_the_record_and_listens(self): indication = struct.pack(' Date: Mon, 2 Nov 2026 16:00:15 -0647 Subject: [PATCH 6/7] device/tegu MODEM-PLAN, DEVICES: the SIM test passed on 2026-11-02 Six CP starts over six boots, all attended: the SIM read, LTE registration every time, five data requests refused with status 36, then, with the RIL letting the modem settle after the data permission, the internet and IMS bearers up, mobile data over rmnet0, and texts both ways. The record is under the runbook; the Modem cell stays WIP with what works on the owner's kernel. --- device/tegu/MODEM-PLAN.md | 78 ++++++++++++++++++++++++++++++++++++++- docs/DEVICES.md | 2 +- 2 files changed, 77 insertions(+), 3 deletions(-) diff --git a/device/tegu/MODEM-PLAN.md b/device/tegu/MODEM-PLAN.md index f3d95ae17..58009f050 100644 --- a/device/tegu/MODEM-PLAN.md +++ b/device/tegu/MODEM-PLAN.md @@ -20,8 +20,12 @@ SoC within minutes. Kept on (), 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). @@ -1952,6 +1956,76 @@ 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, and that it was + quiet before the data permission: it re-attaches when + SET_MOBILE_DATA_STATE and SET_PS_SERVICE are written, and the setup + always landed inside that. 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-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 one open +question is what the modem's re-attach after the data permission is +about: the IND_REG_FAILED causes are in that file, decodable with the +layout from the stock library (domain at 0x0e, main cause 0x0f, +additional cause 0x10). Stock sends the data permission at radio-on, long +before any setup, so the better fix may be to move those two requests +earlier and keep the wait as a safety net. + **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 diff --git a/docs/DEVICES.md b/docs/DEVICES.md index 4f4adbbd4..d480b273c 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -25,7 +25,7 @@ The status of each device, as verified on real hardware. Rows in the matrix have | Pixel 6 | oriole | gs101 (Tensor G1) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); native test image on one phone; slot B marked successful and `vbmeta_b` verification turned off, both without project approval; see notes) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); guarded `userdata` root on test image) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); connected output on test image) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); Panfrost render node present) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); touchscreen detected; input not checked by smoke) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); gpio-keys detected; input not checked by smoke) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); USB network and SSH on test image) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); link up; traffic not checked by smoke) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); controller powered; pairing not checked) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); charge and temperature reported) | WIP ([unpublished kernel/packages](../device/oriole/NOTES.md#2026-10-31-build-provenance-and-recovery-limits); charging reported; control not checked) | no | no | no | no | no | no | no | no | no | no | no | | Pixel 4 | flame | SM8150 (Snapdragon 855) | testing (temporary RAM boot; [notes](../device/flame/BRINGUP-M1.md)) | testing (RAM probe; all UFS read-only) | testing (1080x2280 console; software desktop in separate Arch payload) | testing (separate Arch payload; FD640 contexts, llvmpipe desktop) | testing (separate Arch payload; events and PIN unlock verified) | no | testing (NCM + ACM + SSH; sustained transfers can disconnect) | testing (guarded RAM scan; association untested) | no | no | no | no | no | no | - | no | no | no | no | no | no | - | | Pixel 4 XL ([notes](../device/coral/NOTES.md)) | coral | SM8150 (Snapdragon 855) | WIP (direct ABL v2 boot on the test handset's slot A; slot-B install and ยง3.1 entry pending; [notes](../device/coral/BRINGUP-M1.md)) | testing (read-only `blockdev` guard + RAM `overlayfs`) | testing (1440x3040@60Hz S6E3HC2 DSC 1.1 KMS, DPMS, brightness) | testing (Adreno 640 / FD640 Mesa Freedreno, Hyprland) | testing (FTS SPI multitouch + read-only flash guard) | testing (power via `qcom-pon` + volume via `gpio-keys`) | testing (CDC ECM + ACM + SSH; stays up with host USB switched off) | testing (`WCN3990` `ath10k_snoc` + `rmtfs -r`, WPA2/DHCP/HTTPS; radio sessions ran before the modem baseline) | WIP (`WCN3990` `hci_qca` `hci0` up + BLE scan; audio/pairing open) | WIP (PM8150B ADC `VBAT_SNS` voltage + FG temp; aftermarket pack on test unit: no reply from `1-0036`) | testing (PM8150B SMB5 charger with `4.20 V` / `500 mA` kernel clamp) | testing (`CS40L25A` I2C click waveform) | testing (PM8150L flash LEDs + quick-settings tile) | no | - | testing (QDSP6 + dual `CS35L36` amps capped at `-26 dB` + `IA8508` SPI mic DSP) | testing (`SLPI` + `fastrpc` + RAM-backed `hexagonrpcd` + QMI SSC: 7 sensors + Soli radar) | WIP (`MPSS` boots with `rmtfs -r` + patched `tqftpserv`, SIM detected; no IPA/voice yet; radio sessions ran before the modem baseline) | no | testing (`CAMSS` + `IMX363`, `IMX481`, `IMX520`, dual `OV7251` NIR; `libcamera` softISP) | no | - | -| Pixel 9a ([notes](../device/tegu/NOTES.md)) | tegu | zumapro (Tensor G4) | works ([#28](https://github.com/derekross/omarchy-mobile/issues/28): native boot from slot B, the Arch root on `userdata`, `omamobile-device-tegu`; slot B was marked successful by hand on 2026-10-28 with the `devinfo` write approved on 2026-10-22, now on hold ([#125](https://github.com/derekross/omarchy-mobile/pull/125)), unmarked by the 10-31 fastboot recovery and marked again on 2026-10-31 during the hold ([record](../device/tegu/NOTES.md#2026-10-31-a-fastboot-flash-of-slot-b-cleared-its-successful-mark-and-b-was-marked-again)), and the package does not mark it; unpublished kernel: the SoC and board device tree is [kernel #81](https://github.com/derekross/linux-omarchy-mobile/pull/81), merged; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (UFS behind the read-only guard; unpublished kernel; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (120 Hz through gs-decon; the panel driver [kernel #89](https://github.com/derekross/linux-omarchy-mobile/pull/89), 120 Hz [kernel #88](https://github.com/derekross/linux-omarchy-mobile/pull/88), merged, the display DT, merged with [kernel #96](https://github.com/derekross/linux-omarchy-mobile/pull/96); brightness, DPMS off and on and the 60/120 Hz switch on the boot of [kernel #125](https://github.com/derekross/linux-omarchy-mobile/pull/125), merged, which also checks the panel's ID; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on), [brightness record](../device/tegu/NOTES.md#2026-11-01-afternoon-and-evening-wi-fi-from-the-package-the-wake-and-the-replug-storage-idle-the-panel-id)) | works (Panthor, the desktop renders, runtime suspend when idle; this boot runs at a fixed 160 MHz, so frequency scaling and the GPU thermal zone count as in review, [kernel #85](https://github.com/derekross/linux-omarchy-mobile/pull/85) in review, [kernel #87](https://github.com/derekross/linux-omarchy-mobile/pull/87) in review; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (Synaptics S3908 over SPI, [kernel #81](https://github.com/derekross/linux-omarchy-mobile/pull/81), merged; survives sleep, [kernel #82](https://github.com/derekross/linux-omarchy-mobile/pull/82), merged; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (gpio-keys: power and volume; the power key wakes from sleep; unpublished kernel; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (CDC NCM and SSH; reconnects after a replug, `omamobile-tegu-usb-rescue`, also after a replug the gadget didn't see ([#280](https://github.com/derekross/omarchy-mobile/pull/280); [the replug record](../device/tegu/NOTES.md#2026-10-28-what-the-device-tables-claims-rest-on)); [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (BCM4383 on PCIe channel 1 through the shared gs201 host and zuma PHY, [kernel #178](https://github.com/derekross/linux-omarchy-mobile/pull/178) on [kernel #156](https://github.com/derekross/linux-omarchy-mobile/pull/156), in review, and brcmfmac, [kernel #56](https://github.com/derekross/linux-omarchy-mobile/pull/56) in review; started at boot by `omamobile-device-tegu` 0.2.4 ([#238](https://github.com/derekross/omarchy-mobile/pull/238)) with the extractor's firmware; WPA2 with iwd, kept loaded across sleep by the package's sleep hook; [record](../device/tegu/NOTES.md#2026-11-01-afternoon-and-evening-wi-fi-from-the-package-the-wake-and-the-replug-storage-idle-the-panel-id)) | works (hci_uart on the bootloader's address, BlueZ, A2DP; [kernel #94](https://github.com/derekross/linux-omarchy-mobile/pull/94); unpublished kernel; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (MAX77779 gauge with temperature, current and time estimates through UPower; [kernel #66](https://github.com/derekross/linux-omarchy-mobile/pull/66); unpublished kernel; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (the MAX77779 charger binds from the device tree, [kernel #161](https://github.com/derekross/linux-omarchy-mobile/pull/161), merged, built by [#227](https://github.com/derekross/omarchy-mobile/pull/227); the charge limit in `omamobile-device-tegu` 0.2.3 holds charging off at the limit through `charge_behaviour` and lets it run again 5 below; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | works (CS40L26A through feedbackd, with brownout prevention, [kernel #95](https://github.com/derekross/linux-omarchy-mobile/pull/95); its DT [kernel #96](https://github.com/derekross/linux-omarchy-mobile/pull/96), merged; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (LM3644, 25 steps to 75 mA, quick-settings tile; its DT [kernel #96](https://github.com/derekross/linux-omarchy-mobile/pull/96), merged; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | testing (Omarchy's Location switch serves fixes from GPS, Galileo, BeiDou and GLONASS once the modem is up, started by hand: a 30-minute session through the switch on 2026-11-01 (omamobile-gnss 0.2.5's start, the modem link left to cycle) ran clean, 1763 of 1765 GGA sentences fixed, first fix 37 s after a client connected; needs [kernel #150](https://github.com/derekross/linux-omarchy-mobile/pull/150), merged, the PERIC0 clock fix [kernel #172](https://github.com/derekross/linux-omarchy-mobile/pull/172) in review (without it the modem link hung the palmtop within minutes) and [#114](https://github.com/derekross/omarchy-mobile/pull/114); [plan](../device/tegu/MODEM-PLAN.md), record with [#202](https://github.com/derekross/omarchy-mobile/pull/202)) | works (audio and sensor DSP through the GSA and Trusty, 93 services, started at boot by `omamobile-device-tegu` 0.2.3 from the device tree, [kernel #162](https://github.com/derekross/linux-omarchy-mobile/pull/162) in review; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | works (the TAS2572 amplifiers and the microphone through the AoC card and PipeWire, at boot with the AoC: a tone from the speaker, the microphone at -32 dBFS; speakers at a -10 dB ceiling; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | works (accelerometer, light, proximity, compass and gyroscope through the AoC and the sensor proxy, at boot with the AoC; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | WIP (ONLINE with IPC on an unpublished kernel, no SIM yet; [plan](../device/tegu/MODEM-PLAN.md)) | works (NXP ST54L through nxp-nci, its clock pad from the PMU ([kernel #104](https://github.com/derekross/linux-omarchy-mobile/pull/104) and [kernel #105](https://github.com/derekross/linux-omarchy-mobile/pull/105), merged, with [kernel #131](https://github.com/derekross/linux-omarchy-mobile/pull/131), merged), loaded at boot by `omamobile-device-tegu` 0.2.3 with neard and the link opener: polls with no I2C errors and read a payment card; polling stops before sleep; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | works (main, ultrawide and front from the device tree, [kernel #164](https://github.com/derekross/linux-omarchy-mobile/pull/164) in review, with [kernel #63](https://github.com/derekross/linux-omarchy-mobile/pull/63) and [kernel #103](https://github.com/derekross/linux-omarchy-mobile/pull/103) in review: their drivers load at boot with nothing by hand, libcamera lists all three, and each streams, main at 19 fps and the others at 30 fps at 1280x960; basic picture quality through libcamera's software ISP; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | testing (s2idle when asked for, or through the shell's auto-sleep with the `omamobile-sleep` toggle on, which ships off; the power key lights the lock screen on the first press ([#268](https://github.com/derekross/omarchy-mobile/pull/268), [#275](https://github.com/derekross/omarchy-mobile/pull/275)), and the RTC wakes it; on 2026-11-01 thirty attended 120 s sleeps ([plan](../device/tegu/SLEEP-PLAN.md) S1) and a day of real use with auto-sleep on ([record](../device/tegu/NOTES.md#2026-11-01-afternoon-and-evening-wi-fi-from-the-package-the-wake-and-the-replug-storage-idle-the-panel-id)) all woke, but five test sleeps from 10-28 to the morning of 11-01 did not (one in 21 on the clock-fix kernel), so sleep tests stay attended ([plan](../device/tegu/SLEEP-PLAN.md) S1); the drain is about 300 mA asleep, the same as awake with the screen off, because nothing below the CPUs sleeps yet; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (opt-in) (enrolls, matches, refuses other fingers and unlocks the lock screen through Trusty and `omamobile-fingerprint`, 2026-10-29; the sensor binds from the device tree, [kernel #165](https://github.com/derekross/linux-omarchy-mobile/pull/165) in review, with [kernel #126](https://github.com/derekross/linux-omarchy-mobile/pull/126), merged; opt-in as on the 7 Pro, because the service's first run writes Trusty's secure storage; [plan](../device/tegu/FINGERPRINT-PLAN.md), [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | +| Pixel 9a ([notes](../device/tegu/NOTES.md)) | tegu | zumapro (Tensor G4) | works ([#28](https://github.com/derekross/omarchy-mobile/issues/28): native boot from slot B, the Arch root on `userdata`, `omamobile-device-tegu`; slot B was marked successful by hand on 2026-10-28 with the `devinfo` write approved on 2026-10-22, now on hold ([#125](https://github.com/derekross/omarchy-mobile/pull/125)), unmarked by the 10-31 fastboot recovery and marked again on 2026-10-31 during the hold ([record](../device/tegu/NOTES.md#2026-10-31-a-fastboot-flash-of-slot-b-cleared-its-successful-mark-and-b-was-marked-again)), and the package does not mark it; unpublished kernel: the SoC and board device tree is [kernel #81](https://github.com/derekross/linux-omarchy-mobile/pull/81), merged; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (UFS behind the read-only guard; unpublished kernel; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (120 Hz through gs-decon; the panel driver [kernel #89](https://github.com/derekross/linux-omarchy-mobile/pull/89), 120 Hz [kernel #88](https://github.com/derekross/linux-omarchy-mobile/pull/88), merged, the display DT, merged with [kernel #96](https://github.com/derekross/linux-omarchy-mobile/pull/96); brightness, DPMS off and on and the 60/120 Hz switch on the boot of [kernel #125](https://github.com/derekross/linux-omarchy-mobile/pull/125), merged, which also checks the panel's ID; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on), [brightness record](../device/tegu/NOTES.md#2026-11-01-afternoon-and-evening-wi-fi-from-the-package-the-wake-and-the-replug-storage-idle-the-panel-id)) | works (Panthor, the desktop renders, runtime suspend when idle; this boot runs at a fixed 160 MHz, so frequency scaling and the GPU thermal zone count as in review, [kernel #85](https://github.com/derekross/linux-omarchy-mobile/pull/85) in review, [kernel #87](https://github.com/derekross/linux-omarchy-mobile/pull/87) in review; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (Synaptics S3908 over SPI, [kernel #81](https://github.com/derekross/linux-omarchy-mobile/pull/81), merged; survives sleep, [kernel #82](https://github.com/derekross/linux-omarchy-mobile/pull/82), merged; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (gpio-keys: power and volume; the power key wakes from sleep; unpublished kernel; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (CDC NCM and SSH; reconnects after a replug, `omamobile-tegu-usb-rescue`, also after a replug the gadget didn't see ([#280](https://github.com/derekross/omarchy-mobile/pull/280); [the replug record](../device/tegu/NOTES.md#2026-10-28-what-the-device-tables-claims-rest-on)); [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (BCM4383 on PCIe channel 1 through the shared gs201 host and zuma PHY, [kernel #178](https://github.com/derekross/linux-omarchy-mobile/pull/178) on [kernel #156](https://github.com/derekross/linux-omarchy-mobile/pull/156), in review, and brcmfmac, [kernel #56](https://github.com/derekross/linux-omarchy-mobile/pull/56) in review; started at boot by `omamobile-device-tegu` 0.2.4 ([#238](https://github.com/derekross/omarchy-mobile/pull/238)) with the extractor's firmware; WPA2 with iwd, kept loaded across sleep by the package's sleep hook; [record](../device/tegu/NOTES.md#2026-11-01-afternoon-and-evening-wi-fi-from-the-package-the-wake-and-the-replug-storage-idle-the-panel-id)) | works (hci_uart on the bootloader's address, BlueZ, A2DP; [kernel #94](https://github.com/derekross/linux-omarchy-mobile/pull/94); unpublished kernel; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (MAX77779 gauge with temperature, current and time estimates through UPower; [kernel #66](https://github.com/derekross/linux-omarchy-mobile/pull/66); unpublished kernel; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (the MAX77779 charger binds from the device tree, [kernel #161](https://github.com/derekross/linux-omarchy-mobile/pull/161), merged, built by [#227](https://github.com/derekross/omarchy-mobile/pull/227); the charge limit in `omamobile-device-tegu` 0.2.3 holds charging off at the limit through `charge_behaviour` and lets it run again 5 below; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | works (CS40L26A through feedbackd, with brownout prevention, [kernel #95](https://github.com/derekross/linux-omarchy-mobile/pull/95); its DT [kernel #96](https://github.com/derekross/linux-omarchy-mobile/pull/96), merged; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (LM3644, 25 steps to 75 mA, quick-settings tile; its DT [kernel #96](https://github.com/derekross/linux-omarchy-mobile/pull/96), merged; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | testing (Omarchy's Location switch serves fixes from GPS, Galileo, BeiDou and GLONASS once the modem is up, started by hand: a 30-minute session through the switch on 2026-11-01 (omamobile-gnss 0.2.5's start, the modem link left to cycle) ran clean, 1763 of 1765 GGA sentences fixed, first fix 37 s after a client connected; needs [kernel #150](https://github.com/derekross/linux-omarchy-mobile/pull/150), merged, the PERIC0 clock fix [kernel #172](https://github.com/derekross/linux-omarchy-mobile/pull/172) in review (without it the modem link hung the palmtop within minutes) and [#114](https://github.com/derekross/omarchy-mobile/pull/114); [plan](../device/tegu/MODEM-PLAN.md), record with [#202](https://github.com/derekross/omarchy-mobile/pull/202)) | works (audio and sensor DSP through the GSA and Trusty, 93 services, started at boot by `omamobile-device-tegu` 0.2.3 from the device tree, [kernel #162](https://github.com/derekross/linux-omarchy-mobile/pull/162) in review; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | works (the TAS2572 amplifiers and the microphone through the AoC card and PipeWire, at boot with the AoC: a tone from the speaker, the microphone at -32 dBFS; speakers at a -10 dB ceiling; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | works (accelerometer, light, proximity, compass and gyroscope through the AoC and the sensor proxy, at boot with the AoC; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | WIP (on the owner's kernel, 2026-11-02: registered on LTE, mobile data over `rmnet0` and texts both ways with `omamobile-modem-sit` 0.3.8 ([#356](https://github.com/derekross/omarchy-mobile/pull/356)); the package doesn't start the modem, CPIF isn't in the published kernel, and calls have no audio route; [plan](../device/tegu/MODEM-PLAN.md), [record](../device/tegu/MODEM-PLAN.md#sim-test-results-2026-11-02-730-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty)) | works (NXP ST54L through nxp-nci, its clock pad from the PMU ([kernel #104](https://github.com/derekross/linux-omarchy-mobile/pull/104) and [kernel #105](https://github.com/derekross/linux-omarchy-mobile/pull/105), merged, with [kernel #131](https://github.com/derekross/linux-omarchy-mobile/pull/131), merged), loaded at boot by `omamobile-device-tegu` 0.2.3 with neard and the link opener: polls with no I2C errors and read a payment card; polling stops before sleep; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | works (main, ultrawide and front from the device tree, [kernel #164](https://github.com/derekross/linux-omarchy-mobile/pull/164) in review, with [kernel #63](https://github.com/derekross/linux-omarchy-mobile/pull/63) and [kernel #103](https://github.com/derekross/linux-omarchy-mobile/pull/103) in review: their drivers load at boot with nothing by hand, libcamera lists all three, and each streams, main at 19 fps and the others at 30 fps at 1280x960; basic picture quality through libcamera's software ISP; [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | testing (s2idle when asked for, or through the shell's auto-sleep with the `omamobile-sleep` toggle on, which ships off; the power key lights the lock screen on the first press ([#268](https://github.com/derekross/omarchy-mobile/pull/268), [#275](https://github.com/derekross/omarchy-mobile/pull/275)), and the RTC wakes it; on 2026-11-01 thirty attended 120 s sleeps ([plan](../device/tegu/SLEEP-PLAN.md) S1) and a day of real use with auto-sleep on ([record](../device/tegu/NOTES.md#2026-11-01-afternoon-and-evening-wi-fi-from-the-package-the-wake-and-the-replug-storage-idle-the-panel-id)) all woke, but five test sleeps from 10-28 to the morning of 11-01 did not (one in 21 on the clock-fix kernel), so sleep tests stay attended ([plan](../device/tegu/SLEEP-PLAN.md) S1); the drain is about 300 mA asleep, the same as awake with the screen off, because nothing below the CPUs sleeps yet; [record](../device/tegu/NOTES.md#2026-10-29-the-device-package-boot-and-what-this-row-rests-on)) | works (opt-in) (enrolls, matches, refuses other fingers and unlocks the lock screen through Trusty and `omamobile-fingerprint`, 2026-10-29; the sensor binds from the device tree, [kernel #165](https://github.com/derekross/linux-omarchy-mobile/pull/165) in review, with [kernel #126](https://github.com/derekross/linux-omarchy-mobile/pull/126), merged; opt-in as on the 7 Pro, because the service's first run writes Trusty's secure storage; [plan](../device/tegu/FINGERPRINT-PLAN.md), [record](../device/tegu/NOTES.md#2026-10-31-and-11-01-every-testing-row-on-a-published-style-kernel)) | | Pixel 8 Pro ([notes](../device/husky/NOTES.md)) | husky | zuma (Tensor G3) | WIP ([#1](https://github.com/derekross/omarchy-mobile/issues/1): slot B, not marked successful; Omarchy's image from the signed repository boots to the lock screen; the zuma device tree is merged ([kernel #13](https://github.com/derekross/linux-omarchy-mobile/pull/13), [#53](https://github.com/derekross/linux-omarchy-mobile/pull/53))) | testing (UFS at HS-G4 behind the read-only guard; Arch on `userdata`; [UFS-PLAN](../device/husky/UFS-PLAN.md)) | WIP (simple-framebuffer: console and Omarchy's lock screen) | no | testing (ST FTM5 over SPI, merged, [kernel #153](https://github.com/derekross/linux-omarchy-mobile/pull/153); [NOTES](../device/husky/NOTES.md)) | testing (power and volume through `gpio-keys`, merged, [kernel #148](https://github.com/derekross/linux-omarchy-mobile/pull/148); [NOTES](../device/husky/NOTES.md)) | testing (USB and SSH) | testing (BCM4398 on a test kernel, [kernel #156](https://github.com/derekross/linux-omarchy-mobile/pull/156); firmware from the owner's image, [#214](https://github.com/derekross/omarchy-mobile/pull/214); [NOTES](../device/husky/NOTES.md)) | no | testing (gauge with Google's ATL model through a bring-up overlay, temperature, MFD, on a test kernel, [kernel #163](https://github.com/derekross/linux-omarchy-mobile/pull/163); [notes](../device/husky/BATTERY-NOTES.md)) | testing (the charger driver by hand under a dead-man tool, slow on plain 5 V, on a test kernel, [kernel #163](https://github.com/derekross/linux-omarchy-mobile/pull/163); [notes](../device/husky/BATTERY-NOTES.md)) | no | no | no | no | no | no | no | no | no | no | no | | Pixel 7 ([notes](../device/panther/NOTES.md)) | panther | gs201 (Tensor G2) | WIP (slot B, not marked successful; Arch and Hyprland boot; [BRINGUP-M1](../device/panther/BRINGUP-M1.md); board file merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (UFS behind the read-only guard; Arch on `userdata`; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | WIP (simple-framebuffer: console and the Hyprland desktop; brightness and display off/on over DCS through the S6E3FC3 panel driver and device-panther 0.1.4, in review, [kernel #177](https://github.com/derekross/linux-omarchy-mobile/pull/177); [DISPLAY-PLAN](../device/panther/DISPLAY-PLAN.md)) | testing (Panthor on the Mali-G710; Hyprland renders on it; merged through [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), with the always-on rule in device-panther 0.1.1, [#145](https://github.com/derekross/omarchy-mobile/pull/145); [notes](../device/panther/NOTES.md#2026-10-28-the-gpu-and-the-haptics-power-off-and-usb-after-a-replug)) | WIP (FocalTech FT3658: touches drive Hyprland and unlock the PIN screen on a test kernel; the driver, [kernel #109](https://github.com/derekross/linux-omarchy-mobile/pull/109), and the touch node, [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), are merged; stock's interrupt pull-up and CS delay, [kernel #166](https://github.com/derekross/linux-omarchy-mobile/pull/166), the driver's review fixes, [kernel #133](https://github.com/derekross/linux-omarchy-mobile/pull/133), and the kernel option with the touch notes, [#149](https://github.com/derekross/omarchy-mobile/pull/149), are merged) | testing (gpio-keys: power, volume; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (USB and SSH; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108); a replug comes back through `omamobile-usb-rescue` in device-panther 0.1.3, on the MAX77759's I2C bus, merged, [kernel #167](https://github.com/derekross/linux-omarchy-mobile/pull/167); [notes](../device/panther/NOTES.md#2026-10-29-usb-comes-back-after-a-replug-u1)) | no | no | WIP (MAX77759 fuel gauge with stock's battery model on a test kernel: percentage, capacity and temperature in upower and the bar; in review, [kernel #171](https://github.com/derekross/linux-omarchy-mobile/pull/171) and the driver fix [#170](https://github.com/derekross/linux-omarchy-mobile/pull/170); [BATTERY-PLAN](../device/panther/BATTERY-PLAN.md)) | no | testing (CS40L26 with the phone's own firmware, `tools/extract-vendor-firmware -d panther`; merged through [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), with the feedbackd rule in device-panther 0.1.1, [#145](https://github.com/derekross/omarchy-mobile/pull/145); [notes](../device/panther/NOTES.md#2026-10-28-the-gpu-and-the-haptics-power-off-and-usb-after-a-replug)) | no | no | no | no | no | no | no | no | no (s2idle by default since [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134) and device-panther 0.1.1; not run yet) | no | | OnePlus 13 ([notes](../device/dodge/NOTES.md)) | dodge | sm8750 (Snapdragon 8 Elite) | testing (kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [BRINGUP](../device/dodge/BRINGUP-M1.md), [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (msm/dpu; warm-boot drop fixed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (Adreno 830 / gpu2; Vulkan untested; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (CDC NCM + SSH; gadget stuck after replug until reboot; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (WCN7860 / ath12k; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (pairing; A2DP untested; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (gauge; charging path not claimed; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | no | no | no | - | testing (speakers, earpiece, mics; headset plug untested; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (accel, prox, compass; autorotate; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (LTE data; calls/SMS untested; opt-in flag; [modem](../device/dodge/modem/README.md), [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | no | WIP (s2idle not default; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | From 395ab10bd98e7dd06a4f2b94e68ceddffaceaa1a Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Mon, 2 Nov 2026 16:23:19 -0647 Subject: [PATCH 7/7] omamobile-modem-sit 0.3.9: indications seen during the setup's wait reach the service 0.3.6 and 0.3.8 read indications themselves while the setup waited and after a refusal, and only logged and kept them: an SMS arriving in that window got neither stored nor acknowledged. They're now handed to the service's own handler as well, as everywhere else, with a test for an SMS in both windows. MODEM-PLAN now says what the run showed and no more: the three IND_REG_FAILED were LTE cause 10 (implicitly detached), whether the data permission triggers it isn't proven, and only byte 132 of the refused record is the IPC extension version. --- device/tegu/MODEM-PLAN.md | 28 ++++++++++--------- packages/omamobile-modem-sit/lib/bringup.py | 4 +-- packages/omamobile-modem-sit/lib/data_call.py | 26 ++++++++++------- .../test/test_data_call.py | 27 ++++++++++++++++++ packages/omamobile-modem-sit/version | 2 +- 5 files changed, 61 insertions(+), 26 deletions(-) diff --git a/device/tegu/MODEM-PLAN.md b/device/tegu/MODEM-PLAN.md index 58009f050..1ad0c50db 100644 --- a/device/tegu/MODEM-PLAN.md +++ b/device/tegu/MODEM-PLAN.md @@ -1987,10 +1987,13 @@ is a US MVNO on a large LTE network. 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, and that it was - quiet before the data permission: it re-attaches when - SET_MOBILE_DATA_STATE and SET_PS_SERVICE are written, and the setup - always landed inside that. The RIL now waits until the modem has + 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, @@ -2016,15 +2019,14 @@ is a US MVNO on a large LTE network. 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-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 one open -question is what the modem's re-attach after the data permission is -about: the IND_REG_FAILED causes are in that file, decodable with the -layout from the stock library (domain at 0x0e, main cause 0x0f, -additional cause 0x10). Stock sends the data permission at radio-on, long -before any setup, so the better fix may be to move those two requests -earlier and keep the wait as a safety net. +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 diff --git a/packages/omamobile-modem-sit/lib/bringup.py b/packages/omamobile-modem-sit/lib/bringup.py index 9be800d65..45e2a98aa 100644 --- a/packages/omamobile-modem-sit/lib/bringup.py +++ b/packages/omamobile-modem-sit/lib/bringup.py @@ -160,7 +160,7 @@ def usim_ready(): wait_for(service, lambda: packet_registered(client.request(0x0701), lte=True), 120, stopped) data_snapshot(client, 'after the NR change') service.stage('data') - activate(client, apn, ip_type=ip_type) + activate(client, apn, ip_type=ip_type, on_event=service.event) service.pump() if not net.getboolean('ims', True): service.ims_state = 'off' @@ -170,7 +170,7 @@ def usim_ready(): service.stage('ims') try: start_stack(client) - activate(client, net.get('ims_apn', 'ims'), ims=True) + activate(client, net.get('ims_apn', 'ims'), ims=True, on_event=service.event) register(client) print('Startup: waiting for IMS voice and SMS registration', flush=True) wait_for(service, lambda: service.registration().get('state') == 2 and diff --git a/packages/omamobile-modem-sit/lib/data_call.py b/packages/omamobile-modem-sit/lib/data_call.py index 5a74f0114..25302561d 100644 --- a/packages/omamobile-modem-sit/lib/data_call.py +++ b/packages/omamobile-modem-sit/lib/data_call.py @@ -152,11 +152,11 @@ def provision_default_profile(client, apn, ip_type='ipv4v6'): -# After the data permission is switched on, the modem is given time to say -# what it does about it before the setup goes out: on 2026-11-02 every setup -# was answered 36 within 150 ms and was followed within a second by three -# IND_REG_FAILED and two IND_NTW_STATE_CHANGED, so the modem was re-attaching -# around the request. The wait ends after SETTLE_QUIET seconds without an +# After the data permission is switched on, the modem is given time to settle +# before the setup goes out: on 2026-11-02 every setup was answered 36 within +# 150 ms and was followed within a second by three IND_REG_FAILED (LTE cause +# 10, implicitly detached) and two IND_NTW_STATE_CHANGED; with this wait the +# same indications came and went before the setup, and it succeeded. The wait ends after SETTLE_QUIET seconds without an # indication, or at SETTLE_LIMIT. SETTLE_QUIET = 3 SETTLE_LIMIT = 20 @@ -189,7 +189,7 @@ def describe(packet): return line -def settle(client, label): +def settle(client, label, on_event=None): deadline = time.monotonic() + SETTLE_LIMIT last = time.monotonic() seen = 0 @@ -204,9 +204,13 @@ def settle(client, label): last = time.monotonic() keep_packet(packet) print(f'{label}: {describe(packet)}', flush=True) + if on_event: + # Handled as the service handles any indication (an SMS arriving + # now is stored and acknowledged), not only recorded. + on_event(packet) print(f'{label}: {seen} indication(s), then quiet' if seen else f'{label}: quiet', flush=True) -def listen_after_failure(client, seconds=5): +def listen_after_failure(client, seconds=5, on_event=None): """After a refused setup, keep the channel open a few seconds and log what the modem sends next: on 2026-11-02 two or three messages arrived about a second after each status 36 and were dropped because the channel @@ -224,9 +228,11 @@ def listen_after_failure(client, seconds=5): seen += 1 keep_packet(packet) print(f'after the failure: {describe(packet)}', flush=True) + if on_event: + on_event(packet) print(f'after the failure: {seen} indication(s) in {seconds} s', flush=True) -def activate(client, apn, *, ims=False, ip_type='ipv4v6', lte_access=False): +def activate(client, apn, *, ims=False, ip_type='ipv4v6', lte_access=False, on_event=None): requested_cid = 2 if ims else 1 state_path, response_path = paths(requested_cid) state = client.request(0x0701) @@ -237,7 +243,7 @@ def activate(client, apn, *, ims=False, ip_type='ipv4v6', lte_access=False): if state_path.exists() or requested_cid in calls or calls != owned: raise RuntimeError('existing target or unresolved bearer ownership') allow_data(client) - settle(client, 'after allowing data') + settle(client, 'after allowing data', on_event) # The registration as it stands now, not before the permission: the # modem may have re-attached meanwhile. for second in range(60): @@ -274,7 +280,7 @@ def activate(client, apn, *, ims=False, ip_type='ipv4v6', lte_access=False): failed_path = response_path.with_name(f'failed-setup-cid{requested_cid}.bin') private_write(failed_path, result) print(f'failed setup response kept privately: {len(result)} bytes', flush=True) - listen_after_failure(client) + listen_after_failure(client, on_event=on_event) raise RuntimeError('data call did not become active') private_write(response_path, result) print('owned data bearer active; private IP configuration retained in RAM', flush=True) diff --git a/packages/omamobile-modem-sit/test/test_data_call.py b/packages/omamobile-modem-sit/test/test_data_call.py index e7858c38d..27ebf1e23 100644 --- a/packages/omamobile-modem-sit/test/test_data_call.py +++ b/packages/omamobile-modem-sit/test/test_data_call.py @@ -133,6 +133,33 @@ def test_setup_waits_for_the_modem_to_go_quiet_and_rereads_registration(self): self.assertLess(idents.index(0x0710), idents.index(0x0600)) self.assertEqual(idents.count(0x0701), 2) + def test_indications_during_the_wait_reach_the_service(self): + # An SMS that arrives while the setup waits (or after a refusal) is + # handed to the service, which stores and acknowledges it, not only + # recorded. + sms = struct.pack('