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

2008-08-15 Thread Thomas B.
On Fri, Aug 15, 2008 at 08:35:20PM +0200, arne anka wrote:
> 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?

With OM2008.8, at least in its current configuration, the complete
communication with the GSM modem is written to the log. Maybe you could
do something similar in OM2007.2 to be able to read what the modem sent
when it woke up the system (if it sent something)?

Regards,
Thomas


___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


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

2008-08-15 Thread Thomas B.
On Fri, Aug 15, 2008 at 03:16:58PM -0500, Steven ** wrote:
> Thanks should be directed to Thomas B. <[EMAIL PROTECTED]>.  He's the
> one that found the relevant Qtopia source.  Thanks Thomas!

Glad that I could help :-)

Regards,
Thomas


___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-15 Thread arne anka
> Well, you could turn the GSM chip off via the power menu...

that's not really a solution.
yers ago i had i cellphone working in the 1800 band only. since my  
provider did not cover the entire area i was moving in sometimes the phone  
did not find connection and scanned wildly burning a lot of power.
for exactly those situations one could disable scanning, the phone did not  
try to find a new tower once it lost connection, but when back in coverage  
it worked.

> I have noticed once or twice that the signal strength doesn't report
> right after a resume with these commands.  It may have been because I
> did a suspend while without signal and a resume with.  I don't really
> know...

i think the comments or something i found on the net suggested that one of  
the commands disabled updating of signal strength, thus wrong numbers are  
to expect but should be ok soon (depending on the intervall)

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


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

2008-08-15 Thread Steven **
Thanks should be directed to Thomas B. <[EMAIL PROTECTED]>.  He's the
one that found the relevant Qtopia source.  Thanks Thomas!

-Steven

On Fri, Aug 15, 2008 at 1:35 PM, arne anka <[EMAIL PROTECTED]> wrote:
> 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
>
>
> ___
> support mailing list
> support@lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
>

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-15 Thread Steven **
Well, you could turn the GSM chip off via the power menu...

I haven't noticed a large power drain when without signal.  It
suspends just fine now and will sit in suspend consistently.
Suspended for an hour uses 1% or so of the battery.  Perhaps one of
the GSM commands in the suspend script is disabling that search.

I have noticed once or twice that the signal strength doesn't report
right after a resume with these commands.  It may have been because I
did a suspend while without signal and a resume with.  I don't really
know...

-Steven

On Fri, Aug 15, 2008 at 1:13 PM, arne anka <[EMAIL PROTECTED]> wrote:
>> it's worth mentioning that running GSM without association to a network
>> probably drains battery like hell, as GSM-chipsets tend to constantly
>> search
>> the whole frequency range for some BS to register. I've experienced
>> factor 5
>> to 10 for power consumption.
>
> i know, i had a phone once that allowed to disable that -- is there a way
> to tell the gsm modem not to do so?
>
> ___
> support mailing list
> support@lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
>

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


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

2008-08-15 Thread arne anka
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


___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-15 Thread arne anka
> it's worth mentioning that running GSM without association to a network
> probably drains battery like hell, as GSM-chipsets tend to constantly  
> search
> the whole frequency range for some BS to register. I've experienced  
> factor 5
> to 10 for power consumption.

i know, i had a phone once that allowed to disable that -- is there a way
to tell the gsm modem not to do so?

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-15 Thread Joerg Reisenweber
Am Mi  13. August 2008 schrieb arne anka:
> > I finally got around to checking this.  The script runs instantly when
> > I have cell registration.  So, that explains why my script was taking
> > so long.  But what can I do about it?
> 
> you could check if you have registration, someway along
> echo -n "csr" | libgsmd-tool -m shell
> and read the return.
> 
> 
> > If I've suspended my Neo, I
> > wouldn't want it waking up (and corrupting the SD card) as soon as I
> > move into a cell tower's range...

it's worth mentioning that running GSM without association to a network 
probably drains battery like hell, as GSM-chipsets tend to constantly search 
the whole frequency range for some BS to register. I've experienced factor 5 
to 10 for power consumption.

/jOERG


signature.asc
Description: This is a digitally signed message part.
___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-13 Thread Andy Green
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


|>> To what are you referring?  Did you see that in the linked qtopia code?
|> no. i think you said that -- umount/mount on suspend/resume was a
|> workaround except when resuming from gsm event. am i wrong?

| Oh, yes.  That is what it seemed like.  Perhaps I was just unlucky the
| first time.  I'll mess with it again after work to confirm that that
| truly is the difference.  But right now, I haven't corrupted my SD
| card for a few days.

I'm pretty sure this will make you immune for getting crapped on.  But
for SD Card rootfs case, it isn't really a solution.

- -Andy
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkijGY4ACgkQOjLpvpq7dMrCSQCglCwDj9FwEP3k7gDZzC/NrOgj
GEYAn0lvdZw4ZdCqm4V4yYD1w4xcEyov
=Ijzp
-END PGP SIGNATURE-

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-13 Thread Steven **
Oh, yes.  That is what it seemed like.  Perhaps I was just unlucky the
first time.  I'll mess with it again after work to confirm that that
truly is the difference.  But right now, I haven't corrupted my SD
card for a few days.

