Re: ModemManager: power-up/power-down fixes for Wavecom, Cinterion and Sierra modems
- From: Dan Williams <dcbw redhat com>
- To: Aleksander Morgado <aleksander lanedo com>
- Cc: "Network Manager \(Devel\)" <networkmanager-list gnome org>
- Subject: Re: ModemManager: power-up/power-down fixes for Wavecom, Cinterion and Sierra modems
- Date: Thu, 30 Jun 2011 15:47:54 -0500
On Thu, 2011-06-30 at 19:59 +0200, Aleksander Morgado wrote:
> Hi Dan,
>
> > > Some fixes related to power-up/power-down some modems are available in
> > > the 'power-up-check-needed' branch in the following Gitorious repo
> > > [1]:
> > > git://gitorious.org/lanedo/modemmanager.git
> >
> > These all look good. I think in the future though we should just define
> > some stuff on the Modem object for generic power states that roughly
> > correspond to the CFUN numbers, ie [OFF, MIN, RF_OFF, FULL] and let
> > modems handle that as need to. On startup we'd ask for the modem's
> > power state which the plugin would return as one of these enums and then
> > the MM core does what it needs to. When the core wants to change power
> > state (ex as a result of Enable()) it'll just tell the plugin to go to
> > FULL and the plugin translates that to whatever it needs to do.
> > Thoughts? I'm just worried about making the power state selection more
> > complicated with the POWER_UP_CMD properties and stuff and I think this
> > is actually a clearer, simpler solution which we should have done in the
> > first place.
> >
>
> That makes a lot of sense, yes. And if so, I would also avoid using
> enable() and disable(), as the modem is no longer just enabled or
> disabled, but "off", "in minimum functionality mode", "radio off" or "in
> full functionality mode". A generic set_state() method instead of
Though I'd call it "set_power_state" or something like that. I'm not
sure I'd expose a "set power state" call through D-Bus though since it
really should be an implementation detail, and I'm not sure clients
would really need more than Low/Full power functionality. On some
devices CFUN=0 turns the darn thing off (mostly phones) so we have to
careful about that.
> enable() and disable() could help. The only problem I see with this
The enable/disable stuff roughly maps to low (disable) and full
(enable); basically before being enabled the plugin should init the
device enough to get all the character set, capability, SIM info, PIN
status, etc; while disable should really return the device to low power
mode. The intersection of this and rfkill is interesting since for most
internal devices rfkill cuts USB power completely. The only devices
that doesn't happen for that I've seen are the Samsung Y3300/Y3400.
> approach is that modems may not implement exactly those states, and
> plugins would need to find the "most similar" state to those specified
> by ModemManager.
Yeah, clearly. But I think most will map to the generic states, and
since it's internal API we can modify it if we need to later.
Dan
> > But for now please push when you have time.
> >
>
> Done.
>
> Cheers,
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]