Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I'm really happy with my Pi so far, but now that the website I'm developing on it is starting to need the time and date, I thought it was about time to get NTPd working. So I installed an NTP server onto my Windows machine which acutally has a clock in it, and I got my network switch (which doesn't have an RTC) to successfully update its software clock to this Windows NTPd. Then I try and get the Pi to update... Not so successful:

[root@raspberry ~]# ntpd -ds
listening on 127.0.0.1
ntp engine ready
reply from 192.168.0.2: not synced, next query 655s
^Cntp engine exiting
dispatch_imsg in main: pipe closed
Lost child: child exited
Terminating
[root@raspberry ~]# date
Fri Jan  2 04:01:00 BST 1970
[root@raspberry ~]#

So it says that my 192.168.0.2 (my windows box) isn't synced. Can I tell it to ignore this like my network switch must? Why doesn't it update the time?

Note: I can't get the Raspberry Pi to update directly from the internet due to the way my network's set up.

Thanks for any guidance..

share|improve this question
    
Not sure which ntpd server archlinux have, but see if it has the -g argument to allow you to jump the clock. Or see if the ntpdate command is available. Note that normally you'd want to run ntpd as a daemon. –  nos Nov 4 '12 at 10:47
    
How long has your Windows machine been running NTP? –  Jivings Nov 4 '12 at 18:21
    
The -s option should be forcing the clock to be set. @Jivings the NTP machine get shut down every day as it's my general workstation, so the NTP server's never up for more than 16 hours. –  phillid Nov 5 '12 at 1:38
1  
Related: NTPD not actually setting the time –  Tobias Kienzler Dec 13 '12 at 16:46
add comment

3 Answers

up vote 3 down vote accepted

Okay, I managed to solve it. The problem was that the server wasn't fudging its stratum to 0 correctly, so the Pi was seeing the server as a stratum 16 and wouldn't touch it with a barge pole, thus the time wasn't being updated. I managed to fudge the server's stratum to 0 so now the Pi updated off it happily.

share|improve this answer
add comment

Since the problem may be in the Windows machine, not in the Pi/ArchLinux, I suggest to try with working NTP servers. See http://support.ntp.org/bin/view/Servers/WebHome for a list. (Or http://www.pool.ntp.org/en/ for a group of servers known as pool.ntp.org)

share|improve this answer
1  
As I said, I cannot get the Pi to connect to NTP servers on the internet because of my network configuration. –  phillid Nov 7 '12 at 2:05
add comment

Windows does not support the full NTP stack, but instead just SNTP and is not typically suitable for NTP clients. You have to change a registry key to enable the W32time SNTP service to emulate the expected behavior of standard NTP protocol.

On the Windows machine, open the Registry Editor (regedit.exe), and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type. Change the key value from NT5DS to NTP

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.