To provide an energy-efficient mechanism for a sleepy end device (SED) to verify that it is still connected to its parent (listed in the parent's child table), enable the Child Supervision feature.
The Thread Specification requires an SED to periodically perform an MLE Child Update Request and Response exchange with its parent to verify connectivity. Child Supervision is an alternate solution for verification of SED-to-parent connectivity that places the burden of message transmission on the parent instead of on the energy-constrained SED.
How it works
This feature works in two ways, depending on the node type and which parameters are configured:
On the parent
If a parent does not transmit to its child SED within the
OPENTHREAD_CONFIG_CHILD_SUPERVISION_INTERVAL,
the parent enqueues and sends a Child Supervision message to the child
SED. The Child Supervision message is a MAC frame containing the following
information:
- The RLOC16 of the SED as the destination in the MAC header.
- An empty payload.
By default, a MAC header contains an 802.15.4 ACK request. To disable this
request in the Child Supervision message, set the
OPENTHREAD_CONFIG_CHILD_SUPERVISION_MSG_NO_ACK_REQUEST parameter to 1.
On the child
If an SED does not hear from its parent within the
OPENTHREAD_CONFIG_CHILD_SUPERVISION_CHECK_TIMEOUT,
it assumes that it has lost its connection to the parent and initiates
the MLE
Attach
process to reattach to the network.
How to enable
This feature is disabled by default.
By define
To enable Child Supervision, define
OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE as 1 in the
openthread/src/core/config/child_supervision.h
file, prior to building OpenThread:
#ifndef OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE 1
#endif
By option
Alternatively, use the -DOT_CHILD_SUPERVISION=ON build option when building
OpenThread:
./script/build -DOT_CHILD_SUPERVISION=ON
Parameters
Use the following parameters in
openthread/src/core/config/child_supervision.h
to customize this feature:
| Parameters | |||||
|---|---|---|---|---|---|
OPENTHREAD_CONFIG_CHILD_SUPERVISION_INTERVAL |
|
||||
OPENTHREAD_CONFIG_SUPERVISION_CHECK_TIMEOUT |
|
||||
OPENTHREAD_CONFIG_SUPERVISION_MSG_NO_ACK_REQUEST |
|
API
Use the Child Supervision API to manage the supervision and check timeout intervals directly in your OpenThread application.
CLI
There are no CLI commands related to this feature.