On Sunday 28 February 2010 01.12.14 Ralph Smith wrote: > On Feb 27, 2010, at 2:25 PM, Goran Sandin wrote: > > Hi, > > > > I have built a ntp-server based on information found > > here http://www.febo.com/pages/soekris/ and here > > http://ralphsmith.org/~ralph/soekris-ntp/NET4501. > > First of all, a caution that the files under > <http://ralphsmith.org/~ralph/soekris-ntp/> were placed there at various > times and are not part of a coherent whole. I really need to clean this up > and put together a unified treatment.
It's OK, after all it was your set of files that finally made me to get a working setup. So far I have only been able to find bits and piece's on different sites. Your information had the last missing parts :-) > > I use this tool http://www.satsignal.eu/software/net.htm#NTPmonitor to > > check the result. > > > > The result is not in line with my expectations so I think something is > > not quite right. It might have been my expectations that was a little bit off... It took much longer than I had expected for ntpd to reach a small offset. ntptime now (18 hours after selecting the PPS as source) show: # ntptime ntp_gettime() returns code 0 (OK) time cf34b8f6.fb361508 Sun, Feb 28 2010 9:42:14.981, (.981294987), maximum error 5534 us, estimated error 15 us, TAI offset 0 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset 0.021 us, frequency -0.040 ppm, interval 1 s, maximum error 5534 us, estimated error 15 us, status 0x2001 (PLL,NANO), time constant 4, precision 0.001 us, tolerance 496 ppm, The ntp_adjtime() - offset is still trying to get better, but it seems to be stable at values below 0.1 us. > > If I compare with a normal PC (running FreeBSD 7.1) which is synchronized > > against stratum 2 servers over Internet, the performance I get from > > net4501 is not any better than this PC. > > > > The NTPmonitor program show following result: > > > > An Internet Stratum1 server | my PC | net4501 > > > > Precision: 2^-29s 2^-19s 2^-16s > > > > Dispersion: 2ms ~30ms 0ms > > The precision values shown are to be expected, and isn't anything to really > get excited about, and is a function of the machine architecture. From > <http://www.ntp.org/ntpfaq/NTP-s-sw-clocks-quality.htm> we read "In NTP > precision is determined automatically, and it is measured as a power of > two. For example when ntpq -c rl prints precision=-16, the precision is > about 15 microseconds (2^-16 s)." OK. I thought that the precision was something that was measured from remote and lower value was better. Is 15 us "right" for net4501, or does it indicate that something in my configurations should be changed? > > Both the PC and net4501 show a huge offset error of 1s about 11 times in > > 2 hours. The Internet Stratum1 server does not seem to have this error. I solved this one. It seems to be a Windows-"feature". I was using host names in the config file for NTPmonitor. The server on internet of course had a real name that could be found by dns-lookup. My internal machines was found since the were listed in 'lmhosts'. After I changed the config file for NTPmonitor to use ip-addresses for my internal machines instead of host names, the very periodic 1 second offset has disappeared. > Can't help much until we know what peers and refclocks you have configured. > Also, make sure that you have the following in your kernel configuration. > options CPU_ELAN > options CPU_SOEKRIS > options HZ=150 > options CPU_ELAN_PPS I have those, or rather I used HZ=200. febo.com says HZ=1000 should be used, but also had a description of how things were related. My PPS signal is 25.6ms wide. So I thought that 200Hz would give me 5ms polling and that it should be good enough margin to the 25ms width I have for the PPS. febo.com also says you should include 'option GEOM_VOL', but your config file did not. I did not include this option in the kernel. > > My feeling is that my net4501 server does not really use the PPS signal. > > How do I check if the ntpd daemon actually use the PPS? > > What are you using to drive the PPS signal? ntpq -p will tell you if ntp is > using the pps. This all depends on course on what drivers you configure > it to use: my system is currently showing: > > wendell# ntpq -p > remote refid st t when poll reach delay offset > jitter > ========================================================================== > ==== +ntp.cox.net .GPS. 1 u 1594 1024 366 28.771 2.371 > 0.545 *SHM(0) .GPS. 0 l 15 16 377 0.000 > 4.976 0.231 oPPS(0) .PPS. 0 l 12 16 377 > 0.000 0.000 0.015 wendell# > > The "o" in the first column tells me that ntp is synchronizing with the > PPS. Offset is less than 1 microsecond. > > > Or rather, how do I know the the precision of the PPS signal is > > transferred into the ntpd daemon? > > > > (I can see with ntpq -p that the PPS row from the config file is > > selected) > > Showing what ntpq -p gives you would help. # ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== +GPS_NMEA(0) .GPS. 0 l 12 16 377 0.000 -47.458 15.063 oPPS(0) .PPS. 0 l 11 16 377 0.000 0.000 0.015 As I already mentioned, I could see that the PPS was selected here. I use this one: http://www.jrmiller.demon.co.uk/projects/ministd/frqstd.htm as source for both 10MHz and NMEA-data. The offset for the GPS source is changing constantly. This is probably because the output from the gps receiver does not have the same number of lines between each reported $GPRMC line. A cycle looks like this: $GPRMC,221617,A,57**.****,N,012**.****,E,0.000,355.2,211209,1.6,E*79 $PRWIZCH,06,0,02,2,03,0,05,7,15,0,07,7,28,7,13,7,10,7,08,7,19,0,21,2*46 $GPGGA,221618,57**.****,N,012**.****,E,1,06,0.89,6.0,M,40.1,M,,*79 $GPGSA,A,3,05,07,28,13,10,08,,,,,,,1.55,0.89,1.26*04 $GPGSV,3,1,12,08,77,156,51,05,60,253,46,10,60,217,50,07,50,070,49*7D $GPGSV,3,2,12,28,22,157,42,15,19,281,00,13,16,101,43,03,12,041,00*74 $GPGSV,3,3,12,06,11,030,00,21,11,338,00,19,05,065,00,02,02,223,00*79 $GPRMC,221618,A,57**.****,N,012**.****,E,0.000,355.2,211209,1.6,E*76 $PRWIZCH,06,0,02,2,03,0,05,7,15,0,07,7,28,7,13,7,10,7,08,7,19,0,21,2*46 $GPGGA,221619,57**.****,N,012**.****,E,1,06,0.89,6.0,M,40.1,M,,*78 $GPGSA,A,3,05,07,28,13,10,08,,,,,,,1.55,0.89,1.26*04 Since fractional seconds are not reported, this is probably the reason for the figure in the ntpq -p output for the GPS source. I am not sure yet if this is a problem or not, more than what I need to use in ntp.conf to make it work. I need to do more tests with restarting ntpd to see if it is able to find the correct time and change to PPS all the times. I had some problem with initial tests. > > The description on febo.com says that the PPS signal should be supplied > > at R61/R62. I have made this as well as JP3, pin3. Does anyone know where > > R61/R62 is connected, why is this needed as well as on the GPIO pins? I > > just followed the instruction, but it is hard to do fault finding when > > not knowing the idea behind it from the beginning :-) > > R61/R62 is connected to TMR1IN on the ElanSC520, which is not otherwise > available to the outside of the Net4501. Read elan-mmcr.c for an > explanation of how the precise time stamping is done, but in short, you > need the signal at both locations in order for this to work. OK, thanks. (Both locations are connected) > > On http://ralphsmith.org/~ralph/soekris-ntp/NET4501, there are a set of > > gpsd files. I could not find anything about how to start the gpsd so I > > have not installed it, don't know if it is needed or not? > > That depends on what you are trying to use as a reference. I used gpsd as a > driver for my Trimble Thunderbolt, until I wrote tboltd, a much simpler > program, but added a few features I need. What is your reference clock? Can I use gpsd in between the rs-232 port and ntpd? I guess it would be possible to send requests for gps-info from another computer to net4501? Any ideas of how to configure this? > Ralph /Göran _______________________________________________ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech