NTP server on Embedded Linux
Hi guys,
I'm currently setting up a distributed system consisting of 5 single-board computers (4 BeagleBone Black and 1 Karo TX6Q), which are all ARM-based computers running Linux. (If you are interested, the system will be used as the on-board computer system in a racing car). The boards are supposed to exchange sensor data. To be able to perform calculations on consistent data, all system clocks need to be synchronized very accurately. We want to use NTP for this job since it promises sub-millisecond precision in good network conditions. So I downloaded the sources from http://www.ntp.org/ and compiled them using a cross-compiler for the Karo board (which is the central computer). Then I copied the generated files to the board and created a ntp.conf which looks like this: Code:
driftfile /var/lib/ntp/ntp.drift Code:
ntpd -l Unfortunately, when I wanted to test the server using Code:
ntpq -p Code:
localhost: timed out, nothing received I haven't found anything helpful in Google, so now I hope one of you has an idea. If you need additional information, feel free to ask. Thanks in advance David |
If you want to setup ntp using the local clock as a time source then you need the following in your ntp.conf file
Quote:
If the internet is not available and you need an absolute time reference then a GPS receiver is required. They are fairly cheap and easy to configure using gpsd. Sounds like an interesting project. |
Thanks for your reply!
I changed my /etc/ntp.conf file to Code:
driftfile /var/lib/ntp/ntp.drift Quote:
Quote:
|
I assume you restarted ntp...
It isn't obvious why ntp isn't working. |
Yes, I restarted ntp ... Any further ideas?
|
Starting ntpd with the -d switch might provide some addition debug messages.
|
Nope, no luck with that either. Actually doesn't print anything. Is it possible that I screwed up compilation?
|
I may be wrong on this (I don't know much about NTP), but shouldn't the IP address in that config be 127.0.0.1 instead of 127.127.1.0?
|
Nope.
http://doc.ntp.org/4.2.0/drivers/driver1.html I forgot to mention that if the system time is off by more then 1000s ntp will quit. Be sure to set time with the date command if required prior to starting ntpd. Does the Karo board have a backed real time clock? Also ntpd with the -g option will force time to be set difference is > 1000s. |
Quote:
|
All times are GMT -5. The time now is 07:47 PM. |