|Required Linux/Unix skills to execute this task: Advanced|
NTP client or server on Debian
Debian uses systemd NTP client by default. To check the state you can type: systemctl status systemd-timesyncd.
NTP stratum 1 server
Instructions and files to set Radarcape as a NTP stratum 1 server (PPS reference from GPS) is available at:
If you have before compiled and installed manually NTPD or Chrony it is recommended that you remove it before.
NTP client or server on Angstrom (deprecated)
Configuring Angstrom as a NTP server is not recommend and not supported, as Debian provides much better compatibility and performance.
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.
[email protected]:~# uname -a Linux rc12 3.8.13 #1 SMP Tue Jul 30 11:56:13 CEST 2013 armv7l GNU/Linux [email protected]:~# connmand -v 1.4 [email protected]:~# 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.
[email protected]:~# cd /var/lib/connman [email protected]:/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.
[email protected]:/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.