• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Sure DCF77 Empfänger (Funkuhr) unter SuSE 10.1

Status
Für weitere Antworten geschlossen.

miti

Newbie
Hallo,
Ich habe eine Sure DCF77
und möchte diese unter SuSE 10.1 betreiben
(sie lief jahrelang unter SuSE 7.3 problemlos!)
konfiguriert, so wie in der allgemein empfohlenen Anleitung beschrieben
GEHT NICHT!
Uhr blinkt nicht
kein Eintrag unter ntpq -clocklist
Hat jemand einen Tip?
 
OP
M

miti

Newbie
# cat /etc/ntp.conf
################################################################################
## /etc/ntp.conf
##
## Sample NTP configuration file.
## See package 'ntp-doc' for documentation, Mini-HOWTO and FAQ.
## Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany.
##
## Author: Michael Andres, <ma@suse.de>
##
################################################################################

##
## Radio and modem clocks by convention have addresses in the
## form 127.127.t.u, where t is the clock type and u is a unit
## number in the range 0-3.
##
## Most of these clocks require support in the form of a
## serial port or special bus peripheral. The particular
## device is normally specified by adding a soft link
## /dev/device-u to the particular hardware device involved,
## where u correspond to the unit number above.
##
## Generic DCF77 clock on serial port (Conrad DCF77)
## Address: 127.127.8.u
## Serial Port: /dev/refclock-u
##
## (create soft link /dev/refclock-0 to the particular ttyS?)
##
# server 127.127.8.0 mode 5 prefer

# fudge 127.127.8.0 flag1 0 flag2 0 flag3 0 flag4 0 stratum 3

##
## Undisciplined Local Clock. This is a fake driver intended for backup
## and when no outside source of synchronized time is available.
##
server 127.127.1.0 # local clock (LCL)
fudge 127.127.1.0 stratum 10 # LCL is unsynchronized

##
## Outside source of synchronized time
##
## server xx.xx.xx.xx # IP address of server

## serial Sure clock
server 127.127.8.0 prefer mode 16
#fudge 127.127.8.0

##
## Miscellaneous stuff
##

driftfile /var/lib/ntp/drift/ntp.drift # path for drift file

logfile /var/log/ntp # alternate log file

server ptbtime1.ptb.de
# logconfig =syncstatus + sysevents
# logconfig =all
logconfig =syncall +clockall

# statsdir /tmp/ # directory for statistics files
# filegen peerstats file peerstats type day enable
# filegen loopstats file loopstats type day enable
# filegen clockstats file clockstats type day enable

#
# Authentication stuff
#
# keys /etc/ntp.keys # path for keys file
# trustedkey 1 2 3 4 5 6 14 15 # define trusted keys
# requestkey 15 # key (7) for accessing server variables
# controlkey 15 # key (6) for accessing server variables
 
A

Anonymous

Gast
Versuch mal:
Code:
fudge 127.127.8.0 stratum 1
und setze den link zum device (bzw. überprüfe, ob vorhanden, falls bereits geschehen):
Code:
ln -s /dev/ttySX /dev/refclock-0
natürlich für X die richtige Serielle Schnittstelle einsetzen.

