ModemManager and modem low power with USB/QMI

Aleksander Morgado aleksandermj at chromium.org
Wed Mar 1 09:59:48 UTC 2023


Hey,

> I'm using Quectel EC21EUX modem, connected with USB, and QMI to control it via ModemManager.
> 
> I have a question about going to sleep with a TCP connection kept so the device can wake up.
> 
> I have configured the modem to go to low power mode whenever there is no traffic (AT+QSCLK=1, AT+QURCCFG="urcport","usbat", setting DTR and AP_READY pins).
> 
> With this configuration, LTE modem should wake up when there is an incoming data packet.
> The easiest way for me put modem to sleep was to stop ModemManager. Now, if I disable ModemManager, and then try to send a network packet from backend to the device, the modem never wakes up. My guess is that when I stop ModemManager, the TCP connection is lost, and this is why modem cannot wake up as it doesn't get the message from backend.

The default behavior when you stop ModemManager cleanly is to stop connections and disable modem, so yeah, not ideal for what you're attempting to do.

> My preferred way to sleep modem is to disable USB_VBUS.
> 

Wouldn't that take the modem out of the USB bus as well?

> On the ModemManager side, what should I do to maintain the TCP connection when putting the modem to sleep, so it can wake up when getting a message over network?
> 

It really depends on how you're making the modem sleep, how it is exposed in the system during that time, how you expect it to wake up, and what is the state of the host during all that. E.g. I don't think it's possible maintaining a TCP session alive between the host and a remote server while the host is awake and the modem is no longer exposed in the system, unless it's your modem itself the one making the effort of maintaining that TCP session alive somehow. And as said it also depends on the state of the host; if you're expecting both the host and modem to be awaken by an incoming packet in the TCP session, absolutely no idea how you're supposed to do that if the host (one of the endpoints of the TCP session) is already asleep. I'm also not sure how the modem in sleep mode can still receive packets from the network; I guess it's not a full sleep in the radio stack? Please note, I don't know much about AT+QSCLK or how Quectel does all this :) I was hoping someone else would jump in this thread to reply!

Cheers

-- 
Aleksander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xAECE0239C6606AD5.asc
Type: application/pgp-keys
Size: 3139 bytes
Desc: OpenPGP public key
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20230301/62bb5058/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20230301/62bb5058/attachment-0001.sig>


More information about the ModemManager-devel mailing list