[ntp:questions] Trimble Resolution SMT on Ubuntu 12.04

Ron Frazier (NTP) timekeepingntplist at c3energy.com
Thu Mar 29 14:37:59 UTC 2012


Geng,

You could try mode 18 to use GPGGA instead of GPRMC.  You're way over my 
head trying to use PPS on a parallel port.  You might want to put 
noselect on the server lines for all non gps servers, just for testing.  
Make sure you're getting output from the gps immediately before starting 
NTPD.  You may have to reestablish your symbolic links if you reboot.  I 
suggest commenting out the lines in your ntp.conf file which relate to 
PPS and just trying to get the NMEA working by itself.  Then go back and 
troubleshoot PPS once you know NMEA is working.  If you can shut off all 
the NMEA sentences but the one you want, you'll get less jitter on 
NMEA.  That won't affect you much once pps is working.  On Windows, I 
was able to get + / - 10 ms offset performance from GPS time using NMEA 
only data through USB.  Note that NMEA data will drift over time, by a 
substantial margin, on many gps's.  When I started forwarding pps to the 
DCD pin of the serial port, but still going through a Trendnet TU-S9 
serial - USB converter, I was able to get + / - 1 ms performance.  As I 
mentioned in another thread, on my other computer with a real serial 
port, I'm getting + / - 50 us performance.  Other than that, someone 
with more knowledge than me will have to help you.  Good luck.

Sincerely,

Ron


On 3/29/2012 9:59 AM, G wrote:
> Hi Ron,
>
> Thanks a lot for your help.
>
> I change my conf as your suggest:
> ----------------------------------------------------------------
> server 127.127.22.0 minpoll 3 maxpoll 3 #ATOM PPS
> fudge 127.127.22.0 flag2 0
> server 127.127.20.1 mode 17 prefer minpoll 3 maxpoll 3  #NMEA RMC 9600
>
> fudge 127.127.20.1 time2 0.0000
> driftfile /var/lib/ntp/ntp.drift
>
> ------------------------------------------------------------------------
>
> unfortunately, result is not much different. 
>
> geng
>
>
>
> ----- Original Message -----
> From: Ron Frazier (NTP)<timekeepingntplist at c3energy.com>
> To:
> Cc: "questions at lists.ntp.org"<questions at lists.ntp.org>
> Sent: Monday, March 26, 2012 4:19 PM
> Subject: Re: [ntp:questions] Trimble Resolution SMT on Ubuntu  12.04
>
> Hi Geng,
>
> I don't know if this will help or not, but the following things came to mind.  I am running Windows at the moment, but Linux should be similar.  I plan to try all this in Ubuntu eventually.
>
> When I was using NMEA only data, I had to have a bigger fudge factor, like this:
>
> fudge  127.127.20.5 time2 0.3710 refid GPS1                             # use WITHOUT PPS
>
> However, when I started using PPS, I found that the fudge factor was messing things up, so now I use this:
>
> fudge  127.127.20.5 time2 0.0000 refid GPS1                             # use WITH PPS
>
> Note that I stuck the fudge factor in there for readability.  However, its value is 0.
>
> The other thing that occurred is that your clock may be too far out from gps time to begin with.  Try shutting down NTPD.  Note, if you compiled NTP yourself, the startup and shutdown scripts may not be in the right places.  I think the command is:
>
> sudo /etc/init.d ntp stop
>
> Then run this command to sync your clock with the NIST server in New York.  If you're not in the US, substitute another server name.
>
> ntpdate -b nist1-ny.ustiming.org
>
> Now your clock should be very close to NIST or UTC.
>
> Now, restart NTPD.
>
> sudo /etc/init.d ntp start
>
> Wait a few minutes and run ntpq -p to see what's happening.
>
> Also, make sure NTPD is reading the correct config file and that you don't have two of them around or something.
>
> Finally, I'd recommend putting minpoll 4 maxpoll 4 on your NMEA line to match your PPS line.  I'm using a value of 3 on mine, which polls every 8 seconds.
>
> Sincerely,
>
> Ron
>
>
> On 3/26/2012 12:06 PM, G wrote:
>    
>> I use Trimble Resolution SMT to sync time for a Ubuntu 12.04 server (kernel 3.2.0).
>>
>> Trimble send NMEA to /dev/ttyUSB1(9600 8N1) on Ubuntu  server
>> PPS signal connect ACK pin on  /dev/parport0 . Ubuntu load Linux-PPS module( PPS_parport clear_wait=0) to create PPS device /dev/pps0
>>
>> I use verify the /dev/pps0  using rising edge by "ppstest /dev/pps0"
>> --------------------------------------------------------------------------------------------
>> trying PPS source "/dev/pps0"
>> found PPS source "/dev/pps0"
>> ok, found 1 source(s), now start fetching data...
>> source 0 - assert 1332775909.500413150, sequence: 249302 - clear  0.000000000, sequence: 0
>> source 0 - assert 1332775910.500456132, sequence: 249303 - clear  0.000000000, sequence: 0
>> source 0 - assert 1332775911.500499213, sequence: 249304 - clear  0.000000000, sequence: 0
>> -----------------------------------------------------------------------------------------------
>> To verify the NMEA message , I link /dev/ttyUSB1 to /dev/gps1
>> -----------------------------------------------------------------------------------------------
>> #cat /dev/gps1
>> $GPRMC,153343.000,A,4529.904930,N,07343.904831,W,0.241,325,260312,,,A*6F
>> $GPGGA,153344.000,4529.905010,N,07343.904879,W,1,3,3.17,12.368,M,-32.087,M,,*5E
>> ---------------------------------------------------------------------------------------------------
>> I create the /etc/ntp.conf:
>> -------------------------------------------------------------------------
>> server 127.127.20.1 mode 17 prefer       # NMEA RMC/GGA 9600bps
>> fudge 127.127.20.1 time2 0.01
>>
>> server 127.127.22.0 minpoll 4 maxpoll 4  # PPS ATOM
>> fudge 127.127.22.0 flag2 0 flag3 1
>>
>> driftfile /var/lib/ntp/ntp.drift
>> ------------------------------------------------------------------------------
>> after ntpd run 48hours, ntpq -p:
>>
>>         remote           refid     st t when poll reach   delay   offset  jitter
>> ==============================================================================
>> xGPS_NMEA(1)     .GPS.            0 l   44   64  377    0.000  -214.54  25.464
>> xPPS(0)          .PPS.            0 l   11   16  377    0.000  -174.60   4.981
>>
>>
>> I have no idea why I got this result . what do I miss for config? by the way , I compile ntpd from source , not using ntpd from Ubuntu.
>>
>>
>> Thanks for your time to read my question. give me some light please.
>>
>> regards,
>>
>> geng
>>
>>
>>      
>
>    

-- 

(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