Help - Search - Members - Calendar
Full Version: An Idea
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
Bundabrg
Just wanted to put this down before I forget... Its niggling me in the back of the head and perhaps it might spark something off for someone else. I'll work on it a bit after I've slept on it.

We've (and by we've, I mean all except 6000 users :-P) gotten apmsleep going and thus the Z should be able to wake when needed. So far only kopi alarms are used as described in another thread.

I was toying with my Z and lamanting a bit how useless really a wireless card + email is on it, since using wireless I get at most 1.5 hours of use out of it. Its simply not possible to walk around the office and have the Z beep me when an email comes in. In fact, apart from updating the Z, I find wireless to be almost totally useless as when I use it I can feel the time ticking away.

Thats when I wondered that maybe there is a way to do it. What would happen is to have the Z suspend for say 5 mintutes, wake up... check emails (say with screen off to further preserve battery), and if nothing, suspend straight away again. This way you leave the wireless CF card in it, and as long as you're near your wireless net, it will act similar to a blackberry.


It would be relatively simply to have a script in wakeup.d that checks if OMPI is open, and if so, give a 5 minute timeout. Then have a script in resume.d that detects this particular event and triggers OMPI (or whatever) to check mail and force a quicker suspend if no event.

On a similar note, I'm proposing a slight change to the wakeup.d scripts, such that they can return a time AND a paramter (say 'kopi' if the kopi event is triggered), such that when a resume script is run it knows which wakeup even got triggered. I hope that makes sense. This means that if kopi was triggered, then a resume script can check to see if KOPI is even loaded, and if not, to also load it up (and thus trigger the alarm). Working this into the plan above, you'd have the 5 minute script pass a parameter of 'mail', and have a resume script detect this parameter and perform the mail check.

Just an idea. I'm thinking this way you get to keep the battery life, be able to have a mobile tool that can check for stuff like emails etc... Maybe there could be other users for peridic wakeup checks?

- Bundabrg
clofland
Here is the script that I use to do basically that:

http://www.oesf.org/forums/index.php?showtopic=15837

I posted it a while a go.

It uses bluetooth over my cellphone, instead of WiFi, but it seems the modification would be easy enough.

It just relies on the timeout to go back to sleep. If you find some way to have it put itself back to sleep, without interfering with normal operation, I would be interested.
Bundabrg
I'll post my scripts soon as an ipk. I hope you don't mind if I plagerise bits of your script (it does more than what I was thinking). I use offlineimap instead of fetchmail.

My only hitch is that I don't want normal timeouts since Wireless sucks down the power. I'm trying to work an easy way to determine if a timeout wake has occurred, or the power button was pressed.

- Bundabrg
clofland
Use all you want. I am very glad to see some more work in the same general direction. I look forward to seeing what you come up with. I am sure I will use some of it myself.
clofland
Bundabrg, be sure to check out the atd program Sash just posted at the end of this thread http://www.oesf.org/forums/index.php?showtopic=16455

With this you don't have to use that buggy apmsleep thingy to wake up the Z.

I've been testing it, and so far so good!
Bundabrg
Perfect smile.gif atd in that manner actually means the whole script is not even needed smile.gif

I've not yet managed to get offlineimap to work yet, but I'm a whole lot closer now. Fetchmail would work fine except I have LOTS of folders on my server.

- bundabrg
clofland
QUOTE(Bundabrg @ Dec 14 2005, 12:48 AM)
I've not yet managed to get offlineimap to work yet, but I'm a whole lot closer now. Fetchmail would work fine except I have LOTS of folders on my server.
*


Oh, yeah. Fetchmail only checks the INBOX folder. That is all I wanted to do, since that is where new mail comes in.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.