Author Topic: Time sync  (Read 6338 times)

tawalker

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
    • http://
Time sync
« 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
---
Tim Walker - UK
Sharp Zaurus SL-5500 - OZ 3.3.5
"A.N.Other" 128Mb MMC - Buffalo CF WiFi
---

doseas

  • Full Member
  • ***
  • Posts: 207
    • View Profile
    • http://
Time sync
« Reply #1 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/

I haven\'t tested these, so use at your own risk...

Anonymous

  • Guest
Time sync
« Reply #2 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
#

allyrfriends

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • http://www.takeyourhand.com
Time sync
« Reply #3 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 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.
[span style=\'font-size:8pt;line-height:100%\']SL-C750/pdaXrom 1.1.0 rc8 + Symbol WiFi, Lexar 1GB SD, Kingston 256MB SD & Magicstor 2.2GB microdrive
SL-5500/OZ 3.5.1/GPE + Origo WiFi & Pretec 64MB SD
--------------------
We're driving the ghosts out!
[/span]

Anonymous

  • Guest
Time sync
« Reply #4 on: December 17, 2003, 08:56:40 pm »

Anonymous

  • Guest
Time sync
« Reply #5 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

Anonymous

  • Guest
Time sync
« Reply #6 on: December 17, 2003, 09:21:47 pm »
It works.

# rdate -p 132.163.4.101
Thu Dec 18 02:19:52 2003

Anonymous

  • Guest
Time sync
« Reply #7 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

Anonymous

  • Guest
Time sync
« Reply #8 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.

Anonymous

  • Guest
Time sync
« Reply #9 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.

Anonymous

  • Guest
Time sync
« Reply #10 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.

Anonymous

  • Guest
Time sync
« Reply #11 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.

tawalker

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
    • http://
Time sync
« Reply #12 on: December 18, 2003, 03:56:24 am »
Thanks for the multitude of suggestions here - I\'ll give them a try!

Tim
---
Tim Walker - UK
Sharp Zaurus SL-5500 - OZ 3.3.5
"A.N.Other" 128Mb MMC - Buffalo CF WiFi
---

Anonymous

  • Guest
Time sync
« Reply #13 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
$

Anonymous

  • Guest
Time sync
« Reply #14 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.