temp/modemmanager: Improve suspend/resume for EG25 modem
After a lot of debugging, I found the root cause:
- ModemManager's suspend/resume hooks are not enabled on pmOS because it cannot find
systemdon compilation. It relies on
systemd-logindwhich is replaced on pmOS by
elogindwith 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.
ATis 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 to
OK, but our modem also sends the information about the call or text with the
OKresponse. The AT interface probing failed and was retried after 3 seconds. This is now patched.
- 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)
Patches are submitted upstream:
This patch is critical, it modifies critical parts of the phone: modem stuff.
Please test this patch in detail before merging