dann würde ich den "server ptbtime1.ptb.de" auskommentieren (was willst Du damit, wenn Du 'ne Funkuhr hast?).

Dann
Code:
rcntp restart
und schauen was passiert.


Gruß
 
OP
M

miti

Newbie
Wenn ich dann eine Funkuhr hätte!
danke für die Tips,
hatte ich auch schon probiert
eben natürlich nocheinmal,
aber leider das selbe Ergebnis:
GEHT NICHT!

ich hatte doch eingangs erwähnt, dass ich die Uhr unter SuSE 7.3
nach der Anleitung der Linum Software AG:
linum.com/FTPDIR/SUPPORT/XNTP/XNTP.PDF
am Laufen hatte

nur jetzt unter SuSE 10.1
scheint die Uhr nicht richtig versorgt zu werden.

Nach entsprechender Konfiguration von /etc/ntp.conf
und dem richtigen Link (refclock-0 -> ttySx)
sowie nach dem Neustart des Systems oder nach Neustart von ntp (rcntp restart)
fing früher die LED der Uhr an zu blinken (im Sekundentakt)
jetzt ist immernoch alles tot!
 
A

Anonymous

Gast
Da gab es früher so ein kleines Tool zur Stromversorgung namens "dcf77power". AFAIK wird das heute nicht mehr gebraucht. Aber vielleicht ja doch? Hattest Du das vorher in Betrieb?

Gibt die Logdatei von ntp was her?


Gruß
 
OP
M

miti

Newbie
Es hat etwas gedauert
aber nun habe ich wohl die Loesung selbst gefunden!

ACHTUNG: Hilfe fuer das Betreiben der von uns so heiss geliebten
SURE DCF77 Funkuhr unter SuSE 10.1 naht!

1. wesentliche Erkenntnis >> Link refclock-0 <<
================================================
ln -s /dev/ttyS0 /dev/refclock-0 funktioniert unter SuSE 10.1 nicht mehr!

Ab Kernel 2.6 verwaltet udev die Eingabe/Ausgabe Geraetedateien.
Damit der Link auf refclock-0 von udev automatisch erstellt wird,
muss eine "rule" fuer diesen Link angelegt werden.
(an meinem Rechner ist die Uhr an COM-2 / ttyS1 angeschlossen!):

in /etc/udev/rules.d/50-udev-default.rules
...

# serial devices

# fuer SURE-DCF77-Uhr an refclock-0

KERNEL=="ttyS1", NAME="%k", SYMLINK="refclock-0", GROUP="uucp"

KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"
KERNEL=="pppox*", NAME="%k", GROUP="uucp"

....

ACHTUNG: Der neue Eintrag m u s s am Anfang der serial devices stehen!!!




2. wesentliche Erkenntnis >> Rechte / "permissions" und aehnliche Probleme <<
==============================================================================
Irgend wie war mir frueher auch schoneinmal aufgefallen
man muss mal in die log's hineinschauen
da ist z.B. das schoene log /var/log/ntp
da steht nach dem Start von ntpd (nach dem booten oder mit "rcntp restart":

12 Oct 16:43:13 ntpd[4583]: PARSE receiver #0: parse_start: open of /dev/refclock-0 failed:
Operation not permitted
12 Oct 16:43:13 ntpd[4583]: configuration of 127.127.8.0 failed

Fehlermeldung in
/var/log/audit/audit.log
type=APPARMOR msg=audit(1192200193.157:7): REJECTING rw access to /dev/ttyS1
(ntpd(4583) profile /usr/sbin/ntpd active /usr/sbin/ntpd)

deshalb in /etc/apparmor.d/usr.sbin.ntpd
# vim:syntax=apparmor
# Last Modified: Sun Jan 22 00:11:27 2006
# $Id: usr.sbin.ntpd 12 2006-04-12 21:35:41Z steve-beattie $
# ------------------------------------------------------------------
#
# Copyright (C) 2002-2005 Novell/SUSE
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------


#include <tunables/global>
/usr/sbin/ntpd {
#include <abstractions/base>
#include <abstractions/nameservice>

capability ipc_lock,
capability net_bind_service,
capability setgid,
capability setuid,
capability sys_chroot,
capability sys_resource,
capability sys_time,

/drift/ntp.drift rwl,
/drift/ntp.drift.TEMP rwl,
/etc/ntp.conf r,
/etc/ntp/drift* rwl,
/etc/ntp/keys r,
/etc/ntp/step-tickers r,
/tmp/ntp* rwl,
/usr/sbin/ntpd rix,
/var/lib/ntp/drift rwl,
/var/lib/ntp/drift.TEMP rwl,
/var/lib/ntp/drift/ntp.drift r,
/var/lib/ntp/var/run/ntp/ntpd.pid w,
/var/log/ntp w,
/var/log/ntp.log w,
/var/run/ntpd.pid w,

# fuer SURE DCF77-Uhr:

/dev/refclock-0 rw,

/dev/ttyS1 rw,

}

die beiden Zeilen nach "fuer SURE DCF77-Uhr eingefuegt
um das Lesen und Schreiben auf den beiden Devices zu erlauben



und..und...und....IT WORKS!!!

we have a liftup!
 
Status
Für weitere Antworten geschlossen.
Oben