Jump to content

[SOLVED] Le Potato + DCF77 receiver


V10lator

Recommended Posts

Today we got working UART A, so I decided to wire up a cheap DCF77 receiver to it. On a first test I got spammed with

libre-computer-board ntpd[1518]: parse: convert_rawdcf: start bit / parity check FAILED for "###############RADMLS1248124P124812P1248121241248112481248P??"

This was solved with the following kernel patch:

diff -Nru libretech-linux.old/drivers/tty/serial/meson_uart.c libretech-linux/drivers/tty/serial/meson_uart.c
--- libretech-linux.old/drivers/tty/serial/meson_uart.c	2017-10-24 19:49:30.776000382 +0200
+++ libretech-linux/drivers/tty/serial/meson_uart.c	2017-10-24 19:52:39.660000472 +0200
@@ -362,7 +362,7 @@
 
 	writel(val, port->membase + AML_UART_CONTROL);
 
-	baud = uart_get_baud_rate(port, termios, old, 9600, 4000000);
+	baud = uart_get_baud_rate(port, termios, old, 50, 4000000);
 	meson_uart_change_speed(port, baud);
 
 	port->read_status_mask = AML_UART_TX_FIFO_WERR;

No more errors in the logs but still no time:

root@libre-computer-board:/home/libre# ntpq -c as -c cv -c rv

ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 29169  8811   yes  none  none    reject    mobilize  1
  2 29170  802b   yes    no  none    reject clock_alarm  2
associd=0 status=0012 1 event, clk_bad_format,
device="RAW DCF77 CODE (Conrad DCF77 receiver module)",
timecode="-?#-#?-??---#--?-?-???---1??p1-?-?-?1--8-2--4-??-1?2-?1--8??_",
poll=24, noreply=0, badformat=1, baddata=0, fudgetime1=292.000,
stratum=0, refid=DCFa, flags=0, refclock_time="<UNDEFINED>",
refclock_status="", refclock_format="RAW DCF77 Timecode",
refclock_states="*BAD FORMAT: 00:24:38 (100.00%); running time: 00:24:38"
associd=0 status=c016 leap_alarm, sync_unspec, 1 event, restart,
version="ntpd 4.2.8p4@1.3265-o Thu Sep  7 20:45:44 UTC 2017 (1)",
processor="aarch64", system="Linux/4.13.3-v10-g019e61d-dirty", leap=11,
stratum=16, precision=-22, rootdelay=0.000, rootdisp=22.170, refid=INIT,
reftime=00000000.00000000  Thu, Feb  7 2036  7:28:16.000,
clock=dd99fe54.700d7c45  Tue, Oct 24 2017 20:00:52.437, peer=0, tc=3,
mintc=3, offset=0.000000, frequency=0.000, sys_jitter=0.000000,
clk_jitter=0.000, clk_wander=0.000

Any ideas?

Link to comment
Share on other sites

4 hours ago, Igor said:

No ideas, just a remark. You must be using kernel made from here: https://github.com/BayLibre/libretech-linux while we use mainline kernel.org + a bunch of patches: https://github.com/armbian/build/tree/master/patch/kernel/meson64-next Linux/4.13.3-v10-g019e61d-dirty doesn't seem to be our kernel.

 

Sorry about that. In the meantime everything seems to work, it was just bad reception. I re-arranged the antenna and got:

root@libre-computer-board:/home/libre# ntpq -c as -c cv -c rv
ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1  6448  8811   yes  none  none    reject    mobilize  1
  2  6449  961b   yes   yes  none  sys.peer clock_alarm  1
associd=0 status=0060 6 events, clk_unspec,
device="RAW DCF77 CODE (Conrad DCF77 receiver module)",
timecode="--#---##-#####---D--S---8-2-p------p1-4--212-----1124-1---p",
poll=19, noreply=0, badformat=2, baddata=1, fudgetime1=292.000,
stratum=0, refid=DCFa, flags=0,
refclock_time="dd9a3d04.00000000  Tue, Oct 24 2017 22:28:20.000",
refclock_status="DST; TIME CODE; (LEAP INDICATION; CALLBIT)",
refclock_format="RAW DCF77 Timecode",
refclock_states="*NOMINAL: 00:03:21 (16.76%); BAD FORMAT: 00:15:38 (78.23%); ILLEGAL DATE: 00:01:00 (5.00%); running time: 00:19:59"
associd=0 status=0218 leap_none, sync_lf_radio, 1 event, no_sys_peer,
version="ntpd 4.2.8p4@1.3265-o Thu Sep  7 20:45:44 UTC 2017 (1)",
processor="aarch64", system="Linux/4.13.3-v10-g019e61d-dirty", leap=00,
stratum=1, precision=-22, rootdelay=0.000, rootdisp=163.587, refid=DCFa,
reftime=dd9a3ccd.c4a9b7f9  Wed, Oct 25 2017  0:27:25.768,
clock=dd9a3d04.a924ffa0  Wed, Oct 25 2017  0:28:20.660, peer=6449, tc=6,
mintc=3, offset=-83.435947, frequency=493.057, sys_jitter=77.994238,
clk_jitter=18.641, clk_wander=118.435

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines