2

I am running 2 ARM devices:

  • devA is connected to Ethernet network with all of its NICs
  • devB has the LCD, buttons and all this things for user interfacing, but no NIC and no RTC battery

Both devices run on kernel 4.9 provided by Texas Instruments.

Current time should be displayed on LCD (devB), but as mentioned there is no RTC battery, so after power down system time is kinda random... On the other hand devB has RTC with battery, NTP and PTPv2 client.

Both devices are connected with pppd over serial connection (RS422) which creates TCP/IP network between them.

I tried pushing time with NTP, but it takes lots of time before ntpd client on devB decides that it's ready to grab time from devA (sometimes it could go to an hour or more). Now to have close-to-real time on LCD I'm forcing new time with ssh and date. That is far from what could be called good solution.

I tried to setup PTP synchronisation between them, but it seems that ppp0 interface has no timestamping available. Here is output from ethtool:

# ethtool -T ppp0
Time stamping parameters for ppp0:
Capabilities:
    software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
    software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none

If I'm right the thing I'm missing here is the capability software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)

Is it possible to create ppp connection supporting PTP? If so, how can I achieve this? Alternatively, is there some other way to properly synchronize those devices?

closed as off-topic by hardillb, Bence Kaulics, MatsK, sob, anonymous2 Jan 28 at 18:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Internet of Things, within the scope defined in the help center." – sob, anonymous2
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    I'm voting to close this question as off-topic because it's a pretty specific network time sync question. I think this will be better asked on unix.stackexchange.com or maybe superuser.com – hardillb Jan 11 at 10:58
  • 1
    As random idea, why not just run the ntpdate command to pull the time over the PPP link, triggered by the onUP script for the PPP daemon? – hardillb Jan 11 at 11:00
  • I'm currently doing something like that, but the clock in this device is terrible, and before the ntpd kicks in, that time is few seconds away again. About off-topic - I was pretty sure I have better chance finding here, in IoT, someone that dealt with some similar issue. – mslo Jan 12 at 11:48
  • If the clock drift is that bad you could just run ntpdate via cron every 10mins – hardillb Jan 12 at 13:16

Browse other questions tagged or ask your own question.