Radarcape:NTP

From Beast Wiki
Revision as of 14:15, 9 November 2013 by imported>Dl4mea
Jump to navigation Jump to search
For Experts The tasks described in this manual require advanced skills in Unix/Linux.

Radarcape and Local Time Synchronisation via NTP

The Radarcape's hardware design will support true NTP using the GPS. Both, the Trimble serial data stream as well as the 1PPS, are available on the Beaglebone. However due to time constraints using those in order to create a Stratum 1 NTP server was not yet implemented.

Important Note: Timestamping of the Mode-AC/Mode-S Frames is not done using the system time which is described here. All received frames are directly time stamped in the FPGA without any interaction of the local CPU.

Meanwhile, all Radarcapes should synchronize their date and time via connmand and its NTP service. This is for example essential for the port 30003 protocol. So here is a list of checks in case that your Radarcape's date and time are not correct. Experience with this will tell us later which steps may be necessary in case that NTP does not work.

Basic System Checks

Check your Linux kernel version, connmand version and date/time.

root@rc12:~# uname -a
Linux rc12 3.8.13 #1 SMP Tue Jul 30 11:56:13 CEST 2013 armv7l GNU/Linux
root@rc12:~# connmand -v
1.4
root@rc12:~# date
Sat Nov  9 14:01:08 UTC 2013

connmand settings are in /var/lib/connman/settings. I added the PTB servers into this, as then we have a reliable 2nd server farm for NTP. You may do so, too.

root@rc12:~# cd /var/lib/connman
root@rc12:/var/lib/connman# cat settings
[global]
Timeservers=ptbtime1.ptb.de;ptbtime2.ptb.de;ptbtime3.ptb.de;0.angstrom.pool.ntp.org;1.angstrom.pool.ntp.org;2.angstrom.pool.ntp.org;3.angstrom.pool.ntp.org
OfflineMode=false

[Wired]
Enable=true

[WiFi]
Enable=true

Startup check: NTP is started once the network is up. journalctl can tell you what happend. Below you can see the first setting immediately after startup, and another synchronisation with 85sec offset later. If your Radarcape was running for longer, you will see a resynchronisation message about once each hour.

root@rc12:/var/lib/connman# journalctl --no-pager | grep -i ntp
Jan 10 06:54:20 rc12 connmand[122]: connmand[122]: ntp: time slew +436516610.758686 s
Jan 10 06:54:20 rc12 connmand[122]: ntp: time slew +436516610.758686 s
Nov 09 13:49:41 rc12 connmand[122]: connmand[122]: ntp: time slew +85.321813 s
Nov 09 13:48:15 rc12 connmand[122]: ntp: time slew +85.321813 s

To do

  • How to inquire more information about the NTP status