On Mon, 2012-09-10 at 14:21 +0200, Aleksander Morgado wrote: > >>>>>>>> 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. > >>> > >> CFUN=1 is sent when *enabling* the modem, not during init. All the init > >> steps should really be possible while in CFUN=4 low power mode as that > >> should only kill the radio power. > > > > Sorry, I did not test it or dig deep enough in the code. If I sent the > > modem to CFUN=4, it actually keeps this state after the init, and > > enabling works fine. > > > >> > >> Also, for Sierra modems there's the problem that CFUN=1 may actually > >> reboot the modem, so the problem with powering down the radio with > >> CFUN=4 in Sierra is that this may require a reboot/reprobing of the > >> modem afterwards :-/ IIRC Wavecom (which also suffers from the same > >> issue) had a CFUN=1,0 to try to go into full functionality mode without > >> rebooting, not sure if Sierra has something similar. > > > > Seems my Sierra modem has the same: > > > > +CFUN: (0-1,4-7),(0-1) > > > > but the default is ",0" on my modem, as "CFUN=1,1" behaves just like > > "CFUN=1", but "CFUN=1,1" causes a restart. > > > > We could do a detection of the right version by using some regex of the > > CFUN=? output. > > > > Or, just try first with AT+CFUN=1,0 and if we get any error, retry with > the original AT+CFUN=1. This can easily be done with an AT sequence. > Note that anyway the power-up command needs to be sent *only* if not > already in the full-functionality mode (that's why the Sierra and > Wavecom plugins have already the AT+CFUN? check).
Sierra 2.8 AT docs (which aren't very up-to-date) suggest that AT +CFUN=x,x is supported by most modems, but only lists states 0 and 1. So we'd probably need to parse AT+CFUN=? and then figure out if we *can* do state 4 or not. But we could also just retry like you suggest. Dan _______________________________________________ networkmanager-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/networkmanager-list
