Repository navigation
omamobile-modem-sit 0.3.4: read the CP state on one open file - #156
Conversation
The service checks the CP state every 2 s with a fresh open of umts_boot0 each time. On the palmtop (Pixel 9a) each open and close wakes the CP's PCIe link for about 100 ms, while the status ioctl on a held file doesn't wake it at all (measured for omamobile-modem 0.1.9), so the check would cycle the link thirty times a minute once this stack runs there. cp.state() now keeps one file open and reopens it after an error; the 7 Pro's behaviour is otherwise unchanged.
|
Thanks for following up on this so quickly. It's the same fix as #148, and it fits the service well. The error handling keeps the old contract: a missing device still reads as offline, and other errors still reach the caller. What I checked:
A few small things, none blocking:
The 7 Pro runs this service, so I'll boot it there before merging. It will be the boot after #148's, so each change gets its own boot. I'll check that registration and SMS work as before, and that nothing piles up on the boot channel while the file is held open. |
The suite runs with the CP check off, so cp.state() wasn't covered: the test stubs the syscalls and checks that the file is opened once and reused, reopened after an error (which still reaches the caller), and that a missing device reads as OFFLINE. Also for the record: omamobile-sit-data's route loop calls cp.online() every 0.5 s, so on the palmtop the held file saves more link wakes than the service's 2 s check alone.
|
Thanks. Both suggestions taken at ceaebba: a test_cp.py that stubs the syscalls and checks the held file (opened once and reused, reopened after an error that still reaches the caller, a missing device reads OFFLINE, and BOOT=none stays online), and the commit body notes that omamobile-sit-data's route loop calls cp.online() every 0.5 s, so the saving on the 9a is larger than the 2 s check alone suggests. Version: whichever of this and #66 lands second takes the next number, as you say. |
|
Thanks for the unit test and the note about the route loop. Both are just what I hoped for, and the tests pass on today's main too. As planned, I'll boot this on my 7 Pro the boot after #148's, checking registration, SMS and the boot channel, and merge once that's clean. If my #66 goes in first, I'll bump this to the next free version at merge. |
|
Booted it on my 7 Pro after #148's boot: with 0.1.9 and 0.3.4 the modem reached ONLINE in about 9 s, nothing queued on |
kernel derekross#156's Wi-Fi needs CONFIG_PHY_ZUMA_PCIE, a zuma-only PHY, so it goes in husky's fragment. On a kernel without derekross#156, olddefconfig drops the unknown symbol and nothing else changes (checked on omamobile with derekross#153). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
…214) Adds husky to extract-vendor-firmware: the BCM4398 firmware, CLM blob and the per-SKU NVRAM (MMW, ROW, NA as in Google's dhd_custom_google.c; other SKUs take the default), named for kernel #156's brcmfmac4398d0-pcie. -s is refused on other devices; the cheetah, panther, raven and tegu paths are unchanged. CONFIG_PHY_ZUMA_PCIE=m in device/husky/kernel.config for bring-up (it moves to the shared fragment when kernel #156 merges).
A NOTES entry for the BCM4398 under kernel derekross#156 (draft): the chip and its NCI backplane, the pins, zuma's PCIe PHY, how stock picks the firmware files (derekross#214 does the same), what brcmfmac needed, the reload fix, throughput, what isn't done, and the BAR read that hung the phone. DEVICES and the ROADMAP move husky's Wi-Fi from no to testing: it is not in the kernel the image ships until derekross#156 and the PRs under it land. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
A NOTES entry for the BCM4398 under kernel derekross#156 (draft): the chip and its NCI backplane, the pins, zuma's PCIe PHY, how stock picks the firmware files (derekross#214 does the same), what brcmfmac needed, the reload fix, throughput, what isn't done, and the BAR read that hung the phone. DEVICES and the ROADMAP move husky's Wi-Fi from no to testing: it is not in the kernel the image ships until derekross#156 and the PRs under it land. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
…e host when the device tree has it Kernel derekross#168's standalone host is being replaced by derekross#178, which puts the 9a's channel 1 on derekross#156's pcie_gs201 and phy_zuma_pcie. The graphics start picks the host from the node's compatible, and both new modules are kept out of autoload like the old one.
…ing (#307) The 9a's row after today's merges, with a NOTES entry for the evening's boots that the new cells link to. - **Wi-Fi, testing to works.** `omamobile-device-tegu` 0.2.4 (#238) starts it at boot now, through the shared gs201 host and zuma PHY (kernel #178 on #156, both in review) and brcmfmac (kernel #56, in review), with only the extractor's firmware. The NOTES entry has the boot, and the three rebinds with Bluetooth up after #178's FLR commit. The kernel parts are still in review, and the cell says so, as the display cells did. - **Suspend, WIP to testing.** The power key now lights the lock screen on the first press (#268, #275). Thirty attended sleeps and a day of real use with auto-sleep on all woke (SLEEP-PLAN, #284). The cell still says that three test sleeps on 10-28 to 10-30 never woke and that sleep tests stay attended. If you'd rather keep WIP until that hang is understood, I'll revert just the word. - **Display:** the display DT is merged, and brightness, DPMS off and on and the 60/120 Hz switch now have a dated record (kernel #125's boot, which also checks the panel ID). - **Charging, Haptics, Torch, NFC:** kernel #161, #96, #104 and #105 are merged. - **USB net:** the rescue also handles a replug the gadget didn't see (#280). The NOTES entry lists each boot with its release: Wi-Fi from the package, the power-key wake, the replug, storage idle (kernel #99), the panel ID (kernel #125), the RTC without the PMIC interrupt (kernel #55), and the auto-sleep day. GNSS and Modem stay as they are until the SIM test on Tuesday. Docs only; `tools/pr-check` passes, and the diff has no identifiers. Closes #307 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oss#156) sitd (2 s checks) and sit-data (cp.online() every 0.5 s in its route loop) each opened umts_boot0 for every state read; on the Pixel 9a each open and close woke the CP's PCIe link. Each now holds one file for its lifetime, as the modem profile's watcher does since 0.1.9. A unit test covers the held file; the commit notes the route loop's polling. Pixel 7 Pro (2026-10-30): installed with omamobile-modem 0.1.9, the modem reached ONLINE in about 9 s with nothing queued on umts_boot0 and no UFS error pass. sitd itself can't start on the 7 Pro yet (no SIM, so no APN configured), so the 7 Pro is unaffected until its SIM test; the change was exercised on the 9a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erekross#214) Adds husky to extract-vendor-firmware: the BCM4398 firmware, CLM blob and the per-SKU NVRAM (MMW, ROW, NA as in Google's dhd_custom_google.c; other SKUs take the default), named for kernel derekross#156's brcmfmac4398d0-pcie. -s is refused on other devices; the cheetah, panther, raven and tegu paths are unchanged. CONFIG_PHY_ZUMA_PCIE=m in device/husky/kernel.config for bring-up (it moves to the shared fragment when kernel derekross#156 merges).
…ing (derekross#307) The 9a's row after today's merges, with a NOTES entry for the evening's boots that the new cells link to. - **Wi-Fi, testing to works.** `omamobile-device-tegu` 0.2.4 (derekross#238) starts it at boot now, through the shared gs201 host and zuma PHY (kernel derekross#178 on derekross#156, both in review) and brcmfmac (kernel derekross#56, in review), with only the extractor's firmware. The NOTES entry has the boot, and the three rebinds with Bluetooth up after derekross#178's FLR commit. The kernel parts are still in review, and the cell says so, as the display cells did. - **Suspend, WIP to testing.** The power key now lights the lock screen on the first press (derekross#268, derekross#275). Thirty attended sleeps and a day of real use with auto-sleep on all woke (SLEEP-PLAN, derekross#284). The cell still says that three test sleeps on 10-28 to 10-30 never woke and that sleep tests stay attended. If you'd rather keep WIP until that hang is understood, I'll revert just the word. - **Display:** the display DT is merged, and brightness, DPMS off and on and the 60/120 Hz switch now have a dated record (kernel derekross#125's boot, which also checks the panel ID). - **Charging, Haptics, Torch, NFC:** kernel derekross#161, derekross#96, derekross#104 and derekross#105 are merged. - **USB net:** the rescue also handles a replug the gadget didn't see (derekross#280). The NOTES entry lists each boot with its release: Wi-Fi from the package, the power-key wake, the replug, storage idle (kernel derekross#99), the panel ID (kernel derekross#125), the RTC without the PMIC interrupt (kernel derekross#55), and the auto-sleep day. GNSS and Modem stay as they are until the SIM test on Tuesday. Docs only; `tools/pr-check` passes, and the diff has no identifiers. Closes derekross#307 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derekross#752 gave the package its Bluetooth address step, so the paragraph that said a pairing wouldn't survive "until this package has its own address step" now says that pairings made before 0.1.13 have to be made again once. The Wi-Fi line named kernel derekross#156 as a draft; it merged through kernel derekross#187 on 2026-11-09. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The related point from #148: the service checks the CP state every 2 s with a fresh open of umts_boot0 each time. On the palmtop each open and close wakes the CP's PCIe link for about 100 ms, while the status ioctl on a held file doesn't wake it at all (0 link-ups in a minute at 0.5 s, measured today for #148), so this check would cycle the link thirty times a minute once the stack runs on the 9a. cp.state() now keeps one file open for the process and reopens it after an error; a missing device still reads as OFFLINE, and ioctl errors still propagate as before.
Independent of #148 (a different package). test/all and tools/pr-check pass. Not run on a phone: the 9a doesn't run this stack yet, and on the 7 Pro the change is one open instead of one per check.