4

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..

phillid
  • 79
  • 1
  • 6

3 Answers3

3

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.

phillid
  • 79
  • 1
  • 6
1

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)

bortzmeyer
  • 472
  • 2
  • 4
  • 12
0

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

Canadian Luke
  • 520
  • 1
  • 4
  • 18