[ntp:questions] need help installing gps with ntp on Linux

Ron Frazier (NTP) timekeepingntplist at c3energy.com
Sat Feb 11 01:39:41 UTC 2012


Hi all,

I have recently been posting messages about my experience trying to 
install a USB GPS and wring out the maximum performance in Windows.

Now I need help doing the same thing in Linux.  I want to install the 
GPS using only NTPD if possible, without GPSD, to make my install 
configuration as close as possible to the way it's set up in Windows.  
Please let me know if I'm on track or not and why my GPS is not working, 
if possible.

I'm running Ubuntu 11.04 and had already installed NTP version 
1.4.2.6.p2 from the Ubuntu Natty repositories.  That runs fine, polling 
from the internet.

I plugged in the USB GPS and it appeared as /dev/ttyUSB0.  I used the 
following configuration line to set up the port:

From: http://www.satsignal.eu/ntp/Sure-GPS.htm

I used: stty -F /dev/ttyUSB0 57600 igncr clocal -echo -ixon

Then, I used the following command to set up a symlink to the port:

ln -T /dev/ttyUSB0 /dev/gps1   (Actually, I tried gps5 first.)

Then, I did cat /dev/gps1 and got the following:

ron at asus-k52f-1:/etc$ cat /dev/gps1
$GPZDA,011724.000,11,02,2012,,*54
$GPZDA,011725.000,11,02,2012,,*55
$GPZDA,011726.000,11,02,2012,,*56
$GPZDA,011727.000,11,02,2012,,*57
$GPZDA,011728.000,11,02,2012,,*58
$GPZDA,011729.000,11,02,2012,,*59
$GPZDA,011730.000,11,02,2012,,*51
$GPZDA,011731.000,11,02,2012,,*50

So, I know the port is working and I know the GPS is putting out data.

Before editing the ntp.conf file, I stopped the service using:

sudo /etc/init.d/ntp stop

These are the GPS lines in /etc/ntp.conf:

server 127.127.20.1                prefer minpoll 3 maxpoll 3 mode 72
fudge  127.127.20.1 time2 0.3000 refid GPS1

This is the same thing that works in Windows, except for the port number.

Then, I restarted NTPD with:

sudo /etc/init.d/ntp start

When I do ntpq -p, I get:

ron at asus-k52f-1:/etc$ ntpq -p
      remote           refid      st t when poll reach   delay   offset  
jitter
==============================================================================
*nist1-ny.ustimi .ACTS.           1 u   18  512    1   59.006   -3.796   
2.559
-216.119.63.113  .ACTS.           1 u   15  512    1   60.587   12.887   
2.619
-india.colorado. .ACTS.           1 u   21  512    1   58.931  -10.283   
1.089
#ping-audit-207- .ACTS.           1 u   18  512    1   83.298  -42.531   
1.240
-alice.ziaspace. 209.51.161.238   2 u   21  512    1   51.124   -3.522   
2.379
-clock01.mifl01. 128.118.25.5     2 u   16  512    1   69.476    5.781   
2.733
-jtsage.com      127.67.113.92    2 u   15  512    1   54.499   -2.492   
1.918
+clock-b.develoo 164.67.62.199    2 u   14  512    1   82.772   -4.697   
1.941
+ntp2.Rescomp.Be 128.32.206.55    2 u   13  512    1   93.910   -5.478   
2.941
-guinness.mcguyv 216.218.254.202  2 u   12  512    1   84.256   -3.343   
1.944
-mailman.pittsbu 127.67.113.92    2 u   11  512    1   46.289   -7.461   
2.583
#ip-173-201-38-8 198.153.152.52   2 u   11  512    1   94.652  -15.700   
3.057
  europium.canoni .INIT.          16 u    -  512    0    0.000    
0.000   0.000

Unfortunately, there is no sign of my GPS anywhere.

Can anyone tell me what's wrong?

Thanks in advance.

Sincerely,

Ron

--

(PS - If you 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 always see new messages very quickly.  If you need a
reply and have not heard from me in 1 - 2 weeks, send your message again.)

Ron Frazier
timekeepingdude AT c3energy.com



More information about the questions mailing list