# Time syncronisation mechanisms in BlueOs

**URL:** <https://discuss.bluerobotics.com/t/time-syncronisation-mechanisms-in-blueos/22020>\
**Category:** BlueOS\
**Tags:** blueos, ardurover, ardupilot\
**Created:** [November 14, 2025, 12:11pm UTC](https://discuss.bluerobotics.com/t/time-syncronisation-mechanisms-in-blueos/22020 "2025-11-14T12:11:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbt](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@hbt](https://discuss.bluerobotics.com/u/hbt)\
**Post date:** [November 14, 2025, 12:11pm UTC](https://discuss.bluerobotics.com/t/time-syncronisation-mechanisms-in-blueos/22020/1 "2025-11-14T12:11:25Z")

</div>

Hi, I’m wondering if anyone can provide some information about the mechanisms used by BlueOs to synchronise the system time? We have a custom USV running BlueOs on a raspberry pi 4 as a companion to a pixhawk 6c running ardupilot rover. The pixhawk has gps/compass module connected for global position. In the field we do not have any internet connection so the pi cannot synchronize time via ntp. It seems that we should be able to synchronise time via the gnss connection however it is unclear as to whether there is mechanism to do this automatically exists. I’ve found a couple of forum threads discussing similar issues (although with slightly different hardware) but they contain conflicting information. Does this mechanism exists? Or does BlueOs use any other methods to sychronise the time such as checking the ground station computer via the browser? If so, how can we monitor if/when they are triggered. If not they we may consider writing a small utility plugin to monitor for gnss messages via mavlink2rest to set the system time and/or integrating an RTC. Thanks

> [@Realtime clock for Raspberry Pi 4 (or Navigator)](https://discuss.bluerobotics.com/t/realtime-clock-for-raspberry-pi-4-or-navigator/18722):
>
> Just curious to know what people are doing to maintain a somewhat accurate time on the RP4? It looks like the RP4 get’s it’s time from the internet by default. If you’re offline, out in the field, then that isn’t going to work. You can purchase a realtime clock module add-on for RP4. These seem to plug in to the bus header, which is taken up by the Navigator. We could set it up to synch to a time server on the top-side computer - but our direction of travel is ideally to dumb down the topside…

> [@GNSS time sync on the blueboat PI](https://discuss.bluerobotics.com/t/gnss-time-sync-on-the-blueboat-pi/20058):
>
> Hey, I’m looking at ways to get accurate data/times on the blueboat. I couldn’t find anything on whether or not the blueboat navigator pi is receiving a PPS/time from the GNSS used for navigation. Is that already happening/possible and if not, does someone have experience with that ? I would like to avoid adding a second GNSS on the BB just for time sync.

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [November 14, 2025, 4:49pm UTC](https://discuss.bluerobotics.com/t/time-syncronisation-mechanisms-in-blueos/22020/2 "2025-11-14T16:49:17Z")

</div>

Hi @hbt -  
Welcome to the forums!  
The BRD\_RTC\_TYPES parameter controls where BlueOS is pulling time-sync from. If you open the BlueOS web interface in a browser window, it will sync to the computer you’re using’s time. Otherwise, it gets time either from GPS (if checked.)

 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/3X/b/7/b756223c3c64c37edf5953f447e44cba68856bd2.png)

I don’t think it’s possible to “monitor” - it just happens!

---

<div class="post-metadata">

**Author:** ![hbt](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@hbt](https://discuss.bluerobotics.com/u/hbt)\
**Post date:** [November 17, 2025, 11:28am UTC](https://discuss.bluerobotics.com/t/time-syncronisation-mechanisms-in-blueos/22020/3 "2025-11-17T11:28:26Z")

</div>

Hi @tony-white, thanks for your reply!

I can see that we have only GPS selected for this parameter. Although is this not an autopilot parameter and would therefore be configuring the board time on the pixhawk? I can see from our telemetry logs (tlogs) that the ardupilot time syncs with gps when we get a connections. I’m more concerned with how the system time on the pi gets synchronised. Should this update when there is accurate time available in the mavlink messages from the pixhawk? Thanks

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [November 17, 2025, 1:35pm UTC](https://discuss.bluerobotics.com/t/time-syncronisation-mechanisms-in-blueos/22020/4 "2025-11-17T13:35:16Z")

</div>

Hi @hbt, welcome to the forum! 🙂

> [@hbt](#):
>
> does BlueOs use any other methods to sychronise the time such as checking the ground station computer via the browser

If I’m understanding correctly, [BlueOS does this when the interface loads](https://github.com/bluerobotics/BlueOS/pull/877), and has an API endpoint (`/set_time`) that allows setting it yourself if you want to, although it is apparently set up to reject changes that are within 5 minutes of its current time.

The use of that endpoint should appear in the system logs of the commander service.

> [@hbt](#):
>
> I’m more concerned with how the system time on the pi gets synchronised. Should this update when there is accurate time available in the mavlink messages from the pixhawk?

I agree that in the presence of an autopilot with an accurate time source (e.g. a GNSS connection) it makes sense to sync to that, especially in the absence of the BlueOS frontend getting loaded (since users do not always have reason to do so). You are welcome to raise an issue to that effect (or better yet, a pull request) - presumably it should see if there is are any [`SYSTEM_TIME`](https://mavlink.io/en/messages/common.html#SYSTEM_TIME) MAVLink messages in the stream, and if not request one, then if the calculated time (time in message + time since message) is more recent than the onboard computer’s time it should try to update itself using that time with the `set_time` API.

There is [some confusion](https://github.com/mavlink/mavlink/pull/2269#issuecomment-3541813199) around determining if a system has more accurate time, but my understanding from [the preceding discussion](https://github.com/mavlink/mavlink/pull/2269#issuecomment-2857819541) is that later time is broadly considered to be more accurate (perhaps especially if there is a substantial difference). You could also specifically try to check for a GPS connection if you want, but that may miss out on alternative time sources (including, for example, the autopilot’s time being [updated by a GCS](https://github.com/bluerobotics/cockpit/pull/2211)).

---

<div class="post-metadata">

**Author:** ![hbt](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@hbt](https://discuss.bluerobotics.com/u/hbt)\
**Post date:** [November 20, 2025, 11:51am UTC](https://discuss.bluerobotics.com/t/time-syncronisation-mechanisms-in-blueos/22020/5 "2025-11-20T11:51:51Z")

</div>

Hi @EliotBR, thank you for your response! I’ve had a look into the source code and can see that the `/set_time` endpoint does indeed set the system time on the pi. I can also see from the frontend code that this endpoint is called on page load.

Regarding accurate time sources it does seem to make sense that monitoring and syncing to `SYSTEM_TIME` messages would be a useful feature in blueos. Especially for our ‘no internet connection’ use case. I’ve found a couple of useful pages regarding this. In the ardupilot docs it does suggest that it is appropriate to synchronise a companion computer to the autopilot using `SYSTEM_TIME` and `TIMESYNC`mesages. [Time Synchronization Protocol v2 | MAVLink Guide](https://mavlink.io/en/services/timesync.html)

Also, this page describes how to sync the system clocks using the round trip time of `TIMESYNC` messages.

I plan to raise an issue to this effect. I’d be happy to work on a pull request but am not familiar enough with the code base currently to know where the appropriate place to implement this behavior is.
