Skip to content

device-pine64-pinephone: EG25-G modem improvements

PinePhone EG25-G modem improvements

This MR fixes several issues with the EG25-G modem of the PinePhone such as:

  • USB resets.
  • Long time between waking up and ringing when a call is received.
  • More reliable text messages when no suspend/resume hooks are enabled.

Problems with the EG25-G modem

  1. EG25-G modem has USB resets when you receive a call or text in deep sleep. You miss several ringtones before the phone starts ringing
  2. ModemManager probes the modem each time the phone is resuming. Another 2-3 ringtones are lost before the phone rings.
  3. Without suspend/resume probing, text messages are not processed by ModemManager as the URCs to indicate such an event are not enabled. ModemManager relies on QMI indications for that, but these are lost during resume as there's no cache as with the URCs over the AT port.

Patches in this MR

  1. Some USB configs from Quectel, together with some from ModemManager's mailing list avoids these USB resets.
  2. Upgraded ModemManager to 1.16.0.
  3. Patched ModemManager to use AT URCs for texts as well as an optional feature with an UDEV tag.
  4. Added a CLI option to ModemManager to disable suspend/resume hooks --test-no-suspend-resume.

Upstreaming at:

ModemManager:

eg25-manager

Test procedure

Please test out this MR to get some feedback as modifications to the modem setup are crucial for a ... phone. 😸

  1. Build all the packages from this MR: modemmanager, eg25-manager, device-pine64-pinephone.
  2. Install these packages and do not forget to reboot.
  3. Let the phone sleep and call/text the phone.
  4. The phone should wake up instantly and start ringing in ~500ms.
  5. Report your findings here with the following template:
| Test point               | Status                         |
| ------------------------ | ------------------------------ |
| Modem firmware           | EG25GGBR07A08M2G_01.002.01.002 |
| PinePhone revision       | v1.2a                          |
| Ring on first dial tone? | OK                             |
| No calls missed?         | OK                             |
| No texts missed?         | OK                             |
| USB resets fixed?        | OK                             |

I added my test values as an example, feel free to change those if something doesn't work on your side. If that's case, please include a description with some details about what doesn't work on your side.

Note: If you haven't upgraded the modem firmware, write stock in the template.

Known issues

  1. After a reboot or power off/on, wait at least 2mins before suspending the phone, otherwise the modem may not be fully initialized yet and brings it in a weird state where only rebooting of the phone is an option.
  2. The 0002-broadband-modem-Do-not-send-ATH-during-probing patch can be dropped I think, need to test that further out as we don't do probing on resume anymore.
  3. QMI OutOfCall errors may happen in some cases when you kept mobile data on during suspend. The network bearer isn't refreshed properly as ModemManager may be out of sync with the current modem state. --> being worked on in https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/459

What's next?

I'm working further on ModemManager to fix the last bits to keep ModemManager 100% in sync with the modem.

Fixed pmaports issues

Edited by Dylan Van Assche

Merge request reports