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:
In the
BS2SystemConfig
structure, set thesyncTime
option to enabled.- Once enabled, the server will periodically send KeepAlive packets to the device.
(You can configure the KeepAlive interval using the BS2_SetKeepAliveTimeout API. ) 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).