temp/modemmanager: Improve suspend/resume for EG25 modem
Description
After a lot of debugging, I found the root cause:
- ModemManager's suspend/resume hooks are not enabled on pmOS because it cannot find
systemd
on compilation. It relies onsystemd-logind
which is replaced on pmOS byelogind
with the same interface. I created a patch for this. - ModemManager probes the modem on resume to sync its internal state with the modem. This resulted in 2 issues:
-
ATH
(AT hangup) is used during probing to test if the modem supports calling. If a call wakes up the phone, it gets rejected during probing. I used the same hack as Mobian to overcome this (suggested by the maintainer, see https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/194). This patch needs to be improved later on. -
AT
is send to test if the AT interface is functional. However, it fails to parse the response when a call or text is received. The regex parsing was hardcoded toOK
, but our modem also sends the information about the call or text with theOK
response. The AT interface probing failed and was retried after 3 seconds. This is now patched.
-
Improvements
- Faster resume of the EG25 modem when a call or text is received (2 beep tones on the caller side instead of 3!)
- Texts are working again in deep sleep
- Resume/suspend is more reliable now, before it broke sometimes
- Upgrade MM to 1.14.8, without this my modem sometimes fail to resume.
Note: Tested only on PinePhone V1.2a. I don't have a BraveHeart 1.1 to test.
Fixes #868 (closed)
Upstream
Patches are submitted upstream:
- https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/408
- https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/407
Testers wanted!
This patch is critical, it modifies critical parts of the phone: modem stuff.
Please test this patch in detail before merging
Edited by Administrator