[PATCH] iface-modem: allow setting power state to OFF when modem is in FAILED state

Ben Chan benchan at chromium.org
Mon Mar 3 10:42:37 PST 2014

On Mon, Mar 3, 2014 at 2:18 AM, Aleksander Morgado <aleksander at aleksander.es
> wrote:

> On 03/03/14 09:57, Ben Chan wrote:
> >> > Doing this would also allow trying to set ON and LOW power states
> >> > while in Failed state. How about also modifying the power setting
> >> > logic itself so that only OFF is allowed while in Failed state?
> >> >
> > handle_set_power_state_auth_ready in mm-iface-modem.c already performs
> the
> > check. Is there other place we should check as well?
> >
> Ah true, true, my bad. Pushed then to git master.
BTW, is there a reason that we want to disallow putting modem in lower
power mode when the SIM is missing? I think the lower power mode usually
means turning off the RF, which seems independent of the SIM. AFAIK, the
modems I've tested seem to accept AT+CFUN=4 in absence of the SIM, but I
wouldn't be surprised if some modems behave differently.

On a related note, some modems can be configured to turn of the SIM
interface after the RF is turned off. So if the RF is turned off before
ModemManager initializes the modem, the +CPIN? check may conclude that the
SIM is missing and put the modem in the failed state.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20140303/2ea36968/attachment.html>

More information about the ModemManager-devel mailing list