gta02, 2007.2: frequent wakeups -- creating workaround -- scripts for apm

arne anka openmoko at ginguppin.de
Fri Aug 15 20:35:20 CEST 2008


ok, here they are, teh scripts i use to make the baby sleep.
the fr still wkaes up from an gsm event after a few hours (6 or 10), but  
still the battery lasts a lot longer now.
thanks to Stevhen**, who pointed me to the qtopia sources executing the at  
commands on suspend/resume.

now, if someone could shed some light on what the do and which values are  
sensible/allowed besides 0 and 2? and if there's a way to know which event  
still escapes the guard and how to catch it?

in /etc/apm/suspend.d/

#!/bin/sh
PATH=/usr/bin:/bin

echo -e "AT+CREG=0"  | libgsmd-tool -m atcmd 2>&1 > /dev/null
echo -e "AT+CGREG=0" | libgsmd-tool -m atcmd 2>&1 > /dev/null
echo -e "AT%CREG=0"  | libgsmd-tool -m atcmd 2>&1 > /dev/null
echo -e "AT%CGREG=0" | libgsmd-tool -m atcmd 2>&1 > /dev/null
echo -e "AT%CSQ=0"   | libgsmd-tool -m atcmd 2>&1 > /dev/null


in /etc/apm/resume.d/

#!/bin/sh
PATH=/usr/bin:/bin

echo -e "AT+CREG=2"  | libgsmd-tool -m atcmd 2>&1 > /dev/null
echo -e "AT+CGREG=2" | libgsmd-tool -m atcmd 2>&1 > /dev/null
echo -e "AT%CREG=2"  | libgsmd-tool -m atcmd 2>&1 > /dev/null
echo -e "AT%CGREG=2" | libgsmd-tool -m atcmd 2>&1 > /dev/null
echo -e "AT%CSQ=1"   | libgsmd-tool -m atcmd 2>&1 > /dev/null





More information about the support mailing list