Author Topic: An Idea  (Read 3619 times)

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
An Idea
« on: December 09, 2005, 10:01:36 am »
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
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
An Idea
« Reply #1 on: December 12, 2005, 01:08:15 pm »
Here is the script that I use to do basically that:

https://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.
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
An Idea
« Reply #2 on: December 12, 2005, 07:14:14 pm »
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
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
An Idea
« Reply #3 on: December 13, 2005, 11:37:54 am »
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.
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
An Idea
« Reply #4 on: December 13, 2005, 03:03:00 pm »
Bundabrg, be sure to check out the atd program Sash just posted at the end of this thread https://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!
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
An Idea
« Reply #5 on: December 14, 2005, 01:48:52 am »
Perfect  atd in that manner actually means the whole script is not even needed

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
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
An Idea
« Reply #6 on: December 14, 2005, 08:52:28 am »
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=107063\"][{POST_SNAPBACK}][/a][/div]

Oh, yeah. Fetchmail only checks the INBOX folder. That is all I wanted to do, since that is where new mail comes in.
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -