Friend#
Friend component enables Bluetooth Mesh Friend Feature for the node. Friend nodes are required when Low Power Nodes (LPN) are present in the mesh network. When a friendship is established between an LPN and Friend node, the friend node starts to store incoming messages targeted for the LPN. These mesages are forwarded to the LPN upon request. Logging for these messages can be enabled as a configuration option in Simplicity Studio. Callback functions are provided for friendship establishment and termination. Friend functionality can be enabled or disabled during runtime via node configuration. This component is prepared for integration into SOC applications. This is a No-Code component.
Functions#
Function Documentation#
sl_btmesh_friend_feature_init#
void sl_btmesh_friend_feature_init (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Initialize FRIEND functionality. This function is called automatically by the FRIEND component.
sl_btmesh_friend_on_event#
void sl_btmesh_friend_on_event (sl_btmesh_msg_t * evt)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_btmesh_msg_t * | [in] | evt | Pointer to incoming friend event. |
Handling of mesh friend events.
sl_btmesh_friend_on_friendship_established#
void sl_btmesh_friend_on_friendship_established (uint16_t netkey_index, uint16_t lpn_address)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | [in] | netkey_index | Index of the network key used in friendship |
uint16_t | [in] | lpn_address | Low Power Node address |
Called when the Friend Node establishes friendship with another node. This is a callback which can be implemented in the application. Note
If no implementation is provided in the application, then the default weak implementation will be an empty function.
sl_btmesh_friend_on_friendship_terminated#
void sl_btmesh_friend_on_friendship_terminated (uint16_t netkey_index, uint16_t lpn_address, uint16_t reason)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | [in] | netkey_index | Index of the network key used in friendship |
uint16_t | [in] | lpn_address | Low Power Node address |
uint16_t | [in] | reason | Reason for friendship termination |
Called when the friendship that was successfully established with a Low Power Node has been terminated. This is a callback which can be implemented in the application. Note
If no implementation is provided in the application, then the default weak implementation will be an empty function.