|Required Linux/Unix skills to execute this task: Advanced|
NTP Synchronisation on Radarcapes with Debian
NTP time as a client
NTP as a client is standard for Debian. There is nothing to do in special.
NTP as a stratum 1 device
NTP Synchronisation on Radarcapes with Angstrom (deprecated)
As of state mid 2015, this is deprecated. NTP should be used with Debian only.
Radarcape and Local Time Synchronisation via NTP
In order to have correct time on Angstrom based Radarcapes, due to a hardware probelm in our cape board, a special kernel is required.
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 raw data 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. However, the __date__ in Port 30003 messages is always the Linux system date. The __timestamp__ instead is a GPS timestamp when the config is set to GPS timestamps and system time when the Radarcape operates in legacy 12MHz timstamp mode.
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: connmand: ntp: time slew +436516610.758686 s Jan 10 06:54:20 rc12 connmand: ntp: time slew +436516610.758686 s Nov 09 13:49:41 rc12 connmand: connmand: ntp: time slew +85.321813 s Nov 09 13:48:15 rc12 connmand: ntp: time slew +85.321813 s
Note: On a few devices I saw that after some days the time sync via NTP is suddenly lost. NTP update messages disappear in journalctl.