-Steven

On Wed, Aug 13, 2008 at 9:42 AM, arne anka <[EMAIL PROTECTED]> wrote:
>> To what are you referring?  Did you see that in the linked qtopia code?
>
> no. i think you said that -- umount/mount on suspend/resume was a
> workaround except when resuming from gsm event. am i wrong?
>
> ___
> support mailing list
> support@lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
>

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-13 Thread arne anka
> To what are you referring?  Did you see that in the linked qtopia code?

no. i think you said that -- umount/mount on suspend/resume was a  
workaround except when resuming from gsm event. am i wrong?

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-13 Thread Steven **
To what are you referring?  Did you see that in the linked qtopia code?

-Steven

On Wed, Aug 13, 2008 at 8:08 AM, arne anka <[EMAIL PROTECTED]> wrote:
> well, i am still curios inhowfar resume_reason!=GSM is different from
> resume_reason==GSM ...

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-13 Thread arne anka
> I finally got around to checking this.  The script runs instantly when
> I have cell registration.  So, that explains why my script was taking
> so long.  But what can I do about it?

you could check if you have registration, someway along
echo -n "csr" | libgsmd-tool -m shell
and read the return.


> If I've suspended my Neo, I
> wouldn't want it waking up (and corrupting the SD card) as soon as I
> move into a cell tower's range...

well, i am still curios inhowfar resume_reason!=GSM is different from  
resume_reason==GSM ...

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-13 Thread Steven **
I finally got around to checking this.  The script runs instantly when
I have cell registration.  So, that explains why my script was taking
so long.  But what can I do about it?  If I've suspended my Neo, I
wouldn't want it waking up (and corrupting the SD card) as soon as I
move into a cell tower's range...

Oh well, it's a good start.

-Steven

On Tue, Aug 12, 2008 at 9:52 AM, arne anka <[EMAIL PROTECTED]> wrote:
>> Yup.  OM2007.2 used here.
>
> check when you got registration?
>
> ___
> support mailing list
> support@lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
>

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-12 Thread arne anka
> Yup.  OM2007.2 used here.

check when you got registration?

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-12 Thread Steven **
Yup.  OM2007.2 used here.

-Steven

On Tue, Aug 12, 2008 at 9:42 AM, arne anka <[EMAIL PROTECTED]> wrote:
>> I'm concerned then.  Running the commands with "echo -e ..." takes
>> even longer.  I gave up and killed the script after 6 minutes. Maybe
>> it's because I'm not receiving cell signals right now?  Why else would
>> mine take so long when yours goes quick?
>
> sounds likely. but then, i do absolutely not know how the libsmd-tool
> stuff works internally.
> do you use 2007.2?
>
> ___
> support mailing list
> support@lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
>

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-12 Thread arne anka
> I'm concerned then.  Running the commands with "echo -e ..." takes
> even longer.  I gave up and killed the script after 6 minutes. Maybe
> it's because I'm not receiving cell signals right now?  Why else would
> mine take so long when yours goes quick?

sounds likely. but then, i do absolutely not know how the libsmd-tool  
stuff works internally.
do you use 2007.2?

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-12 Thread Steven **
On Tue, Aug 12, 2008 at 7:44 AM, arne anka <[EMAIL PROTECTED]> wrote:
>> Well, I think I figured it out a little myself.  Maybe I'm doing it
>> wrong, but those chat commands take a long time to run on my Neo.
>
> i do
> echo -e "AT..." | libgsmd-tool -m atcmd
> and there's no significant delay.

I'm concerned then.  Running the commands with "echo -e ..." takes
even longer.  I gave up and killed the script after 6 minutes. Maybe
it's because I'm not receiving cell signals right now?  Why else would
mine take so long when yours goes quick?


> i am still not sure if my script in /etc/apm/suspend.d/ is read on suspend
> (had to run it by hand), so i'd like to check that before posting.

My apm definitely runs the script I have there before suspend.  I have
it unmounting the SD card and stopping the audio services (trying to
work around other suspend bugs).

-Steven

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-12 Thread arne anka
> Well, I think I figured it out a little myself.  Maybe I'm doing it
> wrong, but those chat commands take a long time to run on my Neo.

i do
echo -e "AT..." | libgsmd-tool -m atcmd
and there's no significant delay.

> There's no way they were run before the device entered suspend when I
> put them in the /etc/apm/suspend.d/ folder.  Does your suspend script
> take several minutes to run?  Each chat command I run takes about 45
> seconds.

see above.
i am still not sure if my script in /etc/apm/suspend.d/ is read on suspend  
(had to run it by hand), so i'd like to check that before posting.

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-12 Thread Steven **
Well, I think I figured it out a little myself.  Maybe I'm doing it
wrong, but those chat commands take a long time to run on my Neo.
There's no way they were run before the device entered suspend when I
put them in the /etc/apm/suspend.d/ folder.  Does your suspend script
take several minutes to run?  Each chat command I run takes about 45
seconds.

