On
UNIX-like systems the parse driver which is part of
the NTP package accepts all Meinberg radio clocks or GPS with a serial port
as reference clock.
The actions described below must be done by a user with sufficient
rights on the system, e.g. root.
The parse driver accesses radio clocks via symbolic device names
/dev/refclock-n, where
n is an index number
in the range 0 through 3 since the parse driver can handle up to four
reference clocks at the same time.
Each symbolic device name must point to a physical device which
represents an existing radio clock. In most cases the physical device
is a serial port which has a radio clock connected to.
Each of the reference clocks must also be specified in the
ntp.conf file using a server line with
the pseudo IP address 127.127.8.n, where
n must correspond to the index numbers used
with the symbolic device names /dev/refclock-n
mentioned above.
The pseudo IP address must be followed by a mode m
parameter which specifies the type of radio clock represented
by the device.
The table below lists the mode values which can be used with
Meinberg radio clocks:
| mode number |
radio clock |
trust time |
| mode 0 |
Meinberg PZF clock with TCXO |
12 hours |
| mode 1 |
Meinberg PZF clock with OCXO |
4 days |
| mode 2 |
Meinberg Standard Time String with 9600, 7E2 |
30 minutes |
| mode 7 |
Meinberg GPS with OCXO, 19200, 8N1 |
4 days |
For example, if a single radio clock is connected to the serial
port /dev/ttyS0 then a symbolic link for the clock must be set up
using the command
ln -s /dev/ttyS0 /dev/refclock-0
In the next step the file ntp.conf must be edited
to configure the NTP daemon and tell it which reference clocks
to use.
The file should include a server line for the refclock-0
device created above. If the radio clock sends the Meinberg standard
time string at 9600 baud and framing 7E2 then, as can be seen from
the table above, the mode for refclock-0 must be set to 2:
server 127.127.8.0 mode 2 # standard time string with 9600, 7E2
Additionally, there should be an entry for the local clock which can be
used as a fallback resource if no other time source is available.
Since the local clock is not very accurate, it should be fudged to a
low stratum:
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 12
Now the NTP daemon must be started (or restarted) to let the changes
take effect. If the daemon has been shipped with the operating system
then it may have support for Meinberg clocks compiled in, or not.
If the
output ot the command ntpq -p
lists a clock labeled generic then everything is fine
and the NTP daemon supports the reference clock.
If the generic clock it not listed in the ntpq output then
NTP must be configured and compliled on the target platform. This
requires a compiler package installed on the target platform, and
the source code of the NTP distribution.
In the example below name is the base name of the NTP source
package which is normally distributed as a file name.tar.gz
which must be uncompressed on the target computer:
tar xvzf name.tar.gz
To compile the package, change into the NTP base directory, and
run configure and make to build the programs. You may use the
following commands:
cd name
./configure --enable-MEINBERG
make
After the build procedure has finished successfully each of the
new programs is available in its own subdirectory which has the
same name as the program itself. Make sure there's no old version of
ntpd or xntpd running, then start the new NTP daemon by entering
ntpd/ntpd
if a ntp-4.* package has been compiled, or
xntpd/xntpd
if a xntp3 package has been compiled.
The command ntpq -p can be used to verify
that the new daemon works correctly. Finally the newly compiled
programs should be copied to the destination directories. The standard
procedure to do that is by simply running the command
make install
However, care must be taken if a version of NTP had been installed
previously. The old versions of the NTP executables should be deleted
or overwritten by the new programs to prevent the NTP daemon from being
loaded instead of the new one when the system starts up the next time.
Also, the new executables must be in the directory where they are expected
by the system startup scripts.
Care must be taken especially if the NTP version changes between v3.x and v4.x
because the naming conventions have changed between those version (e.g xntpd/ntpd).