From 5bc79d72728668c2de388209a9acc70d6ffaff7f Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Thu, 13 Feb 2025 11:33:33 +0100 Subject: [PATCH] ntpserver stats, 3 --- content/content/blog/timeserver.md | 75 ++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/content/content/blog/timeserver.md b/content/content/blog/timeserver.md index 721407a..c9fe525 100644 --- a/content/content/blog/timeserver.md +++ b/content/content/blog/timeserver.md @@ -12,6 +12,81 @@ It has been joined the NTP pool, the statistics are available [here](https://www Some additional statistics graphs for the server are available [here](https://pv-stats.hottis.de/ntpserver). + +## Preparation of the BeagleBone + +The GPS module is connected via serial line to the UART of the BB. + +The additional connection of the PPS output with the PPS device of the Linux running on the BB via a GPIO must be prepared. A device tree overlay must be created and compiled: + +``` +/dts-v1/; +/plugin/; + +/{ + compatible = "ti,beaglebone", "ti,beaglebone-black"; + part_number = "WN-PPS"; + version = "00A0"; + + exclusive-use = + "P8.7", + "gpio2_2"; + + fragment@0 { + target = <&am33xx_pinmux>; + __overlay__ { + bs_pinmode_P8_7_0x27: pinmux_bs_pinmode_P8_7_0x27 { + pinctrl-single,pins = <0x090 0x27>; + }; + }; + }; + + fragment@1 { + target = <&ocp>; + __overlay__ { + bs_pinmode_P8_7_0x27_pinmux { + compatible = "pps-gpio"; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&bs_pinmode_P8_7_0x27>; + gpios = <&gpio2 2 0>; + assert-rising-edge; + }; + }; + }; +}; +``` + +This file shall be compiled using + +``` +dtc -O dtb -o WN-PPS-00A0.dtbo -b 0 -@ WN-PPS-00A0.dts +``` + +The binary dtbo file then copied into `/lib/firmware` and mentioned in the `/boot/uEnv.txt`: + +``` +uboot_overlay_addr0=/lib/firmware/WN-PPS-00A0.dtbo +``` + +After a reboot the device file `/dev/pps0` should be available and using `ppstest /dev/pps0` you can test the connection: + +``` +root@david:/boot# ppstest /dev/pps0 +trying PPS source "/dev/pps0" +found PPS source "/dev/pps0" +ok, found 1 source(s), now start fetching data... +source 0 - assert 1739442756.999984966, sequence: 306598 - clear 0.000000000, sequence: 0 +source 0 - assert 1739442757.999978472, sequence: 306599 - clear 0.000000000, sequence: 0 +source 0 - assert 1739442758.999976057, sequence: 306600 - clear 0.000000000, sequence: 0 +^C +root@david:/boot# +``` + + +## Configuration of the ntpsec daemon + + ``` interface listen all logconfig +all