4 Replies Latest reply on Oct 17, 2014 8:35 AM by KurtE

    Automatic setting of date and time

    KurtE

      I know this is probably answered some place obvious, but I have not found it.

       

      When I connect up the Edison using USB, I believe the system date and time is properly setup using something like ntp or timesync or the like.  However if I simply power it up from external power, the date and time does not automatically update, but simply start up from where it left off, when I powered off.

       

      I have wifi setup properly, which I use putty and winscp to talk to the edison.

       

      So question: is there some configuration setting, to have it properly update the data and time?

       

      Side question: If I am only using wifi to talk to the Edison can I configure the Arduino IDE to download over wifi?  Not a big deal as I mainly am doing building on the hardware.

       

      Thanks

        • 1. Re: Automatic setting of date and time
          Intel_Jesus

          Hi KurtE,

           

          The ntp package is not currently available on Edison image, it should be available in the future. A work around would be to build your custom image for Edison and include the ntp package.

          Take a look at this post Re: NTP client on the Galileo community, give it a try and see if it works.

           

          Regards,

          Intel_Jesus

          • 2. Re: Automatic setting of date and time
            KurtE

            Thanks I tried following thread you mentioned and tried to install the packages mentiond, but this errors out:

             

            root@Edison:/tmp# cd /tmp && opkg install ntpdate_4.2.6p5-r6.0_i586.ipk ntp-tickadj_4.2.6p5-r6.0_i586.ipk ntp_4.2.6p5-r6

            .0_i586.ipk ntp-utils_4.2.6p5-r6.0_i586.ipk

            Installing ntpdate (4.2.6p5-r6.0) to root...

            Installing ntp-tickadj (4.2.6p5-r6.0) to root...

            Installing ntp (4.2.6p5-r6.0) to root...

            ntp: unsatisfied recommendation for iana-etc

            Installing ntp-utils (4.2.6p5-r6.0) to root...

            Collected errors:

            * satisfy_dependencies_for: Cannot satisfy the following dependencies for ntpdate:

            *      libc0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *

            * opkg_install_cmd: Cannot install package ntpdate.

            * satisfy_dependencies_for: Cannot satisfy the following dependencies for ntp-tickadj:

            *      libc0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *

            * opkg_install_cmd: Cannot install package ntp-tickadj.

            * satisfy_dependencies_for: Cannot satisfy the following dependencies for ntp:

            *      libm0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *       libc0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *

            * opkg_install_cmd: Cannot install package ntp.

            * satisfy_dependencies_for: Cannot satisfy the following dependencies for ntp-utils:

            *      libc0 (>= 0.9.33+git0+946799cd0ce0c6c803c9cb173a84f4d607bde350) *

            * opkg_install_cmd: Cannot install package ntp-utils.

            • 3. Re: Automatic setting of date and time
              KurtE

              I think this is more or less a duplicate of the thread: no ntp on edison?

               

              FYI - For a temporary fix I hacked up simple ntp client program I found on stack overflow.  It sometimes hangs when the NTP client does not respond, but at least it gives me something to get the date/time close enough for my dependency stuff in make files to work properly.

               

              I included the source in the thread I mentioned, but I think this caused the message to be moderated.  So I also uploaded the sources into my github Raspberry Pi project, which has most of my linux stuff for several boards... If anyone is interested, it is up at: Raspberry_Pi/ntpdate.c at master · KurtE/Raspberry_Pi · GitHub

              • 4. Re: Automatic setting of date and time
                KurtE

                Update on this.  Yesterday the automatic date and time setting was working again.  When I used the command:

                journalctl -u systemd-timesyncd.service -b

                It showed that the time was updated from time3.google.com

                 

                Not sure what changed to make it work again.  I did notice yesterday that my / directory was full.  As per another thread, I deleted the journal files, which knocked my / down to something like 66% this morning up to 74%...

                 

                Looking at sizes of journals using du:

                5948./log/journal/b571a4a4bb504f84b0f1819994e6df6e
                5948./log/journal/b0a00423871242348f3a289c2ef54340
                5948./log/journal/4fcdc58a84e74521ba48cf3056357422
                5948./log/journal/a6d1fac6bcf84d83a060e788fe1b4dd2

                23796   ./log/journal

                23880   ./log

                 

                Looks like I need to learn how to configure the journal control.  Would be great if defaults were set to avoid this, especially since there are probably many who are trying out the Edison who are not linux experts.  I myself know just enough to get myself into trouble