Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste ÜberarbeitungBeide Seiten der Revision | |||
linux:zeitsynchronisation_mit_dcf-77_empfaenger [2017/07/26 06:48] – angelegt adi | linux:zeitsynchronisation_mit_dcf-77_empfaenger [2021/07/14 12:12] – adi | ||
---|---|---|---|
Zeile 8: | Zeile 8: | ||
===== Conrad Stückliste ===== | ===== Conrad Stückliste ===== | ||
PC-Funkuhrmodul | PC-Funkuhrmodul | ||
- | + | ||
- | + | ||
^ Anzahl ^ Beschreibung ^ Artikel-Nr ^ Preis/Stck ^ Preis ges. ^ | ^ Anzahl ^ Beschreibung ^ Artikel-Nr ^ Preis/Stck ^ Preis ges. ^ | ||
|1 |DCF77-Modul von Conrad-Elektronik |641138 |10,21 |10,21 | | |1 |DCF77-Modul von Conrad-Elektronik |641138 |10,21 |10,21 | | ||
Zeile 26: | Zeile 25: | ||
|1 |Lochrasterplatine |528404-62 |0,63 |0,63 | | |1 |Lochrasterplatine |528404-62 |0,63 |0,63 | | ||
|1 |Gehäuse |520521-62 |2,71 |2,71 | | |1 |Gehäuse |520521-62 |2,71 |2,71 | | ||
- | | | | | | | | + | | | **Gesamt |
- | | | | | | | | + | |
- | | | **Gesamt | + | |
- | + | ||
- | + | ||
===== Schaltung ===== | ===== Schaltung ===== | ||
Dazugehörige Schaltung: | Dazugehörige Schaltung: | ||
Zeile 37: | Zeile 33: | ||
===== Software ===== | ===== Software ===== | ||
- | Unter linux kann mit dem NTP Daemon die Zeit des Funkuhrmoduls empfangen und konvertiert werden. | + | Unter Linux kann mit dem NTP Daemon die Zeit des Funkuhrmoduls empfangen und konvertiert werden. |
==== NTP ==== | ==== NTP ==== | ||
Zeile 43: | Zeile 39: | ||
<code bash> | <code bash> | ||
- | In der NTP.conf (''/ | + | In der ''/ |
- | <code bash> | + | <code bash># / |
- | | + | driftfile / |
- | logfile / | + | logfile / |
- | + | ||
- | # Enable this if you want statistics to be logged. | + | # Enable this if you want statistics to be logged. |
- | statsdir / | + | statsdir / |
- | + | ||
- | statistics loopstats peerstats clockstats | + | statistics loopstats peerstats clockstats |
- | filegen loopstats file loopstats type day enable | + | filegen loopstats file loopstats type day enable |
- | filegen peerstats file peerstats type day enable | + | filegen peerstats file peerstats type day enable |
- | filegen clockstats file clockstats type day enable | + | filegen clockstats file clockstats type day enable |
- | + | ||
- | + | ||
- | # You do need to talk to an NTP server or two (or three). | + | # You do need to talk to an NTP server or two (or three). |
- | #server ntp.ubuntu.com | + | #server ntp.ubuntu.com |
- | server 127.127.8.0 mode 5 prefer | + | server 127.127.8.0 mode 5 prefer |
- | server 127.127.1.0 | + | server 127.127.1.0 |
- | fudge 127.127.1.0 stratum 10 | + | fudge 127.127.1.0 stratum 10 |
- | + | ||
- | # Access control configuration; | + | # Access control configuration; |
- | # details. | + | # details. |
- | # might also be helpful. | + | # might also be helpful. |
- | # | + | # |
- | # Note that " | + | # Note that " |
- | # that might be intended to block requests from certain clients could also end | + | # that might be intended to block requests from certain clients could also end |
- | # up blocking replies from your own upstream servers. | + | # up blocking replies from your own upstream servers. |
- | + | ||
- | # By default, exchange time with everybody, but don't allow configuration. | + | # By default, exchange time with everybody, but don't allow configuration. |
- | restrict -4 default kod notrap nomodify nopeer noquery | + | restrict -4 default kod notrap nomodify nopeer noquery |
- | restrict -6 default kod notrap nomodify nopeer noquery | + | restrict -6 default kod notrap nomodify nopeer noquery |
- | + | ||
- | # Local users may interrogate the ntp server more closely. | + | # Local users may interrogate the ntp server more closely. |
- | restrict 127.0.0.1 | + | restrict 127.0.0.1 |
- | restrict ::1 | + | restrict ::1 |
- | # Clients from this (example!) subnet have unlimited access, but only if | + | # Clients from this (example!) subnet have unlimited access, but only if |
- | # cryptographically authenticated. | + | # cryptographically authenticated. |
- | #restrict 192.168.123.0 mask 255.255.255.0 notrust | + | #restrict 192.168.123.0 mask 255.255.255.0 notrust |
- | + | ||
- | + | ||
- | # If you want to provide time to your local subnet, change the next line. | + | # If you want to provide time to your local subnet, change the next line. |
- | # (Again, the address is an example only.) | + | # (Again, the address is an example only.) |
- | #broadcast 192.168.123.255 | + | #broadcast 192.168.123.255 |
- | + | ||
- | # If you want to listen to time broadcasts on your local subnet, de-comment the | + | # If you want to listen to time broadcasts on your local subnet, de-comment the |
- | + | ||
- | # next lines. | + | # next lines. |
- | #disable auth | + | #disable auth |
- | # | + | # |
==== Udev Rules ==== | ==== Udev Rules ==== | ||
- | Damit der Eintrag '' | + | Damit der Eintrag '' |
- | ein Link auf ''/ | + | |
<code bash>ln -s /dev/ttyS0 / | <code bash>ln -s /dev/ttyS0 / | ||
Dieser Link sollte auch nach einem Reboot noch da sein. Dies ist er aber nicht wenn wir nicht die UDEV-Rules bearbeiten: | Dieser Link sollte auch nach einem Reboot noch da sein. Dies ist er aber nicht wenn wir nicht die UDEV-Rules bearbeiten: | ||
- | Also mit '' | + | Also die Datei (evtl. noch nicht vorhanden) ''/ |
<code bash> | <code bash> | ||
Zeile 113: | Zeile 108: | ||
< | < | ||
/ | / | ||
- | + | ||
===== Test ===== | ===== Test ===== | ||
Nun kann der NTP-Daemon mit dem Befehl '' | Nun kann der NTP-Daemon mit dem Befehl '' | ||
Zeile 130: | Zeile 125: | ||
Hier eine Ausgabe: | Hier eine Ausgabe: | ||
- | < | + | < |
- | 11 May 09:24:55 ntpd[2297]: parse: convert_rawdcf: | + | 11 May 09:24:55 ntpd[2297]: parse: convert_rawdcf: |
- | + | ||
- | 11 May 09:24:55 ntpd[2297]: PARSE receiver #0: interval for following error message class is at least 00:01:00 | + | 11 May 09:24:55 ntpd[2297]: PARSE receiver #0: interval for following error message class is at least 00:01:00 |
- | 11 May 09:24:55 ntpd[2297]: PARSE receiver #0: FAILED TIMECODE: " | + | 11 May 09:24:55 ntpd[2297]: PARSE receiver #0: FAILED TIMECODE: " |
- | 11 May 09:25:58 ntpd[2297]: synchronized to GENERIC(0), stratum 0 | + | 11 May 09:25:58 ntpd[2297]: synchronized to GENERIC(0), stratum 0 |
- | 11 May 09:27:03 ntpd[2297]: time reset +64.490872 s | + | 11 May 09:27:03 ntpd[2297]: time reset +64.490872 s |
- | 11 May 09:27:03 ntpd[2297]: kernel time sync status change 2001 | + | 11 May 09:27:03 ntpd[2297]: kernel time sync status change 2001 |
- | 11 May 09:27:04 ntpd[2297]: parse: convert_rawdcf: | + | 11 May 09:27:04 ntpd[2297]: parse: convert_rawdcf: |
+ | |||
+ | 11 May 09:27:04 ntpd[2297]: PARSE receiver #0: interval for following error message class is at least 00:01:00 | ||
+ | 11 May 09:27:04 ntpd[2297]: PARSE receiver #0: FAILED TIMECODE: " | ||
+ | 11 May 09:28:00 ntpd[2297]: parse: convert_rawdcf: | ||
+ | |||
+ | 11 May 09:29:03 ntpd[2297]: synchronized to GENERIC(0), stratum 0</ | ||
- | 11 May 09:27:04 ntpd[2297]: PARSE receiver #0: interval for following error message class is at least 00:01:00 | + | Man sieht dass in der 1. Zeile der Neustart |
- | 11 May 09:27:04 ntpd[2297]: PARSE receiver #0: FAILED TIMECODE: " | + | |
- | 11 May 09:28:00 ntpd[2297]: parse: convert_rawdcf: | + | |
- | + | ||
- | 11 May 09:29:03 ntpd[2297]: synchronized to GENERIC(0), stratum 0</ | + | |
- | + | ||
- | Man sieht dass in der 1. Zeile der neustart | + | |
Danach erhält der NTP die Signale des Empfängers. | Danach erhält der NTP die Signale des Empfängers. | ||
Das '' | Das '' | ||
Zeile 153: | Zeile 148: | ||
Man kann mit dem Befehl '' | Man kann mit dem Befehl '' | ||
+ | ===== timesyncd ===== | ||
+ | Quelle: [[https:// | ||
+ | |||
+ | Timesyncd ist ein anderer Zeitdienst-Daemon unter Linux. | ||
+ | |||
+ | Dieser wird in dieser Datei Konfiguriert ''/ | ||
+ | |||
+ | Beispiel: < | ||
+ | #NTP= ntp1.domain.tld ntp2.domain.tld ... | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | Gestartet wird Timesync mit dem Befehl '' | ||
+ | |||
+ | Diese Befehle zeigen die aktuellen Einstellungen und Laufzeitdaten: | ||
+ | timedatectl status | ||
+ | timedatectl timesync-status</ |