Alarm


Sphinxter said:
Alec  said:
Sphinxter said:
Embedded device so I wouldn't assume crond much less atd.

Why? 'at' is a standard POSIX application, so it has to work on pretty much any unix-like system.

Providing it is actually there taking up room on nand, stupid of me to even assume bash instead of sh.
ed; script fine, bb broken, usage alarm.sh 15:10 http://fullsack.com/images/alarm.sh

Your script would still take up more memory than atd :p

Code:
$ ps aux |grep -e USER -e alarm.sh -e atd
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
at        4081  0.0  0.0   2148   488 ?        Ss   13:09   0:00 /usr/sbin/atd
me       17133  0.0  0.0   4988  1176 pts/0    S+   19:23   0:00 bash alarm.sh 19:26
 
Last edited by a moderator:
Alec  said:
Sphinxter said:
Alec  said:
Sphinxter said:
Embedded device so I wouldn't assume crond much less atd.

Why? 'at' is a standard POSIX application, so it has to work on pretty much any unix-like system.

Providing it is actually there taking up room on nand, stupid of me to even assume bash instead of sh.
ed; script fine, bb broken, usage alarm.sh 15:10 http://fullsack.com/images/alarm.sh

Your script would still take up more memory than atd :p

Code:
$ ps aux |grep -e USER -e alarm.sh -e atd
  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
  at        4081  0.0  0.0   2148   488 ?        Ss   13:09   0:00 /usr/sbin/atd
  me       17133  0.0  0.0   4988  1176 pts/0    S+   19:23   0:00 bash alarm.sh 19:26

Code:
 [root@www ~]# ls -l /usr/sbin/atd
 -rwxr-xr-x 1 root root 20204 2007-07-04 02:35 /usr/sbin/atd
 [root@www ~]# ls -l /usr/local/fullsack/images/alarm.sh
 -rwxr-xr-x 1 linus linus 155 2009-12-13 16:04 /usr/local/fullsack/images/alarm.sh
 [root@www ~]#
ex-squeeze me?
 
Last edited by a moderator:
Sphinxter said:
Alec  said:
Sphinxter said:
Alec  said:
Sphinxter said:
Embedded device so I wouldn't assume crond much less atd.

Why? 'at' is a standard POSIX application, so it has to work on pretty much any unix-like system.

Providing it is actually there taking up room on nand, stupid of me to even assume bash instead of sh.
ed; script fine, bb broken, usage alarm.sh 15:10 http://fullsack.com/images/alarm.sh

Your script would still take up more memory than atd :p

Code:
$ ps aux |grep -e USER -e alarm.sh -e atd
  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
  at        4081  0.0  0.0   2148   488 ?        Ss   13:09   0:00 /usr/sbin/atd
  me       17133  0.0  0.0   4988  1176 pts/0    S+   19:23   0:00 bash alarm.sh 19:26

Code:
 [root@www ~]# ls -l /usr/sbin/atd
 -rwxr-xr-x 1 root root 20204 2007-07-04 02:35 /usr/sbin/atd
 [root@www ~]# ls -l /usr/local/fullsack/images/alarm.sh
 -rwxr-xr-x 1 linus linus 155 2009-12-13 16:04 /usr/local/fullsack/images/alarm.sh
 [root@www ~]#
ex-squeeze me?

First off, I said memory, not disk space. Not that it matters either way, since the space taken up is negligible.

Secondly, your script is still bad because:
- It probes for time about once a minute, which doesn't make sense since time is linear. Which leads to the problem that:
- It does not guarantee that the alarm will actually run because:
a. You're doing stuff inside the loop, meaning each iteration will take more than 60s
b. If you know anything about 'sleep', it only guarantees you that it will take at least the specified time
So there is a chance that it will skip over a minute, and you will sleep through a class, be late for work or miss an exam.
 
Last edited by a moderator:
Sphinxter said:
Just dashed off a few lines to illustrate, 'you can code your own'.
And I went on to say that there's no need code your own when there's a pre-existing one :rolleyes:
 
Last edited by a moderator:
Sphinxter said:
Just dashed off a few lines to illustrate, 'you can code your own'.
Hah. You also illustrated the danger of reinventing the wheel.

There's a very real chance this will fail.

If you're going to do it with this loop-and-check method, It's important to check for whether or not the target time has passed. There's always a chance that sleep will take an unusually long time to return. (Perhaps a complicated screensaver chose that moment to load up. Who knows.)

I'll admit that I'm not familiar enough with bash scripts to fix it. :unsure:
 
Last edited by a moderator:
I thought I read the pandora doesn't have a real time clock?

Does it?

Belthos
 
I hadnt thought about it at all, but hopefully the pandara does have a real time clock.
 
mali said:
I remember an old discussion in the other forums about this, but I can't recall what the conclusion was. People compared it to Nokia's Internet Tablets. A tweaked standby mode should allow wake up, I guess.

I kinda figured my N800's alarm handling abilities were due to the OMAP platform, and OMAP3 shouldn't lose anything there that OMAP2 had - note that if an alarm is set on my tablet, it will still go off even from being turned Off! Suspend should not be an issue. (And when it does go off, I don't hear it because the speakers are weak against the mighty jacket pocket. I assume it's too much to wish for that to be fixed on the Pandora...)

