GSM modem doesn't power off when Neo does

Mike Westerhof mwester at dls.net
Wed Feb 20 00:52:44 CET 2008



On Tue 19/02/08  4:35 PM , "Shawn Rutledge" shawn.t.rutledge at gmail.com sent:
[snip]
> Or the abstraction could even be pushed down into the kernel, so that
> when you frob the /sys/whatever to turn off the radio it sends that
> POFF command, and when you try to turn it on, it does it the other
> way.  That way as long as the kernel is shut down normally rather than
> crashing, it will still work.

The compromise I proposed (and tested, and I still use today) is to have a simple
shutdown script in /etc/init.d, with the appropriate symlink from
/etc/rcX.d/Kxxxx.  The "x"s should be replaced with values that ensure that the
kill script runs when the system is pretty much shutdown; i.e. we can safely
assume that all gsmd's have had an opportunity to exit cleanly if they were
running in the first place.  (I'd post the values I chose for the "x"s except
that I'm nowhere near home and can't check right now.)

The script simply resets the GSM modem, sets the serial port to the correct flow
control and echo settings, and issues the AT at POFF command.  Voila, modem powered
off at normal shutdown, regardless of the state of gsmd.



There was significant opposition to my original solution, however, hence I
started this thread by asking the community here for solutions rather than just
leading with my (unacceptable) solution.



Mike (mwester)




More information about the gsmd-devel mailing list