Real Time Clock
- This topic has 4 replies, 2 voices, and was last updated 13 years, 11 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Home › Forums › MultiConnect OCG › Real Time Clock
Is there a way to set the modem’s real time clock to the cellular network’s time, or is there nothing wrong with calling AT^SIND over and over?
EDIT: clarification
I would recommend trying NTP. There is a package included in the base-image called ‘ntpdate’ that allows syncing the clock with an NTP server. This can be called from a cron job to be done periodically.
If you need more continuous synchronization, the NTP daemon (ntpd) will constantly correct the clock. ntpd is provided by the “ntp” package.
Thanks. I’ll try that.
A problem I have run in to is that using the NTP requires more data usage than is acceptable. If it’s possible, getting the real time from the cellular network would be preferable.
Is there a way to get the real time from the cellular network?
I’ve tried the real time clock command, but I can’t get it to initialize. Any help would be appreciated.
If the full NTPD server is using too much data for you, you can also run “ntpdate” from a cron job. ntpdate will run a one-time sync and exit. Then you can run it as often as you like. This is probably the simplest solution.
You can get the cellular network time from the modem by using AT^SIND as you mentioned, but the “nitz” value is only updated when the modem registers with the network. It doesn’t get continually updated. You would have to read the “nitz” value from AT^SIND on start up and use that value to set the real time clock (AT+CCLK=). Note that the AT^SIND command is specific to the MTSMC-E1 modem.