From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by huchra.bufferbloat.net (Postfix) with ESMTP id 8F4AF20029B for ; Sun, 3 Jun 2012 18:46:24 -0700 (PDT) Received: from [192.168.83.7] (c-76-97-152-51.hsd1.ga.comcast.net [76.97.152.51]) by mrelay.perfora.net (node=mrus2) with ESMTP (Nemesis) id 0McE1v-1SJYVO3qdT-00Jfvp; Sun, 03 Jun 2012 21:46:23 -0400 References: <682FD158-B62B-4D41-A5BF-23F0C6029BA1@netgate.com> <5F4AC3BC-3E72-4003-962A-2EA502B3015A@netgate.com> User-Agent: K-9 Mail for Android In-Reply-To: <5F4AC3BC-3E72-4003-962A-2EA502B3015A@netgate.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 From: "Ron Frazier (NTP)" Date: Sun, 03 Jun 2012 21:46:24 -0400 To: Thumbgps-devel@lists.bufferbloat.net Message-ID: <2abf0d06-92b5-4e27-b500-18ff90c3611b@email.android.com> X-Provags-ID: V02:K0:2eXrcCAxU1pI0rEgzGaFKa/QG5z5vgvqg8A58kgr3Tc NL0tNqFUSOV/HTelzmy9BqlPkVwn8DSX7WYlk1Apvw0gesev0u k/15rzaBKtmY+O1zAGrsWuJJK7XA2FY5qDYG6Z/EPRgYRr+6py qPadC5i/dyHEYoMCnwn2tyFmiBmENGQolXM6JdErFYBVrUCQ3y 6dGS6VMRi8zoSjE6zZQoL7caLRrvMHt8UTr/6+SofknDbnfJl9 uD9j4lsSMSG2+vFaCdDGMMrALZI/grEQv45uIDZnUKh2GU9Nyv uvhbe7j1/ztOpSbDx8W3RpowLhAJjuKyZDSPYG/0MqGPlqjlO0 M1i/OohScjYt5Bn0kPilrPIJuTactqGZJV/aV/pb7mDnZRHUxD hrWlB7jqbx7o7v1iPLlKSXeW8HISiA/oPg= Subject: Re: [Thumbgps-devel] navisys GR-601W gps on FreeBSD/NTP X-BeenThere: thumbgps-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 01:46:25 -0000 Hi Jim, I thought I'd share some more information which might be useful to= you, or not. I don't know much about FreeBSD or pfSense. I'm running Ubunt= u Linux 11.04 here. I realized that, since I've been working on Windows and= Linux, some events may be getting fuzzy in my memory as to which is which.= I think I tried to get PPS working without GPSD in Linux and I don't think= I was ever able to get it working with the 1 year old plus NTP program ava= ilable from the Ubuntu repositories. Trying to update NTPD manually caused = problems and broke things so I gave up on that and just loaded NTPD. I don'= t think it worked with Windows either until I upgraded to the new custom bi= naries from Dave Hart. After I read your last reply, I switched my GPS on = Linux to work via a USB - Serial adapter based on the Prolific chip set. Th= is is the Trendnet TU-S9, which passes all the handshake signals. I now hav= e the GPS with PPS working on a USB port operating through GPSD. I decided= to share the following working configuration with you, in case it will hel= p you at all. If you could install GPSD, it might simplify some things. He= re is my ntp.conf file. There are lots of comments, but, if you edit with G= VIM, it will color code the comments in blue, which makes it easy to find t= he lines that are actually doing things.: http://dl.dropbox.com/u/9879631/= linux-ntp-pps-ntp-conf-060312.txt Here is an NTPQ printout with PPS workin= g.: http://dl.dropbox.com/u/9879631/linux-ntp-pps-ntpq-060312.txt Here is= a script I run in order to start up GPSD and also to initially sync the ti= me to a NIST server and restart NTPD. At this point, I have to run this man= ually, and haven't figured out how to have it auto boot. http://dl.dropbox= .com/u/9879631/linux-ntp-pps-PREFER%20Start%20USB%20GPSD%20GPS-060312.txt = Good luck. Sincerely, Ron -- Sent from my Android Acer A500 tablet wit= h bluetooth keyboard and K-9 Mail. Please excuse my potential brevity. (To= whom it may concern. My email address has changed. Replying to former mess= ages prior to 03/31/12 with my personal address will go to the wrong addres= s. Please send all personal correspondence to the new address.) (PS - If y= ou email me and don't get a quick response, don't be concerned. I get about= 300 emails per day from alternate energy mailing lists and such. I don't a= lways see new email messages very quickly. If you need a reply and haven't = heard from me in 1 - 2 weeks, send your message again.) Ron Frazier timeke= epingdude AT techstarship.com Jim Thompson wrote: On J= un 3, 2012, at 10:36 AM, "Ron Frazier (NTP)" wrote: Hi Jim, I may or may not be able to help. I have successf= ully run PPS before through a USB - Serial converter using windows. I have = not done it with Linux, BSD, etc. I am currently running PPS through a seri= al connection on Ubuntu Linux. What are the server lines in your ntp.conf? = I thought that would be obvious from the ntpq/ntpdc data I gave. [2.1-= BETA0][root@pfsense-beta.netgate.com]/root(1): cat /var/etc/ntpd.conf # = # pfSense ntp configuration file # # /dev/pps0, doesn't work server = 127.127.22.0 #/dev/gps0 server 127.127.20.0 mode 0 minpoll 4 maxpoll 4 p= refer fudge 127.127.20.0 time1 0.155 time2 0.000 flag1 1 flag2 0 flag3 1 = # last ditch local clock # server 127.127.1.0 fudge 127.127.1.0 stratum= 10 server 0.pfsense.pool.ntp.org iburst maxpoll 9 server clock.isc.org = logfile /var/log/ntpd.log driftfile /var/db/ntpd.drift Are you runnin= g GPSD? No. (Mostly because gpsd isn't loaded on pfSense.) For what i= t's worth, the USB signal comes into Linux on my system as /dev/ttyUSB0. = Yup. It's /dev/ttyU0 on FreeBSD 8.3 When I was running NTP without GP= SD in Windows, I had to make a symbolic link and map that to /dev/gps1 or s= omething. Then you refclock line would have to reference unit 1. Mine i= s 'unit 0' So [2.1-BETA0][root@pfsense-beta.netgate.com]/root(2): ls -l /= dev/gps0 /dev/pps0 lrwxr-xr-x 1 root wheel 5 Jun 3 07:25 /dev/gps0 -> = ttyU0 lrwxr-xr-x 1 root wheel 5 Jun 3 05:07 /dev/pps0 -> ttyU0 I don= 't remember exactly. I was not running PPS then though, and I was not runni= ng GPSD in Windows. (You can't.) Where ever the USB signal is coming in, i= f it's like Linux, you should be able to do the following to see the NMEA d= ata: cat /dev/ttyUSB0 Press CTRL-C to stop. Yup. A better test is wit= h ntpq: [2.1-BETA0][root@pfsense-beta.netgate.com]/root(4): ntpq -c clock= list assID=3D0 status=3D0000 clk_okay, last_clk_okay, device=3D"NMEA GPS = Clock", timecode=3D"$GPRMC,154158.00,A,3023.48603,N,09742.86541,W,1.187,96= .01,030612,,,A*4A", poll=3D361, noreply=3D0, badformat=3D0, baddata=3D0, f= udgetime1=3D155.000, stratum=3D0, refid=3DGPS, flags=3D5 See the "timeco= de=3D" line? It's the last decoded message from the 'clock'. In this cas= e, a GPS RMC message. (and now you can see where my office is located.) = Note that I had to turn off a bunch of the enabled-by-default messages, and= lock the port to 4800 baud. Many people have similar issues with NMEA GP= S units and ntpd, where the GPS works fine with, say, 'cu' or minicom, but= fails (normally after a couple 'good' reads) when run under ntpd. And ye= s, I know about the 'mode' line for the refclock. Been there, done that, b= urned the t-shirt around 3am. Anyway: $PUBX,40,GSV,0,0,0,0 $PUBX,40,GL= L,0,0,0,0 $PUBX,40,ZDA,0,0,0,0 $PUBX,40,VTG,0,0,0,0 $PUBX,40,GSV,0,0,0,0= $PUBX,40,GSA,0,0,0,0 $PUBX,40,GGA,0,0,0,0 $PUBX,40,TXT,0,0,0,0 $PUBX,4= 0,RMC,0,0,0,0 $PUBX,41,1,0007,0003,4800,0 $PUBX,40,ZDA,1,1,1,1 I just p= ut that in a file and ran "cat file > /dev/cuaU0'. (the "no carrier detect= needed" version of /dev/ttyU0) Note these from /var/log/ntpd.log: 3 Ju= n 09:03:46 ntpd[61833]: synchronized to GPS_NMEA(0), stratum 0 3 Jun 09:0= 3:50 ntpd[61833]: refclock_nmea: time_pps_getcap failed: Inappropriate ioct= l for device 3 Jun 09:04:14 ntpd[61833]: refclock_nmea: time_pps_getcap f= ailed: Inappropriate ioctl for device 3 Jun 09:08:34 ntpd[61833]: refcloc= k_nmea: time_pps_getcap failed: Inappropriate ioctl for device 3 Jun 09:1= 3:38 ntpd[61833]: refclock_nmea: time_pps_getcap failed: Inappropriate ioct= l for device 3 Jun 09:14:17 ntpd[61833]: refclock_nmea: time_pps_getcap f= ailed: Inappropriate ioctl for device 3 Jun 09:17:48 ntpd[61833]: refcloc= k_nmea: time_pps_getcap failed: Inappropriate ioctl for device 3 Jun 09:1= 7:57 ntpd[61833]: refclock_nmea: time_pps_getcap failed: Inappropriate ioct= l for device 3 Jun 09:22:39 ntpd[61833]: refclock_nmea: time_pps_getcap f= ailed: Inappropriate ioctl for device 3 Jun 10:02:51 ntpd[61833]: refcloc= k_nmea: time_pps_getcap failed: Inappropriate ioctl for device 3 Jun 10:2= 6:00 ntpd[61833]: refclock_nmea: time_pps_getcap failed: Inappropriate ioct= l for device 3 Jun 10:26:22 ntpd[61833]: refclock_nmea: time_pps_getcap f= ailed: Inappropriate ioctl for device 3 Jun 10:29:44 ntpd[61833]: refcloc= k_nmea: time_pps_getcap failed: Inappropriate ioctl for device 3 Jun 10:4= 1:58 ntpd[61833]: refclock_nmea: time_pps_getcap failed: Inappropriate ioct= l for device The driver is returning errno 25 for some reason. By the w= ay, are the new GPS units with the PPS mod for sale anywhere yet? I wouldn'= t mind getting my hands on one. Just as soon as I verify PPS (probably on= voyage linux), we'll be placing an order for .. several with Navisys. Ji= m Sincerely, Ron -- Sent from my Android Acer A500 tablet with bluet= ooth keyboard and K-9 Mail. Please excuse my potential brevity. (To whom i= t may concern. My email address has changed. Replying to former messages pr= ior to 03/31/12 with my personal address will go to the wrong address. Plea= se send all personal correspondence to the new address.) (PS - If you emai= l me and don't get a quick response, don't be concerned. I get about 300 em= ails per day from alternate energy mailing lists and such. I don't always s= ee new email messages very quickly. If you need a reply and haven't heard f= rom me in 1 - 2 weeks, send your message again.) Ron Frazier timekeepingdu= de AT techstarship.com Jim Thompson wrote: after a lon= g night of hacking, here is the result of about a 5 minute run on FreeBSD 8= .3 (a pfSense 2.1 beta that was handy) running on a PC Engines Alix 3d2 boa= rd with the Navisys GR-601W plugged in via USB [2.1-BETA0][root@pfsense-be= ta.netgate.com]/dev(655): ntpdc -c kern pll offset: 0.0131656 s pll frequen= cy: 25.385 ppm maximum error: 0.025897 s estimated error: 0.006287 s status= : 2001 pll nano pll time constant: 4 precision: 1e-09 s frequency tolerance= : 496 ppm pps frequency: 24.724 ppm pps stability: 0.000 ppm pps jitter: 0 = s calibration interval: 4 s calibration cycles: 0 jitter exceeded: 0 stabil= ity exceeded: 0 calibration errors: 0 [2.1-BETA0][root@pfsense-beta.netgate= .com]/dev(656): ntpdc -c "clockstat 127.127.20.0" clock address: 127.127.20= .0 clock type: Generic NMEA GPS Receiver (20) last event: 0 current status:= 0 number of polls: 21 no response to poll: 0 bad format responses: 0 bad d= ata responses: 0 running time: 338 fudge time 1: 0.155000 fudge time 2: 0.0= 00000 stratum: 0 reference ID: GPS fudge flags: 0x5 [2.1-BETA0][root@pfsens= e-beta.netgate.com]/dev(657): ntpdc -c dm remote local st poll reach delay = offset disp _____________________________________________ *GPS_NMEA(0) 127= .0.0.1 0 16 377 0.00000 0.018658 0.02373 LOCAL(0) 127.0.0.1 10 64 77 0.0000= 0 0.000000 0.43401 .clock.isc.org 192.168.3.166 1 64 77 0.05998 0.045383 0.= 43512 .199.4.29.166 192.168.3.166 2 64 77 0.04831 0.026922 0.06511 [2.1-BET= A0][root@pfsense-beta.netgate.com]/dev(658): ntpq -p remote refid st t when= poll reach delay offset jitter ___________________________________________= __ *GPS_NMEA(0) .GPS. 0 l 3 16 377 0.000 17.541 4.836 LOCAL(0) .LOCL. 10 l= 43 64 77 0.000 0.000 0.004 +199.4.29.166 64.90.182.55 2 u 39 64 77 48.317 = 26.922 19.527 +clock.isc.org .GPS. 1 u 37 64 77 59.994 45.383 10.124 [2.1-B= ETA0][root@pfsense-beta.netgate.com]/dev(659): and after 10 minutes: [2.= 1-BETA0][root@pfsense-beta.netgate.com]/dev(668): ntpdc -c "clockstat 127.1= 27.20.0" clock address: 127.127.20.0 clock type: Generic NMEA GPS Receiver = (20) last event: 0 current status: 0 number of polls: 42 no response to pol= l: 0 bad format responses: 0 bad data responses: 0 running time: 681 fudge = time 1: 0.155000 fudge time 2: 0.000000 stratum: 0 reference ID: GPS fudge = flags: 0x5 [2.1-BETA0][root@pfsense-beta.netgate.com]/dev(669): ntpdc -c dm= remote local st poll reach delay offset disp _____________________________= ________________ *GPS_NMEA(0) 127.0.0.1 0 16 377 0.00000 0.026902 0.02632 = LOCAL(0) 127.0.0.1 10 64 377 0.00000 0.000000 0.03052 .clock.isc.org 192.16= 8.3.166 1 64 377 0.05960 0.065447 0.03905 .199.4.29.166 192.168.3.166 2 64 = 377 0.04929 0.070362 0.05154 [2.1-BETA0][root@pfsense-beta.netgate.com]/dev= (670): ntpq -p remote refid st t when poll reach delay offset jitter ______= _______________________________________ *GPS_NMEA(0) .GPS. 0 l 2 16 377 0.= 000 14.092 10.630 LOCAL(0) .LOCL. 10 l 46 64 377 0.000 0.000 0.004 +199.4.2= 9.166 64.90.182.55 2 u 40 64 377 49.289 70.362 10.886 +clock.isc.org .GPS. = 1 u 39 64 377 59.612 65.447 10.469 Note that PPS is not working [2.1-BET= A0][root@pfsense-beta.netgate.com]/dev(659): tail /var/log/ntpd.log 3 Jun = 09:03:07 ntpd[61833]: synchronized to 199.4.29.166, stratum 2 3 Jun 09:03:0= 7 ntpd[61833]: kernel time sync status change 2001 3 Jun 09:03:20 ntpd[6183= 3]: refclock_nmea: time_pps_getcap failed: Inappropriate ioctl for device 3= Jun 09:03:23 ntpd[61833]: refclock_nmea: time_pps_getcap failed: Inappropr= iate ioctl for device 3 Jun 09:03:23 ntpd[61833]: refclock_nmea: time_pps_g= etcap failed: Inappropriate ioctl for device 3 Jun 09:03:25 ntpd[61833]: re= fclock_nmea: time_pps_getcap failed: Inappropriate ioctl for device 3 Jun 0= 9:03:46 ntpd[61833]: synchronized to GPS_NMEA(0), stratum 0 3 Jun 09:03:50 = ntpd[61833]: refclock_nmea: time_pps_getcap failed: Inappropriate ioctl for= device 3 Jun 09:04:14 ntpd[61833]: refclock_nmea: time_pps_getcap failed: = Inappropriate ioctl for device 3 Jun 09:08:34 ntpd[61833]: refclock_nmea: t= ime_pps_getcap failed: Inappropriate ioctl for device Will investigate. J= im _____________________________________________ Thumbgps-devel mailing l= ist Thumbgps-devel@lists.bufferbloat.net https://lists.bufferbloat.net/list= info/thumbgps-devel -- Sent from my Android Acer A500 tablet with blue= tooth keyboard and K-9 Mail. Please excuse my potential brevity. (To whom = it may concern. My email address has changed. Replying to former messages= prior to 03/31/12 with my personal address will go to the wrong address. = Please send all personal correspondence to the new address.) (PS - If you = email me and don't get a quick response, don't be concerned. I get about 30= 0 emails per day from alternate energy mailing lists and such. I don't alwa= ys see new email messages very quickly. If you need a reply and haven't he= ard from me in 1 - 2 weeks, send your message again.) Ron Frazier timekeep= ingdude AT techstarship.com