Author Topic: Ko/pi Alarm Applet Needed  (Read 20458 times)

scoutme

  • Hero Member
  • *****
  • Posts: 579
    • View Profile
Ko/pi Alarm Applet Needed
« on: July 25, 2005, 05:44:50 am »
Does anyone know how to obtain it?
« Last Edit: July 25, 2005, 05:45:07 am by scoutme »

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Ko/pi Alarm Applet Needed
« Reply #1 on: July 25, 2005, 06:28:38 am »
One way is :

- compile the atd daemon from (http://handhelds.org/cgi-bin/cvsweb.cgi/apps/atd/)
- compile and find out how the qcop for X11/opie works (http://handhelds.org/cgi-bin/cvsweb.cgi/opie/x11/libqpe-x11/qt/)
- hack the qalarm daemon from qtopia so that it works with the above qcop
- rewrite the applet for matchbox and the above
- modify the ko/pi build for the desktop so that it uses the above

Another way would be to write an applet that uses the atd daemon directly,  write some custom inter-process communication and modify ko/pi to use this....

And other things like this (like modify the atd daemon so that it communicates directly with kopi, write a custom daemon...)

in short it requires a bit of work.

(Please correct me if I am wrong and if there is a more simple way that I  completely missed)
SLC-860 cacko / senao wifi

Chero

  • Hero Member
  • *****
  • Posts: 1140
    • View Profile
    • http://users.telenet.be/zaurususer/Chero
Ko/pi Alarm Applet Needed
« Reply #2 on: July 25, 2005, 09:12:29 am »
Hello,

I thought I read somewhere that kopi alarms now (version 2.x.x) work on linux desktop.
Does pdaX act as a linux desktop ? So maybe with the new version the alarms will work on pdaX.

Chero.
HP-95LX -> HP Jornada 680 -> SL-C860 -> SL-C3100 -> Fuji u810 -> SL-C1000 -> HTC uni -> SL-C860 -> SL-C760.
March 12 2009 : Back because the Zaurus is one of a kind.
SL-C760 : pdaXrom
Pandora pre-ordered -> received and tested : great device but not my cup of tea -> sold.

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Ko/pi Alarm Applet Needed
« Reply #3 on: July 25, 2005, 10:12:25 am »
I think alarms work on the desktop version in that if you have kopi open it gives you an alert.

On qtopia, the alarm can wake up the Z and start ko/pi.

(maybe while setting up an alarm, it is possible to set an alarm with at  to wake the Z up and start ko/pi)

Though I might be wrong
« Last Edit: July 25, 2005, 10:13:59 am by pgas »
SLC-860 cacko / senao wifi

Chero

  • Hero Member
  • *****
  • Posts: 1140
    • View Profile
    • http://users.telenet.be/zaurususer/Chero
Ko/pi Alarm Applet Needed
« Reply #4 on: July 25, 2005, 03:01:07 pm »
I wonder what would happen on the Z, if you have this version (> 2.1.0) of kopi running and the Z suspended.

Chero
HP-95LX -> HP Jornada 680 -> SL-C860 -> SL-C3100 -> Fuji u810 -> SL-C1000 -> HTC uni -> SL-C860 -> SL-C760.
March 12 2009 : Back because the Zaurus is one of a kind.
SL-C760 : pdaXrom
Pandora pre-ordered -> received and tested : great device but not my cup of tea -> sold.

scoutme

  • Hero Member
  • *****
  • Posts: 579
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #5 on: July 25, 2005, 08:25:48 pm »
gonna try if kopi can wake up the Z

I'll let you know

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #6 on: July 26, 2005, 01:19:13 am »
Quote
gonna try if kopi can wake up the Z

I'll let you know
[div align=\"right\"][a href=\"index.php?act=findpost&pid=89516\"][{POST_SNAPBACK}][/a][/div]

Doesn't work, at least for me.
If anyone knows how to 'wake' the Z then it shouldn't be too difficult to retrieve the next alarm from ko/pi, and I'll be happy to give it a go.

I suspect (though I may be wrong ;-) that under QT it does the following just before it suspends: -
  - Check when the next alarm is? (1440 seconds away...)
  - Tell apm to wake in 1440-10 seconds
  - Tell apm to suspend

 ...
  - apm wakes Z
  - alarm applet gets triggered since its open

 - Bundabrg
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #7 on: July 31, 2005, 04:09:27 am »
Ok, to 'wake' after a sleep you need to apmsleep command. I've seen another thread about this some day. I'm going to apt-get it in my debian chroot and play around.

 - Bundabrg

Quote
Quote
gonna try if kopi can wake up the Z

I'll let you know
[div align=\"right\"][a href=\"index.php?act=findpost&pid=89516\"][{POST_SNAPBACK}][/a][/div]

Doesn't work, at least for me.
If anyone knows how to 'wake' the Z then it shouldn't be too difficult to retrieve the next alarm from ko/pi, and I'll be happy to give it a go.

I suspect (though I may be wrong ;-) that under QT it does the following just before it suspends: -
  - Check when the next alarm is? (1440 seconds away...)
  - Tell apm to wake in 1440-10 seconds
  - Tell apm to suspend

 ...
  - apm wakes Z
  - alarm applet gets triggered since its open

 - Bundabrg
[div align=\"right\"][a href=\"index.php?act=findpost&pid=89531\"][{POST_SNAPBACK}][/a][/div]
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

macwiz

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • http://www.macwiz.co.uk
Ko/pi Alarm Applet Needed
« Reply #8 on: August 01, 2005, 07:34:26 pm »
Any update on this? I really want my Z to have an wake-up/alarm function. This is one of the reasons my Z languishes unused for over long periods. I know people say that their Z is like a mini laptop... and it is fantastic, but I also want it to be pda too.

Oooh, dodgy ground here I think... but the alarm function is a big thing for me. If a crappy little £10 data bank can buzz me, why can't my Z?

Please tell me it can and that I am talking utter drivel.

J
Macwiz
c860, never quite lived up to my expectations... my fault I guess
17in MacBook Pro lovely xxxx
iPhone 3G ummm
SE P990i with UIQ3. Never enough RAM.
Pocket Loox 720 used for designing ebooks. Just don't like it though!

macwiz: apple mac support in Oxfordshire
Twitter: @boffinboy

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #9 on: August 01, 2005, 08:54:25 pm »
apmsleep actually works ;-). As mentioned in the other thread, if you use apmsleep from a terminal window (or indeed, directly call 'apm --suspend'), when you resume the pda is very slow and unresponsive till you suspend and resume the normal way.

When you suspend using xset, ie by doing the following: -
Code: [Select]
xset dpms force off
Then it does something, and calls 'apm --suspend' as its last step. It seems to work fine.

I have already modified /usr/bin/apm to call run-parts on a directory of files when suspending. However if you edit /usr/bin/apm, and instead of getting it to call 'apm.x --suspend' to perform the suspend, you call 'apmsleep +00:01', it will go to sleep, wake up a minute later and it works fine.

SO... what needs to be done is as follows: -
1. Modify /usr/bin/apm to call something else to checks the calender (and perhaps a few other things) for the next event that occurs. Work out how many minutes/seconds away, or work out the absolute time.

2. If no event at all, then call 'apm.x --suspend'.

3. If there is an event, then call 'apmsleep +relative' or 'apmsleep absolute' in /usr/bin/apm

4. The pda will wake up at that time, and the event will trigger the alarm.

5. Probably be good to have some way of when being woken by event (rather than by user) it is re-suspended in a shorter time (say 30 seconds). Havn't worked out a good way of doing that yet since apm doesn't seem to be called on resume.


Anyway, mooch point for me for the moment since for some obscure reason KOPI doesn't actually play audibly any alarms on my C860. If I set the alarm as a procedure alarm that calls a script that calls 'play blah', it plays the sounds, but not otherwise.

 - Bundabrg



Quote
Any update on this? I really want my Z to have an wake-up/alarm function. This is one of the reasons my Z languishes unused for over long periods. I know people say that their Z is like a mini laptop... and it is fantastic, but I also want it to be pda too.

Oooh, dodgy ground here I think... but the alarm function is a big thing for me. If a crappy little £10 data bank can buzz me, why can't my Z?

Please tell me it can and that I am talking utter drivel.

J
[div align=\"right\"][a href=\"index.php?act=findpost&pid=90437\"][{POST_SNAPBACK}][/a][/div]
« Last Edit: August 03, 2005, 06:16:43 am by Bundabrg »
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

leskimo

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Ko/pi Alarm Applet Needed
« Reply #10 on: August 03, 2005, 05:47:11 am »
A bit off-topic - where can I find kopi/kdepim >2.1.0 (precompiled) for pdax..?

leskimo
SL-C1000, pdaXrom beta3
Buffalo WiFi, Corega LAN, Socket Bluetooth

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #11 on: August 03, 2005, 06:21:44 am »
Hmm, I suppose I should attach apmsleep, since its not included in pdaXrom at the moment. I pulled this directly from my debian chroot, and it has no other dependencies that are unmet in a standard pdaXrom install.

Just ungzip it, and copy to /usr/bin.

 - Bundabrg
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

danr

  • Full Member
  • ***
  • Posts: 138
    • View Profile
    • http://
Ko/pi Alarm Applet Needed
« Reply #12 on: August 03, 2005, 11:16:09 am »
Quote
Anyway, mooch point for me for the moment since for some obscure reason KOPI doesn't actually play audibly any alarms on my C860. If I set the alarm as a procedure alarm that calls a script that calls 'play blah', it plays the sounds, but not otherwise.

 - Bundabrg

I think the bit that plays a wave file is in kalarmd/alarmdialog.cpp, and the command is

Code: [Select]
QString command = "playwave -r 22050 " + mFileName;
Recently I had a binary, 'play', which would play wav files (seems to have disappeared from my system now), so when I changed the line to call 'play', the alarm worked fine.

Dan
SL-C860 running Debian EABI on top of Angstrom 2.6 kernel

gromituk

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #13 on: August 03, 2005, 11:52:32 am »
Quote
I think the bit that plays a wave file is in kalarmd/alarmdialog.cpp, and the command is

Code: [Select]
QString command = "playwave -r 22050 " + mFileName;[div align=\"right\"][a href=\"index.php?act=findpost&pid=90617\"][{POST_SNAPBACK}][/a][/div]

Ooh good tip.  This, of course, means that you can create a file in /usr/local/bin called playwave, containing
Code: [Select]
play $3Make it executable, and it should allow alarms to play without recompiling ko/pi, should it not?

danr

  • Full Member
  • ***
  • Posts: 138
    • View Profile
    • http://
Ko/pi Alarm Applet Needed
« Reply #14 on: August 04, 2005, 03:54:06 am »
Quote
A bit off-topic - where can I find kopi/kdepim >2.1.0 (precompiled) for pdax..?

leskimo
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

I have attached the latest version [a href=\"https://www.oesf.org/forums/index.php?showtopic=11164&st=15#]here.[/url]

Dan
SL-C860 running Debian EABI on top of Angstrom 2.6 kernel