Powering off modems

Dan Williams dcbw at redhat.com
Thu Feb 20 07:58:27 PST 2014


On Thu, 2014-02-20 at 11:29 +0100, Aleksander Morgado wrote:
> Hey,
> 
> 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.

Dan

> So, all in all, if you want to use the power off feature, make sure
> you cut the power to the device as soon the SetPowerState(OFF) command
> returns.
> 
> Cheers!
> 




More information about the ModemManager-devel mailing list