Re: The meaning of Enable in MM/NM world of mobile broadband?



On Monday 01 August 2011, Dan Williams wrote:
> On Mon, 2011-08-01 at 09:26 +0100, Andrew Bird (Sphere Systems) wrote:
> > Hi all,
> > 
> > 	I'm trying to understand the meaning of 'Enable Mobile Broadband' from
> > 
> > the NM applet menu. I have a few questions:
> > 
> > Is the NM applet Enable item just a direct control of the WWAN devices's
> > radio function?
> 
> Not necessarily.  Enable means "power up the modem and initialize it so
> that it is able to be connected at some point in the future."  Before
> the modem is enabled, it may not be powered up, it may not be registered
> with a network, it may not send/receive SMS, etc.  Basically, before
> anything can be done with the modem beyond detecting that the modem
> exists and whether the modem needs a PIN, the modem must be enabled.
OK thanks, I understand now

> > 	a) if so, what happens at startup, is the modem's radio functionality
> > 
> > checked and the Enable checkitem state set accordingly, or is the modem's
> > radio forced into some default/remembered NM/MM derived state?
> 
> ModemManager starts all modems in disabled state, and NetworkManager
> should not be automatically enabling modems; that's left to the user
> because at the moment, most people won't be using their modems full-time
> and probably don't want them to suck down power when they aren't
> actually being used.  It's up to the connection manager (NM or something
> else) to determine whether or not to enable the device, and right now NM
> requires the user to explicitly make that decision.  If you're using an
> embedded platform, whatever tells MM to connect probably wants to enable
> the modem when that thing starts.
OK thanks, I understand now

> 
> > 	b) if so, what happens if we have two modems (perhaps one is embedded
> > 	and
> > 
> > the other external) and their radios are in different states, or need to
> > be?
> 
> MM allows both modems to have different state.  With NetworkManager
> however, because there isn't a separate rfkill for each WWAN device,
> there's a single composite state just like there is for WiFi.  If any
> modem is disabled, the checkbox (and NM's "WwanEnabled" state) will be
> FALSE.  If the user checks the box (or something sets WwanEnabled to
> TRUE) NM will attempt to call MM's Enable() method for all devices.
> 
> I'm somewhat unclear on use-cases where multiple modems would be
> connected to a system under normal conditions where both wouldn't be
> able to be enabled at the same time.  Thoughts?
Yeah it was a contrived example, and the only reason I can think of is power 
saving on the unused modem. 



> 
> > 	c) if so, does MM prefer to use +CFUN=0  or +CFUN=4 to Disable the
> > 	modem?
> 
> That's left to the modem plugin.  CFUN=0 often has the unfortunate
> side-effect of actually powering off the device so it's not used on many
> devices.  CFUN=4 is unfortunately unimplemented on a wide range of
> devices, but if it is available we should be using it.  Patches for that
> would be accepted; we can check CFUN=? on startup and then store the
> returned list of available modes and use that to determine whether to
> set CFUN=4 on disable.
> 
> > 	d) if not, what function does Enable on the applet perform?
> 
> Not sure what you're asking here...
You answered it in part (a)
> 
> > 	e) if not, is there another way to turn off the radio, perhaps an
> > 	Aircraft
> > 
> > Mode?
> 
> That is current calling Enable(FALSE) for the modem on the MM DBus
> interface, which is supposed to place the modem into low-power mode.
> RFKILL/Aircraft mode isn't what we want to do here, because that is
> easily confused with the physical button that many laptops have, which
> often just disconnects the device from the USB bus completely.  Which
> means MM can't see it anymore because it doesn't exist.  So I think just
> having the device disabled via the equivalent of CFUN=4 is sufficient,
> and leave actual airplane mode/rfkill to the BIOS, if any.
> 
> Dan

There is one thing I noticed though after doing a few tests with NM on Ubuntu 
Natty. If after first insertion of a device, the user dismisses the PIN entry 
dialog without authenticating. Then he subsequently uses the nm-applet to 
enable mobile broadband but it doesn't prompt again for PIN. Which means that 
to see registration/sig strength/networks etc, the user must first attempt a 
connection in order to get prompted for PIN and auth, or he must pull the 
stick and reinsert. Which may be expected behaviour I guess, but a little 
awkward.

Thanks for taking the trouble to explain it all


Andrew


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