Zigbee Heartbeat Management

Last Updated on : 2021-09-29 08:55:58download

API list

Function name Description
dev_heartbeat_set Set the heartbeat mechanism.

dev_heartbeat_set

Set a heartbeat mechanism to detect the connection between the Zigbee device and the gateway as well as to refresh the router. Since the heartbeat transmission relies on the system software timer, you must call dev_heartbeat_set in dev_system_on_init() or the subsequent procedure. The SDK will schedule the heartbeats based on the device type. You can also make an explicit call to change the default setting.

The following code shows an exmaple implemetned in dev_system_on_init().

void dev_system_on_init(void)
{
    dev_heartbeat_set(APP_VERSION, 180000); /// < 180s + 30s. Send a heartbeat at a random value.
}