Score:0

Chrony Configuration to Accept Radio Time Signals

ru flag
wbg

Is there a way to have Chrony accept an externally generated clock pulse ?

For example, I want to use the Canadian radio time source CHU to provide ticks on the second. Assume that I have the required hardware to receive the signal and have a fast C program to isolate the signal I want (1 KHz tone pulse demarcating seconds) and provide the data to pipe.

I only need the clock to be synchronized to the second, not the exact time.

Does Chrony have a mechanism to accept a one second periodic correction pulse ?

Score:1
ar flag

Yes. It's even covered in their FAQ.

It's called pulse per second. Generally, you provide the pulse to the kernels pps interface, which handles using interrupts. Reading it in userspace is likely to introduce a lot of jitter, as you're not able to poll it consistently enough.

ru flag
wbg
I didn't make the connection with PPS I'm super new to time sync. Any idea if there's a kernel module for this type of thing ? I'll going to search but it's harder when you're a newbie. Thanks.
vidarlo avatar
ar flag
[Yes](https://www.kernel.org/doc/html/latest/driver-api/pps.html).
ru flag
wbg
I found that one. That doc says I need to apply the PPS to a time stamp myself. Was hoping for something with less work. Like just pointing Chrony to a PPS source and it's done.
vidarlo avatar
ar flag
That's basically what you do. You configure it to use the PPS source.
ru flag
wbg
Are you saying, I add the PPS config source and then chrony uses it along with the internal clock together all by itself ?? That would be doable at my level of C. It's going to be hard enough to get the stream from the USB audio input and filter it.
vidarlo avatar
ar flag
You probably don't want to run PPS over USB. USB has jitter; it's a packet based protocol. And you absolutely don't want to process it in userspace. You want your PPS signal to hit a I/O line with interrupt support in the CPU, e.g. serial port or GPIO. Either go with e.g. a GPS providing a PPS, or stick to NTP servers. What you propose is likely to decrease the quality of your clock.
ru flag
wbg
I understand the need for a kernel space driver and being determinant. This project is to support HAM radio requirement for accurate to 1 second clock when no GPS is available. I have a dongle but it could be lost or broken or the GPS signals turned off for some reason. My radio is the source of the 14.6 MHz signal and the audio is accessed via USB UART converter. I wish I had a true serial port on the laptop I want to use. Thanks for you help.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.