Overview

This article provides guidance on how to synchronize time between the server and the device using the BioStar 2 Device SDK.


Manual Synchronization

To manually sync the device time, you can use the timezone in the BS2SystemConfig.
This allows the server to directly set the device’s time.


Automatic Synchronization

If you want the device to automatically sync its time with the server, follow these steps:

  1. In the BS2SystemConfig structure, set the syncTime option to enabled.

  2. Once enabled, the server will periodically send KeepAlive packets to the device.
    (You can configure the KeepAlive interval using the BS2_SetKeepAliveTimeout API. )
  3. If syncTime is enabled on the device, it will update its internal time using the timestamp included in the KeepAlive packet.

? Note: The time used for synchronization is based on UTC+0 (Coordinated Universal Time).