AW: convert_rawdcf: parity check FAILED on myembedded Linux system - NTP

This is a discussion on AW: convert_rawdcf: parity check FAILED on myembedded Linux system - NTP ; Hi folks, I have a problem with NTP server version 4.2.2p3 and my embedded Linux system FOX Board. I'am using a raw dcf77 receiver from Sure, the receiver is working fine with my Linux PC but not with my embedded ...

+ Reply to Thread
Results 1 to 18 of 18

Thread: AW: convert_rawdcf: parity check FAILED on myembedded Linux system

  1. AW: convert_rawdcf: parity check FAILED on myembedded Linux system

    Hi folks,

    I have a problem with NTP server version 4.2.2p3 and my embedded Linux
    system FOX Board. I'am using a raw dcf77 receiver from Sure, the receiver is
    working fine with my Linux PC but not with my embedded system. I found that
    parity check is disable on the Linux PC but not on my embedded system, so I
    have also disabled the parity check on the Fox Board, which than results to
    the following ERRORS seen in the log file:

    ntpd[83]: parse: convert_rawdcf: parity check FAILED for
    "-###----#--#--#-----S-------P-2----P-2--12-241-4-1---8---8p"

    Any idea what is going wrong!

    Many thanks in advanced,
    Torsten

    _______________________________________________
    questions mailing list
    questions@lists.ntp.isc.org
    https://lists.ntp.isc.org/mailman/listinfo/questions


  2. Re: AW: convert_rawdcf: parity check FAILED on my embedded Linuxsystem

    Torsten Krieger wrote:

    > Hi folks,
    >
    > I have a problem with NTP server version 4.2.2p3 and my embedded Linux
    > system FOX Board. I'am using a raw dcf77 receiver from Sure, the receiver is
    > working fine with my Linux PC but not with my embedded system. I found that
    > parity check is disable on the Linux PC but not on my embedded system, so I
    > have also disabled the parity check on the Fox Board, which than results to
    > the following ERRORS seen in the log file:
    >
    > ntpd[83]: parse: convert_rawdcf: parity check FAILED for
    > "-###----#--#--#-----S-------P-2----P-2--12-241-4-1---8---8p"
    >
    > Any idea what is going wrong!
    >
    > Many thanks in advanced,
    > Torsten
    >
    > _______________________________________________
    > questions mailing list
    > questions@lists.ntp.isc.org
    > https://lists.ntp.isc.org/mailman/listinfo/questions
    >


    I'm not familiar with the hardware involved and not very familiar with
    Linux but, it seems as if you have either failed to disable parity or
    that disabling parity is the wrong thing to do! If your receiver is
    generating a parity check bit, the format of the serial data will
    include a parity bit and "disabling" parity on only one end of the
    circuit may not have the desired effect. The "secret" of getting RS232
    serial communications to work is to have both ends set to the SAME:
    speed, number of data bits, number of "stop" bits and parity! If both
    ends have the same settings and it still doesn't work, you probably have
    a bug in either the receiver or the Linux serial port driver.

  3. Re: AW: convert_rawdcf: parity check FAILED on my embedded Linuxsystem

    Torsten Krieger wrote:
    > Hi folks,
    >
    > I have a problem with NTP server version 4.2.2p3 and my embedded Linux
    > system FOX Board. I'am using a raw dcf77 receiver from Sure, the receiver is
    > working fine with my Linux PC but not with my embedded system. I found that
    > parity check is disable on the Linux PC but not on my embedded system, so I
    > have also disabled the parity check on the Fox Board, which than results to
    > the following ERRORS seen in the log file:
    >
    > ntpd[83]: parse: convert_rawdcf: parity check FAILED for
    > "-###----#--#--#-----S-------P-2----P-2--12-241-4-1---8---8p"

    unlurk.
    is that one of the receivers were the serial line receives the raw puls
    with ~50baud and reads the 0.1s (L) pulse as 'x' and the 0.2s (H) pulse
    as 'p' or there abouts?
    if yes: is your line sense ok? i.e. is there a (inverting) rs232 receiver in front
    of RXD or not.
    (where) Have you disabled parity check inside ntpd?
    >
    > Any idea what is going wrong!
    >
    > Many thanks in advanced,
    > Torsten
    >
    > _______________________________________________
    > questions mailing list
    > questions@lists.ntp.isc.org
    > https://lists.ntp.isc.org/mailman/listinfo/questions
    >



    uwe

  4. Re: AW: convert_rawdcf: parity check FAILED on my embedded Linuxsystem


    Hi Torsten,
    OK, i have had a look at the FOX Board docs.

    the serial line ttyS0 is TTL level IO ( 3.3V, 5V tolerant)
    on the break out header.
    Now if you connect your RS232 Level Signals to this
    signal sense is inverted (AND you may ruin the inputs)

    uwe

  5. Re: AW: convert_rawdcf: parity check FAILED on my embedded Linuxsystem

    Torsten.Krieger@krieger-mis.de (Torsten Krieger) writes:

    > Hi folks,
    >
    > I have a problem with NTP server version 4.2.2p3 and my embedded Linux
    > system FOX Board. I'am using a raw dcf77 receiver from Sure, the receiver is
    > working fine with my Linux PC but not with my embedded system. I found that
    > parity check is disable on the Linux PC but not on my embedded system, so I
    > have also disabled the parity check on the Fox Board, which than results to
    > the following ERRORS seen in the log file:
    >
    > ntpd[83]: parse: convert_rawdcf: parity check FAILED for
    > "-###----#--#--#-----S-------P-2----P-2--12-241-4-1---8---8p"
    >
    > Any idea what is going wrong!
    >

    This has nothing to do with parity check on the serial port.

    The DCF77 signal transmits 3 parity bits in its data stream.
    This messages is generated when the check fails. This happens
    usually when the reception is sub-optimal and bit errors occur.
    Occasional errors are harmless.

    If this message is interfering with the opration of your embedded
    system you should only disable the output of the message - not the
    check.

    Frank

  6. ***SPAM*** AW: Re: AW: convert_rawdcf: parity checkFAILED on my embedded Linux system

    Hi Frank,

    thank you for your help!

    It is not clear to me whether parity check shall be enabled or disabled!
    With stty -a /dev/refclock-0 I have the following output:

    [root@axis /]91# stty -a -F /dev/refclock-0
    speed 50 baud; rows 0; columns 0;
    intr = ; quit = ; erase = ; kill = ; eof =
    ;
    eol = ; eol2 = ; start = ; stop = ; susp =
    ;
    rprnt = ; werase = ; lnext = ; flush = ;
    min = 1; time = 0;
    -parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
    -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon
    -ixoff -iuclc -ixany -imaxbel
    -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
    vt0 ff0
    -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
    -echoprt -echoctl -echoke

    Is this a correct setting for the serial port?

    Torsten.Krieger@krieger-mis.de (Torsten Krieger) writes:

    > Hi folks,
    >
    > I have a problem with NTP server version 4.2.2p3 and my embedded Linux
    > system FOX Board. I'am using a raw dcf77 receiver from Sure, the receiver

    is
    > working fine with my Linux PC but not with my embedded system. I found

    that
    > parity check is disable on the Linux PC but not on my embedded system, so

    I
    > have also disabled the parity check on the Fox Board, which than results

    to
    > the following ERRORS seen in the log file:
    >
    > ntpd[83]: parse: convert_rawdcf: parity check FAILED for
    > "-###----#--#--#-----S-------P-2----P-2--12-241-4-1---8---8p"
    >
    > Any idea what is going wrong!
    >

    This has nothing to do with parity check on the serial port.

    The DCF77 signal transmits 3 parity bits in its data stream.
    This messages is generated when the check fails. This happens
    usually when the reception is sub-optimal and bit errors occur.
    Occasional errors are harmless.

    If this message is interfering with the opration of your embedded
    system you should only disable the output of the message - not the
    check.

    Frank

    _______________________________________________
    questions mailing list
    questions@lists.ntp.isc.org
    https://lists.ntp.isc.org/mailman/listinfo/questions

    _______________________________________________
    questions mailing list
    questions@lists.ntp.isc.org
    https://lists.ntp.isc.org/mailman/listinfo/questions


  7. Re: ***SPAM*** AW: Re: AW: convert_rawdcf: parity check FAILED onmy embedded Linux system

    Torsten.Krieger@krieger-mis.de (Torsten Krieger) writes:

    > Hi Frank,
    >
    > thank you for your help!
    >
    > It is not clear to me whether parity check shall be enabled or disabled!
    > With stty -a /dev/refclock-0 I have the following output:
    >
    > [root@axis /]91# stty -a -F /dev/refclock-0
    > speed 50 baud; rows 0; columns 0;
    > intr = ; quit = ; erase = ; kill = ; eof =
    > ;
    > eol = ; eol2 = ; start = ; stop = ; susp =
    > ;
    > rprnt = ; werase = ; lnext = ; flush = ;
    > min = 1; time = 0;
    > -parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
    > -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon
    > -ixoff -iuclc -ixany -imaxbel
    > -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
    > vt0 ff0
    > -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
    > -echoprt -echoctl -echoke
    >
    > Is this a correct setting for the serial port?
    >

    fine - PARENB is disabled.

    You usually should not have to fiddle with that, as the daemon code
    sets up the tty interface.

    The parity message refers to a parity error in the transmitted
    time code not in the characters received (each character is just
    a single bit the the time code).

    >>

    > This has nothing to do with parity check on the serial port.
    >
    > The DCF77 signal transmits 3 parity bits in its data stream.
    > This messages is generated when the check fails. This happens
    > usually when the reception is sub-optimal and bit errors occur.
    > Occasional errors are harmless.
    >
    > If this message is interfering with the opration of your embedded
    > system you should only disable the output of the message - not the
    > check.
    >

    Frank

  8. Re: AW: convert_rawdcf: parity check FAILED on my embedded Linuxsystem

    http://www.eecis.udel.edu/~mills/ntp/dcf77.html

    The DCF Signals is 1 pulse every 1 second. the 59th pulse is omitted to
    mark the minute transition.
    Additonal information is coded into the pulselength of the second pulses.
    0.1 sec for a low bit, 0.2sec for a high bit.

    on a 50Baud (0.02s/bit) serial line with inverted sense this is received as

    HHHHLLLLLHHHHHHHH S=StartBit, s=StopBit(s)
    ____S01234567s____ 0xf0 for a low bit

    and

    HHHHLLLLLLLLLHHH
    ____S01234567s____ 0x00 for a high bit


    uwe

  9. Re: convert_rawdcf: parity check FAILED on my embedded Linux system

    In article ,
    Torsten.Krieger@krieger-mis.de (Torsten Krieger) wrote:

    > it seems to receive the DFC signal from Mainflingen correctly. I do not know
    > much of the receiver Hardware since it is proprietary and not well
    > documented, I only know that it receives the raw serial signal with 50 baud.


    If it is interfacing at 50 bits per second through a UART (the actual
    signal is 1 baud), the receiver's baseband processing is trivial and
    you are processing the raw baseband signal with only low pass filtering
    applied. The internals may not be published, but there are not exactly
    any trade secrets in such a receiver.

    The 50 baud serial interface is a hack in ntpd which makes use of the
    error behaviour of UARTs when presented with the raw DCF signal.

    The signal is not being processed as a proper aynchronous serial signal
    and things like UART parity and framing errors do not have their standard
    meanings, so would not be presented as such in error messages.

  10. Re: ***SPAM*** AW: Re: AW: convert_rawdcf: parity check FAILED on my embedded Linux system

    If anybody is up for it, I'd appreciate somebody adding this information to
    a suitable topic under http://ntp.isc.org/Support/ConfiguringRefclocks .

    H

  11. Re: convert_rawdcf: parity check FAILED on my embedded Linux system

    David Woolley wrote:
    > In article ,
    > Torsten.Krieger@krieger-mis.de (Torsten Krieger) wrote:
    >
    >
    >>it seems to receive the DFC signal from Mainflingen correctly. I do not know
    >>much of the receiver Hardware since it is proprietary and not well
    >>documented, I only know that it receives the raw serial signal with 50 baud.

    >
    >
    > If it is interfacing at 50 bits per second through a UART (the actual
    > signal is 1 baud), the receiver's baseband processing is trivial and
    > you are processing the raw baseband signal with only low pass filtering
    > applied. The internals may not be published, but there are not exactly
    > any trade secrets in such a receiver.
    >
    > The 50 baud serial interface is a hack in ntpd which makes use of the
    > error behaviour of UARTs when presented with the raw DCF signal.
    >
    > The signal is not being processed as a proper aynchronous serial signal
    > and things like UART parity and framing errors do not have their standard
    > meanings, so would not be presented as such in error messages.

    You still pretend that the pulse is a StartBit, Some LowBits, after that
    Some HighBits,... and try to receive it with 50 (or 25 Baud) 8Bits/char ..
    With 50 Baud there is a chance you get a framing error instead of 0x00
    for the long pulse.

    I tried that ~8/9years ago, but the UART processor on the MVME167 Board did
    not support Baudrates below 100 Baud ;-(. in the end this inability was
    beneficial. I put the DCF Signal Status in the housekeeping area of my
    10ms Dataframes. better timing information than pushing it through software
    first.

    uwe


  12. AW: Re: AW: convert_rawdcf: parity check FAILED on myembedded Linux system

    Hi Uwe,

    I made a small c program which reads the serial port /dev/refclock-0
    character by character, ntpd switched off. Shall I see one character by
    second (second = 1/60 minute) 0xf0 for low bit and 0x00 for high bit? If
    this should be the case then something went wrong with my serial interface.

    Ciao,
    Torsten

    Uwe wrote:
    >http://www.eecis.udel.edu/~mills/ntp/dcf77.html
    >
    >The DCF Signals is 1 pulse every 1 second. the 59th pulse is omitted to
    >mark the minute transition.
    >AAdditonal information is coded into the pulselength of the second pulses.
    >0.1 sec for a low bit, 0.2sec for a high bit.
    >
    >on a 50Baud (0.02s/bit) serial line with inverted sense this is received as
    >
    >HHHHLLLLLHHHHHHHH S=StartBit, s=StopBit(s)
    >____S01234567s____ 0xf0 for a low bit
    >
    >and
    >
    >HHHHLLLLLLLLLHHH
    >____S01234567s____ 0x00 for a high bit
    >
    >uwe


    _______________________________________________
    questions mailing list
    questions@lists.ntp.isc.org
    https://lists.ntp.isc.org/mailman/listinfo/questions

    _______________________________________________
    questions mailing list
    questions@lists.ntp.isc.org
    https://lists.ntp.isc.org/mailman/listinfo/questions


  13. Re: AW: Re: AW: convert_rawdcf: parity check FAILED on my embedded Linux system

    On Sun, 15 Oct 2006 11:28:09 GMT, Torsten Krieger wrote:
    > Hi Uwe,
    >
    > I made a small c program which reads the serial port /dev/refclock-0
    > character by character, ntpd switched off. Shall I see one character by
    > second (second = 1/60 minute) 0xf0 for low bit and 0x00 for high bit? If
    > this should be the case then something went wrong with my serial interface.
    >
    > Ciao,
    > Torsten
    >
    > Uwe wrote:
    >>http://www.eecis.udel.edu/~mills/ntp/dcf77.html
    >>
    >>The DCF Signals is 1 pulse every 1 second. the 59th pulse is omitted to
    >>mark the minute transition.
    >>AAdditonal information is coded into the pulselength of the second pulses.
    >>0.1 sec for a low bit, 0.2sec for a high bit.
    >>
    >>on a 50Baud (0.02s/bit) serial line with inverted sense this is received as
    >>
    >>HHHHLLLLLHHHHHHHH S=StartBit, s=StopBit(s)
    >>____S01234567s____ 0xf0 for a low bit
    >>
    >>and
    >>
    >>HHHHLLLLLLLLLHHH
    >>____S01234567s____ 0x00 for a high bit
    >>
    >>uwe

    >

    I dont think its that simple in practice.
    The DCF receivers I have used have some large jitter on both start and
    length of pulse. Add to that noise impulses.
    Try and print the bits and figure out what signal you get.
    /hjj

  14. Re: AW: Re: AW: convert_rawdcf: parity check FAILED on my embeddedLinux system

    Torsten.Krieger@krieger-mis.de (Torsten Krieger) writes:

    > Hi Uwe,
    >
    > I made a small c program which reads the serial port /dev/refclock-0
    > character by character, ntpd switched off. Shall I see one character by
    > second (second = 1/60 minute) 0xf0 for low bit and 0x00 for high bit? If
    > this should be the case then something went wrong with my serial interface.
    >
    > Ciao,
    > Torsten
    >


    You may want to look at parseutil/testdcf and parseutil/dcfd.
    testdcf has a fixed 1/0 decision while dcfd dynamically determines
    the 1/0 decision value.

    dcfd should give you something like this:
    ../dcfd -i /dev/refclock-1
    DCF77 monitor 4.18 - Copyright (C) 1993-2005 by Frank Kardel

    RADMLSMin....PHour..PMDay..DayMonthYear....P
    RADMLS1248124P124812P1248121241248112481248P
    \ ----#-##-----#.............................. *** INCOMPLETE
    / --#--#----#--#-##-#-##-#-#-###----#-##-----# *** NO MINUTE INC
    - --#--#-#--#----##-#-##-#-#-###----#-##...... Su, 16:11:52, 15.10.2006, <__D_>

    testdcf would give:
    ../testdcf /dev/refclock-1
    DCF77 monitor 4.10 - Copyright (C) 1993-2005, Frank Kardel

    RADMLSMin....PHour..PMDay..DayMonthYear....P
    RADMLS1248124P124812P1248121241248112481248P
    - ##-#-##-#-#-###----#-##-----#............... *** INCOMPLETE
    - ............................................ Su, 16:18:04, 15.10.06, <__D_>

    Frank

  15. Re: AW: Re: AW: convert_rawdcf: parity check FAILED on my embeddedLinux system

    Torsten Krieger wrote:
    > Hi Uwe,
    >
    > I made a small c program which reads the serial port /dev/refclock-0
    > character by character, ntpd switched off. Shall I see one character by
    > second (second = 1/60 minute) 0xf0 for low bit and 0x00 for high bit? If
    > this should be the case then something went wrong with my serial interface.

    It has been a couple of years that i had contact with DCF and
    I have never used this in conjuction with ntpd.

    if the raw DCF carrier detection is used as RXD and
    the serial line is configured properly raw, 50Baud 8bits/char no parity,
    ignore parity and framing errors (IGNPAR) , break as zero ...
    25 or 40 Baud worked better for me.
    you should receive 1 byte ( or a framing error/break ) every second for 59 seconds
    every 60 seconds.

    100ms --> 5 Bit times -> 1 stop and 4 LSbit low, rest high -> 0xf0
    200ms --> 10 bit Times -> 1 stop and 9 LSbit low, the high -> either 0x00 or framing error
    only jitter between leading and trailing edge is relevant.
    The distance between acceptable low and high indicating chars is always big enough.

    uwe

    ER Hmm: What do you receive?

  16. AW: Re: AW: Re: AW: convert_rawdcf: parity checkFAILED on my embedded Linux system

    Hi folks,

    many thanks to all specially to Uwe his explanation help me a lot. It is now
    working fine, the fault was that my embedded system FOX Board has not
    scanned the RAW DFC receiver with 50 baud. The driver has set to the default
    of 9600 baud when I tried to set it to 50 baud, but feeds back to the stty
    call 50 baud. Mad World!!!

    Ciao,
    Torsten

    -----Ursprungliche Nachricht-----
    Von: questions-bounces@lists.ntp.isc.org
    [mailto:questions-bounces@lists.ntp.isc.org]Im Auftrag von Uwe Klein
    Gesendet: Sonntag, 15. Oktober 2006 17:01
    An: questions@lists.ntp.isc.org
    Betreff: [ntp:questions] Re: AW: Re: AW: convert_rawdcf: parity check
    FAILED on my embedded Linux system


    Torsten Krieger wrote:
    > Hi Uwe,
    >
    > I made a small c program which reads the serial port /dev/refclock-0
    > character by character, ntpd switched off. Shall I see one character by
    > second (second = 1/60 minute) 0xf0 for low bit and 0x00 for high bit? If
    > this should be the case then something went wrong with my serial

    interface.
    It has been a couple of years that i had contact with DCF and
    I have never used this in conjuction with ntpd.

    if the raw DCF carrier detection is used as RXD and
    the serial line is configured properly raw, 50Baud 8bits/char no parity,
    ignore parity and framing errors (IGNPAR) , break as zero ...
    25 or 40 Baud worked better for me.
    you should receive 1 byte ( or a framing error/break ) every second for 59
    seconds
    every 60 seconds.

    100ms --> 5 Bit times -> 1 stop and 4 LSbit low, rest high -> 0xf0
    200ms --> 10 bit Times -> 1 stop and 9 LSbit low, the high -> either 0x00 or
    framing error
    only jitter between leading and trailing edge is relevant.
    The distance between acceptable low and high indicating chars is always big
    enough.

    uwe

    ER Hmm: What do you receive?

    _______________________________________________
    questions mailing list
    questions@lists.ntp.isc.org
    https://lists.ntp.isc.org/mailman/listinfo/questions

    _______________________________________________
    questions mailing list
    questions@lists.ntp.isc.org
    https://lists.ntp.isc.org/mailman/listinfo/questions


  17. Re: AW: Re: AW: Re: AW: convert_rawdcf: parity check FAILED on my embedded Linux system

    Please consider adding information to
    http://ntp.isc.org/Support/ConfiguringRefclocks (and any related pages).

    H

  18. Re: AW: Re: AW: Re: AW: convert_rawdcf: parity check FAILED on myembedded Linux system

    Torsten Krieger wrote:
    > Hi folks,
    >
    > many thanks to all specially to Uwe his explanation help me a lot. It is now
    > working fine, the fault was that my embedded system FOX Board has not
    > scanned the RAW DFC receiver with 50 baud. The driver has set to the default
    > of 9600 baud when I tried to set it to 50 baud, but feeds back to the stty
    > call 50 baud. Mad World!!!

    Hi Torsten.
    freut mich, deine Erklaerung kann ich nicht ganz entschluesseln
    kannst Du mir das ev. nochmal auf deutsch schreiben? ( per mail notfalls hier )

    uwe

    PS & Apropos:
    Kannst Du ev. Dein Postfach mal leermachen, ich hatte Dir dies als eMail geschickt
    aber einen Rueckläufer wegen ueberfuellt bekommen.

+ Reply to Thread