Hi,
Can anyone clearly explain how date/time sync should to work in legato framework?
From my understanding it should automatically sync date with network, but for me it doesn’t happen.
Ideally device time also should be synced when data connections is established (i am connecting to airvantage). According to logs system tries to do this but fails (incorrect time set intentionally):
Apr 20 18:17:04 fx30 user.warn Legato: -WRN- | dcsDaemon[26811]/dcsDaemon T=main | dcsServer.c GetTimeServer() 881 | No server configured, use the default one
Apr 20 18:17:14 fx30 user.err Legato: =ERR= | dcsDaemon[26811] | rdate: timeout connecting to time server
Apr 20 18:17:14 fx30 user.err Legato: =ERR= | dcsDaemon[26811]/dcsDaemon T=main | dcsServer.c RetrieveTimeFromServer() 2077 | Unable to retrieve time from server
Apr 20 18:17:14 fx30 user.err Legato: =ERR= | avcDaemon[27360]/avcDaemon T=main | avcClient.c CheckDateTimeValidity() 223 | Unable to retrieve date or time from server
but where the time server is configured? is it an ntpd server from /etc/time_service.conf?
running ntpd -p doesn’t work for me as well…
My device: Sierra FX30 (WP7702). Mobile network connection only.
Worth to mentions that this device is not intended to work in Europe (Ireland) so it falls to 2G connection. This may be causing issues with network time sync but why time is not synced over data connection?
When we had a problem like this our issue was that not all cellular network providers would have this option to get time from them so we switched to using some ntpd servers and edited the init.d script that updates time.
We edited it in a way that it triggers contacting ntdp server only when there is internet connectivity. So what we do, we ping ntpd servers until internet connectivity is available, then we obtain time from ntpd and we don’t even use cellular network time.
Thanks for the reply @lazzox
Yes it looks like my issue. I would write script but the problem is ntpd -p also doesn’t work. Did you have such issues? Would you mind sharing the script?
FYI @jyijyi
I got the trace…
If i am getting this correctly - server does not respond… Maybe because of incorrect configuration on client side. Request looks pretty weird. Any tips? fx30_time_sync.pcap (611 Bytes)
Update:
It actually returns a valid date (i stopped utility too soon first time)
Ping gives me different address, but it doesn’t matter i guess.
a - it doesn’t work anyway.
b - pool gives you different time server address (best for you)
i can see correct time coming from the server, i don’t understand why system does not accept it