| Prev |   1   2   3     4   | Next
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   How can N900 sync time? GPS, NTP, and/or GSM? (https://talk.maemo.org/showthread.php?t=37662)

debernardis 2010-01-15 16:59

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
Search the forum for rdate, which works very well

RobbH 2010-01-16 14:02

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
Quote:

Originally Posted by debernardis (Post 474458)
Search the forum for rdate, which works very well

Many, many thanks! I found rdate here: http://nitapps.com/

I'm still hoping for a working ntpd to maintain clock accuracy without my intervention, but this serves my purposes very well.


Quote:

Originally Posted by Rob1n (Post 474453)
Crikey, you must have a really tight schedule :p

Well, yeah! Sometimes. :D

I work in broadcasting. When you're trying to hit a network feed that begins at precisely one minute past the top of the hour, a six-second error sounds really nasty!

vinc17 2010-01-30 23:19

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
Quote:

Originally Posted by RobbH (Post 474439)
If this works for you, that's great. I'm not seeing any change when I run this version of ntpd. In addition, this is not the way it's intended to work.

I would really like to see a working implementation of ntpd or some other form of ntp on the N900.

When running ntpd directly as suggested, this doesn't work either on my N900. I get the error message "fatal: stat: No such file or directory" in /var/log/syslog. However "/etc/init.d/openntpd start" works.

youxing 2010-02-09 17:38

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
1 Attachment(s)
Quote:

Originally Posted by vinc17 (Post 503143)
When running ntpd directly as suggested, this doesn't work either on my N900. I get the error message "fatal: stat: No such file or directory" in /var/log/syslog. However "/etc/init.d/openntpd start" works.

Thats great! I created a shell script:
Code:

# Start openntpd
/etc/init.d/openntpd start

# Run ntpd in foreground (not as daemon)
ntpd -d

Step by step instructions:

You need rootsh installed from Extras repository and the openntpd package from Extras-Testing to do this. Please remember to always be very careful when running stuff as root as this may damage your device if you don't know what you are doing!

1. Download the attachment ntpd.sh.txt to your N900 directory. (Which means just don't put it into any folder.) You should see this file when you open the file manager and then tap on "N900".

2. Open XTerminal and type
Code:

sudo gainroot

cd /usr/sbin/

cp /home/user/MyDocs/ntpd.sh.txt ntpd.sh

chmod 755 ntpd.sh

3. You should be all set! Everytime you'd like to synchronize the time on your N900, open up XTerminal and type:

Code:

sudo gainroot

ntpd.sh

After you see that the time is set (it usually takes around 30 seconds), you have to manually terminate the process by pressing Ctrl+C twice.

I hope this works for you all!

Have fun syncing your clocks!

RobbH 2010-02-10 01:50

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
Quote:

Originally Posted by vinc17 (Post 503143)
When running ntpd directly as suggested, this doesn't work either on my N900. I get the error message "fatal: stat: No such file or directory" in /var/log/syslog. However "/etc/init.d/openntpd start" works.

I think this post on an Ubuntu list may have something to do with the failure of openntpd to launch at startup on the N900. However, I think the "patch" offered needs some work before it will solve the problem on the N900. And so far, it's beyond me.

RobbH 2010-02-28 21:13

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
Thanks to vinc17 and youxing for pointing the way to an effective workaround.

First, as root, I created a file, /usr/bin/ntpdstart, containing this:

Code:

#! /bin/sh
#
rootsh /etc/init.d/openntpd start

Make it executable:
chmod +x /usr/bin/ntpdstart

Now, invoking ntpdstart from the command line will start ntpd as a daemon, updating system time regularly.

The next step I found in another thread, and I don't remember who to credit. Again, as root, I creaed this file: /etc/event.d/startopenntpd:

Code:

description "Start ntpd"
start on started clock-daemon
console none
script
              /usr/bin/ntpdstart
end script

This file should NOT be executable. After a reboot, I had ntpd starting automatically on system startup, and it has worked great since.

As always, there are no guarantees that this will work for anyone else.

RobbH 2010-05-28 01:27

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
Just in case anyone is still seeking a solution, there is now a compatible version of openntpd in Extras. Installs cleanly and is configured to run at startup, so the old workarounds are no longer needed.

I had to uninstall the old version; it would not update. There was also already an openntpd script in /etc/event.d, which had to be deleted manually before the installation could be completed.

Taomyn 2010-05-28 13:21

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
Quote:

Originally Posted by RobbH (Post 684486)
Just in case anyone is still seeking a solution, there is now a compatible version of openntpd in Extras. Installs cleanly and is configured to run at startup, so the old workarounds are no longer needed.

Thanks, I just installed this and it seems to be running ok after shutting the N900 down (reboot wouldn't start it), though I'm waiting for it to do it's first update. I've deliberately set the clock 5 minutes fast to see if it gets updated and nothing so far.

Is there a log file or anything that I can check to see if the changes I made to the time servers it uses are ok?

**UPDATE** don't worry, I figured out how to run it so I could see the results, stopped the daemon "openntpd stop", then ran it again as "ntpd -s -d"

maemo.it 2010-12-23 17:18

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
hi guys, let me know understand why at start on my n900 ps aux shows me /usr/sbin/ntpd daemon working but if I connect to internet it doesn't update automatically my date and time?
I've to launch manually ntpd command to do it!
so, what do this daemon?

delta.br 2010-12-23 19:17

Re: How can N900 sync time? GPS, NTP, and/or GSM?
 
Why not use the Automatic time sync feature provided by the cell phone network in the clock settings? Is there a special reason to update the clock by ntp?


| Prev |   1   2   3     4   | Next
All times are GMT. The time now is 18:41.

vBulletin® Version 3.8.8