OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: tawalker on December 16, 2003, 10:42:59 am

Title: Time sync
Post by: tawalker on December 16, 2003, 10:42:59 am
I was wondering what NTP clients exist for the Zaurus - that is, for sync\'ing the system clock with an Internet time server. ISTR there\'s a commercial program on Handango (\"Drifter\"?), but are there any alternatives (command-line or graphical)?

Many thanks,
Tim
Title: Time sync
Post by: doseas on December 17, 2003, 07:22:52 pm
Hint: Googling \"Zaurus NTP\" turned up several hits.

It looks like there is a copy of ntpdate here, with instructions:
 www.geocities.co.jp/SiliconValley-Bay/1180/download.html
(use Babelfish to translate)

I found a beta copy of qpe-ndate, with source code, here:
  http://www.oeste.de/download/ (http://www.oeste.de/download/)

I haven\'t tested these, so use at your own risk...
Title: Time sync
Post by: Anonymous on December 17, 2003, 07:56:55 pm
Quote
are there any alternatives (command-line or graphical)?
I run this shell script from an icon. (only good for USA time zones)
Substitute for your location.

# cat runtime.sh
#!/bin/sh
$QPEDIR/bin/evm -Xprogress:2000 -XappName=runtime.sh -appletviewer http://nist.time.gov/timezone.cgi?Hawaii-A...tian/d/-10/java (http://nist.time.gov/timezone.cgi?Hawaii-Aleutian/d/-10/java)
#
Title: Time sync
Post by: allyrfriends on December 17, 2003, 08:08:43 pm
Opie\'s date and time settings application has an option to use NTP; it comes as standard on OZ. I\'m pretty sure this (http://www.openzaurus.org/official/stable/feed/ntpdate_4.1.1a-2_arm.ipk) is the command line NTP program used by Open Zaurus and that it would probably work on a Sharp ROM but I\'m not promising.
Title: Time sync
Post by: Anonymous on December 17, 2003, 08:56:40 pm
http://docs.zaurus.com/feed/rdate_1.3-3_arm.ipk (http://docs.zaurus.com/feed/rdate_1.3-3_arm.ipk)
Title: Time sync
Post by: Anonymous on December 17, 2003, 09:01:30 pm
Frontend for rdate to get a servers time
http://docs.zaurus.com/feed/synchronizeclo...ock_1.0_arm.ipk (http://docs.zaurus.com/feed/synchronizeclock_1.0_arm.ipk)
Title: Time sync
Post by: Anonymous on December 17, 2003, 09:21:47 pm
It works.

# rdate -p 132.163.4.101
Thu Dec 18 02:19:52 2003
Title: Time sync
Post by: Anonymous on December 17, 2003, 09:44:45 pm
Quote
Frontend for rdate to get a servers time
This works if it runs with root privilege. I tried server NIST server 132.163.4.101
Title: Time sync
Post by: Anonymous on December 17, 2003, 11:39:19 pm
The time is wrong with rdate after suspend and resume. I need to set the time in the Date/Time application.
Title: Time sync
Post by: Anonymous on December 17, 2003, 11:59:22 pm
Thanks to doseas for finding an app that works.

ntpdate_ntp-4.1.1b-z-4_arm works and the time holds after suspend/resume. I also installed rdate.
Title: Time sync
Post by: Anonymous on December 18, 2003, 12:08:22 am
# ntpdate 132.163.4.101
18 Dec 05:05:46 ntpdate[12358]: step time server 132.163.4.101 offset 240253.508038 sec
Write to trigger.
# date
Thu Dec 18 05:06:33 UTC 2003
#
sucess!

Sorry for all the posts.
Title: Time sync
Post by: Anonymous on December 18, 2003, 01:05:27 am
The correct date holds after reboot. ntpdate must change the hardware clock. You don\'t need rdate for ntpdate to work. Now I can assign an icon to the ntpdate script.
Title: Time sync
Post by: tawalker on December 18, 2003, 03:56:24 am
Thanks for the multitude of suggestions here - I\'ll give them a try!

Tim
Title: Time sync
Post by: Anonymous on December 18, 2003, 09:33:15 am
Here are two scripts to run ntpdate. Call runntpdate from an icon.

# pwd
/home/QtPalmtop/bin
# cat runntpdate
#!/bin/sh
qcop QPE/Application/embeddedkonsole \'setDocument(QString)\' \'/home/QtPalmtop/bin/setntpdate.sh\'
exit 0
#
# cat setntpdate.sh
#!/bin/sh
su -c \'/home/root/usr/bin/ntpdate 132.163.4.101\'
echo set date/time with ntpdate
date
exit 0
#

output looks like this in embeddedkonsole.

$ su -c \'/home/QtPalmtop/bin/setntpdate.sh\'
Password:
18 Dec 14:30:03 ntpdate[1237]: adjust time server 132.163.4.101 offset -0.008508 sec
Write to trigger.
set date/time with ntpdate
Thu Dec 18 14:30:03 UTC 2003
$
Title: Time sync
Post by: Anonymous on December 18, 2003, 02:46:09 pm
You can use rdate to set the software clock and sync the hardware clock.

Sending a command to the pipe /var/spool/at/trigger causes the hwclock to sync up with the software clock. That is what ntpdate does.

# rdate 132.163.4.101
# echo \'W\' ] /var/spool/at/trigger

I verified that the adjusted date and time hold after suspend/resume and after reboot.
Title: Time sync
Post by: Anonymous on December 18, 2003, 09:35:50 pm
I found out that ntpdate will accept 2 time server addresses.

#!/bin/sh
echo set date/time with ntpdate
su -c \'/home/root/usr/bin/ntpdate 132.163.4.101 192.43.244.18\'
date
exit 0
Title: Time sync
Post by: ScytheBlade1 on May 29, 2004, 12:46:37 am
Err......does anyone know of a place where I can obtain ntpdate?

I\'ve googled...ALL the mirrors are either 404, host can\'t be resolved, or it\'s been bought by the classic \"vapor-ware\" search engines.

(edit: for the sl-5600, sharp rom)
Title: Time sync
Post by: snufkin on May 29, 2004, 01:00:39 am
try here (it\'s a jap site):
http://www.geocities.co.jp/SiliconValley-B...0/download.html (http://www.geocities.co.jp/SiliconValley-Bay/1180/download.html)
Title: Time sync
Post by: tz on May 30, 2004, 01:19:31 pm
note you might need to stop and restart atd and do \"hwclock -w\" to set the cmos clock instead of just the system clock.  I think the clock application also does this.