Btmesh Custom Role#

This component makes it possible to initialize a mesh device as a provisionee or provisioner based on application logic. For example an application could be implemented in a way that the device becomes a provisioner permanently when button is pressed at power up, otherwise it is just a provisionee. The sl_btmesh_custom_role_init weak callback function is called on boot event and the application is able to override this function to call one of the following initializer BT Mesh stack APIs: - sl_btmesh_node_init - sl_btmesh_node_init_oob - sl_btmesh_prov_init This component is prepared for integration into SOC applications.

Functions#

void
sl_bt_custom_role_on_event(sl_bt_msg_t *evt)

Function Documentation#

sl_bt_custom_role_on_event#

void sl_bt_custom_role_on_event (sl_bt_msg_t * evt)
Parameters
TypeDirectionArgument NameDescription
sl_bt_msg_t *[in]evt

Pointer to incoming event.

Handle BLE events for the mesh custom role.

This function is called automatically after enabling the component.


sl_btmesh_custom_role_init#

void sl_btmesh_custom_role_init (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Called on boot event and the application is able to override this function to initialize the device as a provisioner or as a provisionee.

The application should call one of the following BT Mesh stack initializer APIs based on implementation-specific logic:

  • sl_btmesh_node_init

  • sl_btmesh_node_init_oob

  • sl_btmesh_prov_init

This is a callback (weak function) 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, and the application shall handle the sl_bt_evt_system_boot_id event by calling the mentioned APIs.