ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Time appears to move back on reboot when not connected to internet

    VOXL 2
    2
    3
    225
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • John Nomikos 0J
      John Nomikos 0
      last edited by

      Good afternoon,

      I am running into a bit of a weird issue on my VOXL2.

      When I reboot the VOXL2, time appears to move back. This causes an issue with journalctl as logs displayed are now in the "future" so it is not displaying current logs.

      An example:

      voxl2:/$ journalctl -fu voxl-camera-server
      -- Logs begin at Thu 2023-03-02 12:58:02 UTC. --
      Mar 02 13:05:45 m0054 bash[3570]:     standby_enabled:     0
      ^C
      voxl2:/$ date
      Thu Mar  2 12:58:34 UTC 2023
      

      Another example where I check date and then reboot VOXL2:

      voxl2:/$ date
      Thu Mar  2 12:58:34 UTC 2023
      voxl2:/$ date
      Thu Mar  2 12:58:58 UTC 2023
      voxl2:/$ jnomikos@john:~/$ adb shell
      
                                                               ▂▂▂▂▂▂▂▂▂▂▂▂▂            
                                                          ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂      
       ███╗   ███╗ ██████╗ ██████╗  █████╗ ██╗         ▗▆████▀▔             ▔▔▀▀▀▀▚▄    
       ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║       ▗▟████▀     ▗██▖    ▐█   ▝▀▆▄▄▄    
       ██╔████╔██║██║   ██║██║  ██║███████║██║      ▟████▀      ▗█▘▝█▖   ▐█       ▜█▀█▄ 
       ██║╚██╔╝██║██║   ██║██║  ██║██╔══██║██║      █▌ ▐█▌     ▗█▘  ▝█▖  ▐█       ▐▄ ▄█ 
       ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║  ██║███████╗  ▀████    ▗█▘    ▝█▖ ▐█     ▂▄███▀  
       ╚═╝     ╚═╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝    ▀▀██▄▄                ▂▆███▀     
                                                           ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘        
      
      
      --------------------------------------------------------------------------------
      system-image: 1.6.2-M0054-14.1a-perf
      kernel:       #1 SMP PREEMPT Fri May 19 22:19:33 UTC 2023 4.19.125
      --------------------------------------------------------------------------------
      hw version:   M0054
      --------------------------------------------------------------------------------
      voxl-suite:   1.0.0
      --------------------------------------------------------------------------------
      no current network connection
      --------------------------------------------------------------------------------
      
      
      voxl2:/$ date 
      Thu Mar  2 12:58:15 UTC 2023
      

      Is there anything that could be causing this time discrepancy when turning off and on the VOXL2?

      These examples I gave above were on hard reboot (cutting power from device). But this even happens on soft reboot.

      Soft reboot example:

      voxl2:/$ date
      Thu Mar  2 13:00:22 UTC 2023
      voxl2:/$ reboot
      voxl2:/$ jnomikos@john:~$ adb shell
      
                                                               ▂▂▂▂▂▂▂▂▂▂▂▂▂            
                                                          ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂  
       ███╗   ███╗ ██████╗ ██████╗  █████╗ ██╗         ▗▆████▀▔             ▔▔▀▀▀▀▚▄    
       ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║       ▗▟████▀     ▗██▖    ▐█   ▝▀▆▄▄▄    
       ██╔████╔██║██║   ██║██║  ██║███████║██║      ▟████▀      ▗█▘▝█▖   ▐█       ▜█▀█▄ 
       ██║╚██╔╝██║██║   ██║██║  ██║██╔══██║██║      █▌ ▐█▌     ▗█▘  ▝█▖  ▐█       ▐▄ ▄█ 
       ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║  ██║███████╗  ▀████    ▗█▘    ▝█▖ ▐█     ▂▄███▀  
       ╚═╝     ╚═╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝    ▀▀██▄▄                ▂▆███▀     
                                                           ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘        
      
      
      --------------------------------------------------------------------------------
      system-image: 1.6.2-M0054-14.1a-perf
      kernel:       #1 SMP PREEMPT Fri May 19 22:19:33 UTC 2023 4.19.125
      --------------------------------------------------------------------------------
      hw version:   M0054
      --------------------------------------------------------------------------------
      voxl-suite:   1.0.0
      --------------------------------------------------------------------------------
      no current network connection
      --------------------------------------------------------------------------------
      
      
      voxl2:/$ date
      Thu Mar  2 12:58:10 UTC 2023
      

      This VOXL2 does not have an internet connection. It uses microhard radio. With access to the internet, the VOXL2 will synchronize it's clock on startup.

      jnomikos@john:~$ adb wait-for-device shell
      
                                                               ▂▂▂▂▂▂▂▂▂▂▂▂▂            
                                                          ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂      
       ███╗   ███╗ ██████╗ ██████╗  █████╗ ██╗         ▗▆████▀▔             ▔▔▀▀▀▀▚▄    
       ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║       ▗▟████▀     ▗██▖    ▐█   ▝▀▆▄▄▄    
       ██╔████╔██║██║   ██║██║  ██║███████║██║      ▟████▀      ▗█▘▝█▖   ▐█       ▜█▀█▄ 
       ██║╚██╔╝██║██║   ██║██║  ██║██╔══██║██║      █▌ ▐█▌     ▗█▘  ▝█▖  ▐█       ▐▄ ▄█ 
       ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║  ██║███████╗  ▀████    ▗█▘    ▝█▖ ▐█     ▂▄███▀  
       ╚═╝     ╚═╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝    ▀▀██▄▄                ▂▆███▀     
                                                           ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘        
      
      
      --------------------------------------------------------------------------------
      system-image: 1.6.2-M0054-14.1a-perf
      kernel:       #1 SMP PREEMPT Fri May 19 22:19:33 UTC 2023 4.19.125
      --------------------------------------------------------------------------------
      hw version:   M0054
      --------------------------------------------------------------------------------
      voxl-suite:   1.0.0
      --------------------------------------------------------------------------------
      current IP: wlan0: 10.1.10.116
      --------------------------------------------------------------------------------
      
      
      voxl2:/$ date
      Mon Aug 21 17:40:34 UTC 2023
      voxl2:/$ jnomikos@john:~$ adb wait-for-device shell
      
                                                               ▂▂▂▂▂▂▂▂▂▂▂▂▂            
                                                          ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂      
       ███╗   ███╗ ██████╗ ██████╗  █████╗ ██╗         ▗▆████▀▔             ▔▔▀▀▀▀▚▄    
       ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║       ▗▟████▀     ▗██▖    ▐█   ▝▀▆▄▄▄    
       ██╔████╔██║██║   ██║██║  ██║███████║██║      ▟████▀      ▗█▘▝█▖   ▐█       ▜█▀█▄ 
       ██║╚██╔╝██║██║   ██║██║  ██║██╔══██║██║      █▌ ▐█▌     ▗█▘  ▝█▖  ▐█       ▐▄ ▄█ 
       ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║  ██║███████╗  ▀████    ▗█▘    ▝█▖ ▐█     ▂▄███▀  
       ╚═╝     ╚═╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝    ▀▀██▄▄                ▂▆███▀     
                                                           ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘        
      
      
      --------------------------------------------------------------------------------
      system-image: 1.6.2-M0054-14.1a-perf
      kernel:       #1 SMP PREEMPT Fri May 19 22:19:33 UTC 2023 4.19.125
      --------------------------------------------------------------------------------
      hw version:   M0054
      --------------------------------------------------------------------------------
      voxl-suite:   1.0.0
      --------------------------------------------------------------------------------
      no current network connection
      --------------------------------------------------------------------------------
      
      
      voxl2:/$ date
      Mon Aug 21 17:40:34 UTC 2023
      
      

      I tested, and this happens on platform 0.9.5 as well as 1.0.0. Is there a solution?

      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @John Nomikos 0
        last edited by

        @John-Nomikos-0 The VOXL2 has no battery backed real time clock so once it is powered off it no longer maintains time. If you are connected to the Internet then the NTP time protocol is used to update the time. If that is successful then it will save that initial time and use it on future reboots. So this is why it looks like time is going backward if you don't have an Internet connection. All it can do is load the time from a previous run and go from there. The only other possible way to update the time is if you have a valid GPS signal that can provide time. In that case it would be possible to update the system time with the time from GPS however that is currently not implemented on VOXL2. That will be added in a future release but it still will only help when you have a valid GPS signal.

        John Nomikos 0J 1 Reply Last reply Reply Quote 0
        • John Nomikos 0J
          John Nomikos 0 @Eric Katzfey
          last edited by

          @Eric-Katzfey Makes sense to me. Thank you for the info. Threw me off because journalctl was showing most recent logs were from the future.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB | Contributors