How does one return the GSM modem to a known state?

Joachim Steiger roh at openmoko.org
Thu Nov 1 04:04:40 CET 2007


Mike (mwester) wrote:
> I'm looking for a way to have a function within the kernel issue the
> required sequence to power off the GSM modem on the GTA01 when Linux shuts
> down.
> 
> How can one return the GSM modem on the GTA01 to a known state from which it
> can be issued the AT at POFF command to power itself off?  The reset GPIO is
> not connnected on the GTA01, and the power GPIO only turns it on, does not
> turn off the modem -- so as far as I know, one must be able to issue the AT
> command to power off -- otherwise the device is powered off, but the phone
> remains on and fully functional (a clear violation in many situations, such
> as blast zones, or aircraft).

you can pull down the power_on gpio line and up again.
the modem resets itself as far as i know, or atleast the at command
interpreter reinits itself on rising flank.

> We need to assume that the modem can be in *any* state when the shutdown
> needs to be issued, hence the need to return it to a mode where it will
> accept and act on an AT command immediately.
> 
> Is there a magic sequence for this?  Or can I just assume that issuing
> something like \r\rAT at POFF\r will *always* work?

the procedure which should work in any case is:
* trying if at at poff does kill the at-interpreter and pull down the
power_on gpio afterwards. (that should not be left on high)
* if the at-interpreter still lives, wiggle the power_on line up again
and try again.(that should succeed everytime, even when the interpreter
was alive at first, but the command did nothing)
but i must say that i _never_ have seen the modem crash that hard yet,
so this is more how to behave and still have the theoretical worst case
covered.
just make sure that power_on is also pulled low and does not stay high.
i've seen the modem send lowlevel debug still when not, but never when
the above is covered.

--

roh



More information about the gsmd-devel mailing list