Powering off modems

Aleksander Morgado aleksander at aleksander.es
Thu Feb 20 08:12:08 PST 2014

On Thu, Feb 20, 2014 at 4:58 PM, Dan Williams <dcbw at redhat.com> wrote:
>> I just merged some commits which enable ModemManager to tell the modem
>> to power-off completely (no new API, just allowing OFF in
>> SetPowerState()). The idea behind these changes is to let users of
>> ModemManager tell the modem to power-off before really cutting the
>> power source of the device. It is not a general use case (i.e. not
>> everyone should do that), only do it if you are able to cut the power
>> to the device and if you're about to do it after setting the modem in
>> OFF mode.
>> Currently it is implemented for QMI, Wavecom and Cinterion devices
>> only. For QMI devices, the device goes in OFFLINE mode, which can only
>> be recovered doing an actually physical power cycle (or with a RESET
>> command, which MM won't do automatically). For Cinterion devices, the
>> power off will make the ttys unusable (if RS232 device) or will really
>> remove the ttys (if USB device). For Wavecom devices, it ends up
>> removing the ttys and also rebooting the device after some seconds.
>> I was going to include CFUN=0 as default implementation, but didn't do
>> it. Maybe we should.
> The problem with this is when you tether a phone.  CFUN=0 tells the
> phone to turn off, which almost always is not what you want when you're
> just shutting down or suspending your laptop.  And it's typically hard
> to identify when something is a phone and when it's not, either through
> kernel drivers (most just show up as option or usbserial) or AT
> responses.

So maybe it is better to just keep this OFF functionality per-plugin;
and not provide the CFUN=0 default, right?


More information about the ModemManager-devel mailing list