Re: [MM master] Re: [MM06] [PATCH] sierra: use +CFUN=4 for powering down



Den 10. sep. 2012 10:41, skrev Aleksander Morgado:
See patch attached.

sierra: use +CFUN=4 for powering down

   plugins/mm-modem-sierra-gsm.c |   32 ++++++++++++++++++++++++++++++++
   1 file changed, 32 insertions(+)
This also needs to be intregrated in the master branch version. Attached
is my attempt to do it, but it seems not to work. I see no effect of
disabling the modem with "mmcli -m X -d".
See review below.

Also, it seems like the power down is not done before the modem enters
disabled state at startup of MM or after modem is inserted, so I filed a
bug about that:

https://bugzilla.gnome.org/show_bug.cgi?id=683681

Yes, that's a known issue, see TODO in the source tree.

The text there is slightly incorrect. It does not help if the modem is in low power mode when started (some might also be configured to be), because at least in the Sierra plugin, it is waked up to CFUN=1 in the init anyway. This could be avoided by accepting CFUN mode 4 and 7 as well. But then it must be changed to mode 1 when connecting.

I am not sure if all the init steps are possible in low power mode.


Dan, what do you think of this, should we run the whole disabling
sequence, including the power-down command, just after the modem gets
initialized? I would do it, but now sure if that would have any
unexpected complication.

The only problem I could think of is when you want to connect your modem
as soon as it appears in DBus, running the Simple.Connect() command. In
this case you don't really want to go to the low-power mode as you're
going to connect it right away.
When would this happen? This power down/disabling should only happen if
the mobile broadband is disabled (the default now, although it could be
discussed if it should be if there are any auto connections available).
If mobile broadband is enabled and a new modem appears, it should move
directly from init to start connection.

MM doesn't know anything about "broadband disabled"; that's a NM setting
and NM is the one required to honour it. Just assume MM doesn't work
only with NM.

Ah, so then MM api could be extended to either expose the power up/down functions or the init gets a parameter saying if the modem should be enabled after init.

But I do agree that we need to handle this properly. We do need to run
the whole disabling sequence at the end of the initialization sequence,
either if we're in LOCKED or DISABLED state. The problem doesn't only
come with power consumption (e.g. the modem has radio powered on, even
if we say it's disabled); also, the modem will be registered in the
network and may receive SMS, which we wouldn't process as all the
feature-specific interfaces are not enabled yet. I'll look at how to do
this and suggest a fix for this.

Japp, beside that the computer might be positioned and it should be turned off to use it in an airplane.

--
Marius



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]