Re: [MM] Power down during init



>         Hey Dan and Marius,
> 
>         >
>         >> Power Up = enabled
>         >> Power Down = disabled
>         >>
>         >> So we already have those states in ModemManager via the
>         Enable() method
>         >> and the modem states.  It's just that not all devices
>         actually implement
>         >> the low-power mode when disabling, partially because we're
>         not always
>         >> sure of the side-effects.
>         >>
>         >
>         > The problem here isn't that we don't have a safe power-down
>         command; the
>         > problem is that even if we have it, we don't use it just after
>         plugging
>         > in the modem:
>         >   initialized -> locked -> disabled
>         >
>         > But for that 'disabled' state we didn't run the power-down
>         command even
>         > if we have it, so the radio interface may be powered on there.
>         That's
>         > the thing to fix by running the disabling sequence just after
>         > initialization. If there is no default power down command,
>         then we would
>         > run the disabling sequence but without any power down command,
>         so no big
>         > deal.
>         >
> 
>         The attached patch runs just a new power-down step during the modem
>         initialization, to ensure it starts in low power mode. Adding a
>         new step
>         to run power-down instead of running the whole disabling
>         sequence seemed
>         a better option, as the disabling sequence really assumes we were
>         previously enabled. Note that this patch just re-uses the power-down
>         implementation given in each plugin, which we previously used only
>         during the disabling sequence.
> 
>         Given that it's quite a big change, can you guys try it with
>         some of the
>         modems that we know have given issues before with these things?
>         Thinking
>         on Sierra modems specifically here. I've got a Wavecom modem
>         which also
>         had issues with CFUN (e.g. rebooting on CFUN=1 if it was already in
>         CFUN=1), but won't be able to test it until Friday.
> 
> 
>     Tested my ZTE MF820D and seems to work nice.
> 
> 
> But it seems not to work with my Sierra modem in AT mode:
> 
> ModemManager[3734]: <debug> [1347998708.810662] [mm-serial-port.c:929]
> mm_serial_port_open(): (ttyUSB3) device open count is 4 (open)
> ModemManager[3734]: <debug> [1347998708.810953]
> [mm-at-serial-port.c:392] debug_log(): (ttyUSB3): --> 'ATE0<CR>'
> ModemManager[3734]: <debug> [1347998708.815802]
> [mm-at-serial-port.c:392] debug_log(): (ttyUSB3): <-- 'ATE'
> ModemManager[3734]: <debug> [1347998708.822968]
> [mm-at-serial-port.c:392] debug_log(): (ttyUSB3): <-- '0<CR>'
> ModemManager[3734]: <debug> [1347998708.824151]
> [mm-at-serial-port.c:392] debug_log(): (ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
> ModemManager[3734]: <debug> [1347998708.824446] [mm-serial-port.c:969]
> mm_serial_port_close(): (ttyUSB3) device open count is 3 (close)
> ModemManager[3734]: <debug> [1347998708.824688]
> [mm-at-serial-port.c:392] debug_log(): (ttyUSB3): --> 'AT+CMEE=1<CR>'
> ModemManager[3734]: <debug> [1347998708.840464]
> [mm-at-serial-port.c:392] debug_log(): (ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
> ModemManager[3734]: <debug> [1347998708.840817] [mm-serial-port.c:969]
> mm_serial_port_close(): (ttyUSB3) device open count is 2 (close)
> ModemManager[3734]: <debug> [1347998708.841066]
> [mm-at-serial-port.c:392] debug_log(): (ttyUSB3): --> 'AT!pcstate=0<CR>'
> ModemManager[3734]: <debug> [1347998708.865357]
> [mm-at-serial-port.c:392] debug_log(): (ttyUSB3): <--
> '<CR><LF>ERROR<CR><LF>'
> ModemManager[3734]: <debug> [1347998708.865590]
> [mm-serial-parsers.c:316] mm_serial_parser_v1_parse(): Got failure code
> 100: Unknown error
> ModemManager[3734]: <debug> [1347998708.865743] [mm-iface-modem.c:3025]
> initialization_modem_power_down_ready(): Modem initially powered down...
> 
> This might be caused by the check if it is CDMA or GSM modem is run
> before it knows the answer (see my patch I send in a moment).
> 

Right you are.

We need to run the power-down during init *only* after having checked
current/modem capabilities. Will update the patch.

-- 
Aleksander


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