Real Time Clock

Home Forums MultiConnect OCG Real Time Clock

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2519
    Brian
    Participant

    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

    #3056
    Jesse Gilles
    Blocked

    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.

    #3057
    Brian
    Participant

    Thanks. I’ll try that.

    #3058
    Brian
    Participant

    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.

    #3059
    Jesse Gilles
    Blocked

    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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.