View unanswered posts | View active topics It is currently Sat Dec 07, 2019 6:41 pm



Reply to topic  [ 2 posts ] 
 Use Fitlet As A Time Server For Isolated Networks 
Author Message

Joined: Mon May 28, 2012 12:25 pm
Posts: 106
Post Use Fitlet As A Time Server For Isolated Networks
Overview

Using some simple software and an inexpensive USB type GPS receiver, Fitlet can easily function as a time server for isolated networks where Internet and WAN connectivity is unavailable.

A Time Server
Attachment:
TimeServer.PNG
TimeServer.PNG [ 103.67 KiB | Viewed 2592 times ]



This application note builds on the Fitlet GPS Time Source application which can be found here:

viewtopic.php?f=153&t=5841




Hardware

The hardware required for this application is as follows:

1. fitlet
2. GPS Receiver - USB type (I am using GlobalSat BU-353)
3. Network Router

Attachment:
Hardware2.jpg
Hardware2.jpg [ 56.35 KiB | Viewed 2592 times ]





Software

The following software is required for the Fitlet Network Time Server application. It is all available in the Linux package repositories.

1. ntp
2. ntpdate
3. gpsd
4. gpsd-clients
5. python-gps


About GPSD

GPSD is a service dameon which monitors the GPS units connected to your system and makes the data they provide available to other applications. It is more or less an indispensable application for working with GPS systems in Linux.


Sun Jan 31, 2016 11:47 pm
Profile

Joined: Mon May 28, 2012 12:25 pm
Posts: 106
Post Use Fitlet As A Time Server For Isolated Networks
Software and System Configuration

1. Follow the installation steps indicated in the Fitlet GPS Time Source Application which can be found here:

viewtopic.php?f=153&t=5841


2. Complete the following additional steps

A. Using an editor such as nano, make the following changes to the file /etc/ntp.conf

i. Comment out the line
restrict 192.168.123.0 mask 255.255.255.0 notrust
by adding a # in front.

It should now be
# restrict 192.168.123.0 mask 255.255.255.0 notrust

ii. Add the line
restrict 192.168.1.0 mask 255.255.255.0 nomodify


B. Restart gpsd and ntpd as follows:

i. killall -9 gpsd ntpd
ii. ntpd -gN
iii. gpsd -b -n /dev/ttyUSB0


C. Verify the correct operation of the GPS and GPSD by running the command CGPS. Pay special attention to the parameter Time Offset. It is typically less than 1. If it is a huge number, there is a problem.

Attachment:
CGPS.png
CGPS.png [ 139.39 KiB | Viewed 2589 times ]




D. If cgps returns active, normal output then verify the correct operation of ntp using the command ntpq -p
You should get a listing similar to:

Attachment:
NTPQ -P.png
NTPQ -P.png [ 46.44 KiB | Viewed 2589 times ]



An Important Note

Shortly after bootup, Fitlet uses ntpdate to initially set the system clock. Thereafter, the ntp dameon keeps the clock synchronized to ntp servers including your GPS. Unfortunately, ntpdate will not accept time data from a gps - it only uses ntp servers. Therefore, if you operating where internet service is unavailable, you must manually set the clock to within 4 hours of actual time after bootup. After you initially set the linux system clock, the ntp dameon takes over and uses the GPS time to synchronize the system clock. Please note that if your initial time setting is 4 hours or more different from the actual time, the ntp dameon will not correct the linux system clock to GPS time. The initial setting must be less than 4 hours different form the actual time.




Results

Fitlet is now configured to act as a NTP time server for all computers on the 192.168.1.0 subnet.

For this demonstration, the IP address of my Fitlet is 192.168.1.2

The image shown below is an example of my Windows 7 fitPC3 using Fitlet as a NTP server where the only NTP time source available is the GPS connected to Fitlet.

Attachment:
Using Fitlet Time Server.jpg
Using Fitlet Time Server.jpg [ 42.6 KiB | Viewed 2588 times ]






Conclusions

1. Using a simple GPS receiver, Fitlet can serve as an accurate and effective time server for networks which do not have access to conventional network time sources.

2. Fitlet again demonstrates is adaptability and versatility.


Mon Feb 01, 2016 12:06 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.