16.10.3 OS date ( time ) - best way to configure update via ntp


From experimentation and the following documentation - I think that the stock legato OS - date (time) is updated via the cellular network (NITS) and that time update via ntp is disabled

Cellular network time in the UK is very flaky - so I’d like to use ntp instead.

What is the recommended method?
At a guess we have the following options

  1. Modify the time settings - maybe /etc/time_service.conf ?
  2. Manually call ntpd from an app? - something like ntpd -p time.nist.gov works – not sure how to make ntpd available to an app though
  3. something else?

I think the following topic is related to this topic


Hi johnofleek,

I think calling “ntpd -p time.nist.gov” in app is the easiest and most controllable way so your app can call it after data connection established.
But “ntpd” requires to run as root so need to set “sandboxed: false” in .adef.

Otherwise, modify /etc/time_service.conf to set

  • TIME_SERVICES=“qcom_time ntpd_time”
  • NTPD_SERVERS=“” #use IP address otherwise ntpd may exit as failed to resolve domain name

Then ntpd will run in background and wait for data connection to sync time, but reminded it also depends on boot script on the system.

Hope it helps.


Hi lotam
Thanks for the suggestions

Calling ntpd - pretty much what I thought except I’d forgotten about the root issue which is bad news as it means in practice that a separate app will be needed just to set the time. The advantage is that the IP usage is controlled

Modify /etc/time_service.conf - the issues with this are - I guess it kicks off regular time request updates? using IP data. I guess it means for a production system rebuilding the os with this option set?

I think a better way would be to modify the Legato modem time daemon (assuming below is correct) to add an option to pick up ntp as well as NITS and GNSS time.


Hi @johnofleek,

There is a related feature that was just merged into master:

Unfortunately do not ask me why it’s the AVC service that triggers the time sync following a data connection.

If you can eventually try that feature, it seems that it will be out by 17.10.
APIs are subject to change in the meantime.