I ran each of the commands and then ran "apm -s".  I still get woken
up in under a minute almost every time.  So, there has so be some
other GSM event affecting me.

-Steven

On Tue, Aug 12, 2008 at 6:52 AM, Steven ** <[EMAIL PROTECTED]> wrote:
> Would you mind posting those scripts?  I'd like to try them out.
>
> -Steven
>
> On Tue, Aug 12, 2008 at 4:13 AM, arne anka <[EMAIL PROTECTED]> wrote:
 http://git.openmoko.org/?p=qtopia.git;a=blob;f=devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp;hb=HEAD#l603
>>
>> i put it into /etc/apm/suspend.d/ (and the accoring reset into
>> /etc/apam/resume.d/) and after running the script manually (apm seemed not
>> to pick it up automatically, needs further inverstigation) at 00:48 it
>> slept until 10:27 -- then i was somewhere on my way into the office.
>> looks very promising though there's apparently still a gsm event not
>> catched.
>> does somebody know how to check the state of CSQ, CREG, CGREG? i'd like to
>> see if the scripts have effect or if it's only coincidence.
>>
>> ___
>> support mailing list
>> support@lists.openmoko.org
>> https://lists.openmoko.org/mailman/listinfo/support
>>
>

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-12 Thread Steven **
Would you mind posting those scripts?  I'd like to try them out.

-Steven

On Tue, Aug 12, 2008 at 4:13 AM, arne anka <[EMAIL PROTECTED]> wrote:
>>> http://git.openmoko.org/?p=qtopia.git;a=blob;f=devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp;hb=HEAD#l603
>
> i put it into /etc/apm/suspend.d/ (and the accoring reset into
> /etc/apam/resume.d/) and after running the script manually (apm seemed not
> to pick it up automatically, needs further inverstigation) at 00:48 it
> slept until 10:27 -- then i was somewhere on my way into the office.
> looks very promising though there's apparently still a gsm event not
> catched.
> does somebody know how to check the state of CSQ, CREG, CGREG? i'd like to
> see if the scripts have effect or if it's only coincidence.
>
> ___
> support mailing list
> support@lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
>

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-12 Thread arne anka
>> http://git.openmoko.org/?p=qtopia.git;a=blob;f=devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp;hb=HEAD#l603

i put it into /etc/apm/suspend.d/ (and the accoring reset into  
/etc/apam/resume.d/) and after running the script manually (apm seemed not  
to pick it up automatically, needs further inverstigation) at 00:48 it  
slept until 10:27 -- then i was somewhere on my way into the office.
looks very promising though there's apparently still a gsm event not  
catched.
does somebody know how to check the state of CSQ, CREG, CGREG? i'd like to  
see if the scripts have effect or if it's only coincidence.

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-11 Thread arne anka
> http://git.openmoko.org/?p=qtopia.git;a=blob;f=devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp;hb=HEAD#l603

sounds good, i give it a try tonight.

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-11 Thread Thomas B.
On Mon, Aug 11, 2008 at 12:14:10PM +0200, arne anka wrote:
> i logged the resume_reason for the past days and all undesired wakeups are  
> caused by EINT01_GSM -- as expected.
> so, i'd like to catch that events and send the phone back to sleep  
> immediately.
> but, and it's a big but, EINT01_GSM is triggered even when a call comes in  
> (and probably an sms, too). so it's not sufficient.

Another idea: While poking through the Qtopia source code, I found
something that might be interesting. Upon suspend, Qtopia sends commands
to the modem to disable notifications about cell broadcasts, signal
quality, etc. Upon wakeup the settings are restored. If you want to see
how this is done, you can look here, for example:

http://git.openmoko.org/?p=qtopia.git;a=blob;f=devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp;hb=HEAD#l603

I don't know whether OM2007.2 does something similar at the moment (I
haven't looked), but if it doesn't then adding it might help.

Regards,
Thomas


___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


gta02, 2007.2: frequent wakeups -- creating workaround

2008-08-11 Thread arne anka
i logged the resume_reason for the past days and all undesired wakeups are  
caused by EINT01_GSM -- as expected.
so, i'd like to catch that events and send the phone back to sleep  
immediately.
but, and it's a big but, EINT01_GSM is triggered even when a call comes in  
(and probably an sms, too). so it's not sufficient.

how do i the following three things in sh/bash:

- how do i check if a call is coming in or ongoing?
- how do i check if an sms causing the wake up?
- how do i disable the touchscreen temporarily?

someone told that raster is creating a daemon handling this kind of  
things, but ther was no answer to my inquiry if it would be asu specific,  
and anyway with raster leaving and the 2008.8 just released i don't expect  
it to be finished in a near future.
the phone waking up every 6 or 7 minutes as it hours on end does _is_  
annoying and i like to create a workaround at least.

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support