Another very smart thing the tablets have is a daemon to handle tracking alarms set by multiple programs and I think dealing with the hardware - something like that should be in libpnd if it isn't already. (Haven't checked. If not, Nokia's alarmd is open source - we could potentially just port it)

Any hardware people know the details?
 
Last edited by a moderator:
belthos said:
I thought I read the pandora doesn't have a real time clock?

Does it?

According to this (old) post by MWeston, it does.

RTC = yes!
IrDA = no
Bluetooth = no (now yes), but maybe some day if demand is high and we can keep the cost down
Microphone = yes
RS-232 = yes (well, it is CMOS levels, need external converter so actually this is just a UART controller)
It doesn't seem to get a lot of mention around the place, but maybe it's just not considered interesting enough to bother.
 
Last edited by a moderator:
belthos said:
I thought I read the pandora doesn't have a real time clock?

Does it?

Belthos

Full Specs

These are constantly changing. Hopefully, this page will be updated with them. When adding information please remember to correctly reference the new information to a reliable source.
General
  • The name: Pandora [1]
  • Dimensions: 140 x 83 x 27 mm (slightly larger than a DS Lite: vs 133 mm × 73.9 mm × 21.5 mm)
  • Price: First Batch (available to pre-order): 199 GBP(incl. VAT) (approx. $330 USD, 212 € (excl. VAT)
  • Second Batch: $339 USD pre-tax. Regional prices will be adjusted at the time of order to reflect current USD conversion rate.
  • The first batch of 4000 Pandoras are still available to pre-order, but only a few are left.
  • Case will be a bit smaller the GP2X, and will be a mix of metal and plastic. [2]
Core Hardware:
  • Texas Instrument's OMAP3530 System-on-chip. [3] [4] Specifications can be found at this link: [5]
  • PowerVR SGX GPU (OpenGL ES 2.0, several million polygons per second). OpenGL ES demonstrated: [6]
  • 128MB of DDR SDRAM in the developer units and 256MB in consumer units.
  • Real Time Clock (RTC) built in, to keep track of time. [7]
  • 256MB of internal flash memory on developer boards and 512MB on consumer pandoras.
  • Will be "unbrickable".
  • Display: 800x480 widescreen (5:3), 4.3 inches, touchscreen LCD.[8]
  • Brightness:300 cd/m2, Contrast ratio:450:1, Response time:tr+tf=30ms[9]
  • Dimensions: 93.6 x 56.2 mm (4.3 inches, 5:3 aspect ratio).
  • TV-out included in hardware, A/V-OUT Port (similar in appearance to a large USB OTG port) outputs S-Video and Composite and inputs 3,5mm Headphone/Microphone cables..
  • Separate TV-out signals, picture-in-picture capabilities. [10]
  • Powerful 2D and 3D hardware acceleration, see above. [11]

Source
 
Last edited by a moderator:
I was under the impression that this kind of functionality was possible. There've been three or four threads on this and from what I've gathered wake-up-on-rtc should be possible. Have I read wrong somewhere?
 
B-ZaR said:
I was under the impression that this kind of functionality was possible. There've been three or four threads on this and from what I've gathered wake-up-on-rtc should be possible. Have I read wrong somewhere?

It doesn't make sense that we won't have the functionality but I guess time will tell...
 
Last edited by a moderator:
shadow.8 said:
B-ZaR said:
I was under the impression that this kind of functionality was possible. There've been three or four threads on this and from what I've gathered wake-up-on-rtc should be possible. Have I read wrong somewhere?

It doesn't make sense that we won't have the functionality but I guess time will tell...

Just to clarify, I was referring to waking up from a suspend-to-ram state on an RTC triggered interrupt.
 
Last edited by a moderator:
B-ZaR said:
shadow.8 said:
B-ZaR said:
I was under the impression that this kind of functionality was possible. There've been three or four threads on this and from what I've gathered wake-up-on-rtc should be possible. Have I read wrong somewhere?
It doesn't make sense that we won't have the functionality but I guess time will tell...
Just to clarify, I was referring to waking up from a suspend-to-ram state on an RTC triggered interrupt.
I don't know a great deal about electronics -- but while I think it's very likely RTC-triggered wake-from-suspend will be possible with this hardware, as far as I know there's nothing intrinsic about RTCs that guarantee this functionality.

All an RTC guarantees is accurate time as long as power is available (even in the off state). If the chip doesn't offer event triggers but keeps time, it's still an RTC.

I expect the design chosen for the Pandora probably would support triggers, but good software support may be a long time coming.
I'll be perfectly happy with a low-power standby and software-triggered events, myself.
 
Last edited by a moderator:
Kagato said:
It doesn't seem to get a lot of mention around the place, but maybe it's just not considered interesting enough to bother.
A Real Time Clock was one of the main things that people wanted but was missing on the GP2X. There was no way that the Pandora devs were ever going to leave it out.
Once the Pandora was known to have one, people just didn't need to talk about it any more that's all :)
 
Last edited by a moderator:
Back
Top