19#if CONFIG_ENABLE_PROVISIONING
27#define CONTROL_TASK_PROV_EVT_MASK CONTROL_TASK_MSG_EVT_IDENTIFY_START \
28 | CONTROL_TASK_MSG_EVT_PROVISION_STOP \
29 | CONTROL_TASK_MSG_EVT_IDENTIFY_STOP \
30 | CONTROL_TASK_MSG_EVT_NODE_RESET
32#define MESHX_PROV_SRV_CLIENT_EVENT_BMAP CONTROL_TASK_MSG_EVT_SYSTEM_FRESH_BOOT
33#define MESHX_PROV_SRV_SERVER_EVENT_BMAP CONTROL_TASK_MSG_EVT_EN_NODE_PROV
43#if CONFIG_MESHX_DEFAULT_LOG_LEVEL < MESHX_LOG_INFO
49#if CONFIG_MESHX_DEFAULT_LOG_LEVEL < MESHX_LOG_INFO
100 if (!pdev || !params)
struct meshx_prov_params meshx_prov_params_t
Structure to hold provisioning parameters.
@ MESHX_NODE_PROV_COMPLETE_EVT
@ MESHX_PROXY_SERVER_CONNECTED_EVT
@ MESHX_NODE_PROV_RESET_EVT
@ MESHX_PROXY_SERVER_DISCONNECTED_EVT
@ MESHX_NODE_PROV_LINK_OPEN_EVT
@ MESHX_NODE_PROV_LINK_CLOSE_EVT
@ MESHX_NODE_PROV_ENABLE_COMP_EVT
#define MESHX_ADDR_UNASSIGNED
uint8_t meshx_uuid_addr_t[MESHX_UUID_ADDR_LEN]
meshx_err_t meshx_plat_init_prov(const uint8_t *uuid)
Initialize provisioning parameters.
control_task_msg_evt_provision_t prov_evt_t
struct meshx_ble_mesh_prov_srv_param meshx_prov_srv_param_t
control_task_msg_handle_t prov_srv_cb_t
struct dev_struct dev_struct_t
Structure representing the device composition and elements.
Header file for the control task in the BLE mesh node application.
CONTROL_TASK_MSG_EVT_SYSTEM_FRESH_BOOT
CONTROL_TASK_MSG_EVT_IDENTIFY_START
CONTROL_TASK_MSG_EVT_PROVISION_STOP
uint32_t control_task_msg_evt_t
Type definition for control task message event.
CONTROL_TASK_MSG_EVT_PROXY_CONNECT
@ CONTROL_TASK_MSG_CODE_FRM_BLE
@ CONTROL_TASK_MSG_CODE_PROVISION
CONTROL_TASK_MSG_EVT_IDENTIFY_STOP
CONTROL_TASK_MSG_EVT_NODE_RESET
CONTROL_TASK_MSG_EVT_EN_NODE_PROV
meshx_err_t control_task_msg_publish(control_task_msg_code_t msg_code, control_task_msg_evt_t msg_evt, const void *msg_evt_params, size_t sizeof_msg_evt_params)
Publish a control task message.
CONTROL_TASK_MSG_EVT_PROVISION_ALL
enum __packed control_task_msg_evt_provision control_task_msg_evt_provision_t
Enumeration for control task provisioning events.
CONTROL_TASK_MSG_EVT_PROXY_DISCONN
meshx_err_t control_task_msg_subscribe(control_task_msg_code_t msg_code, control_task_msg_evt_t evt_bmap, control_task_msg_handle_t callback)
Subscribe to a control task message.
meshx_err_t
MeshX Error Codes.
#define MESHX_LOGW(module_id, format,...)
#define MESHX_LOGI(module_id, format,...)
#define MESHX_LOGE(module_id, format,...)
#define MESHX_LOGD(module_id, format,...)
Header file for MeshX Non-Volatile Storage (NVS) operations.
meshx_err_t meshx_nvs_element_ctx_remove(uint16_t element_id)
Remove the context of a specific element from NVS.
meshx_err_t meshx_nvs_set(char const *key, void const *blob, uint16_t blob_size, bool arm_timer)
Set a value in the NVS.
#define MESHX_NVS_AUTO_COMMIT
Header file for OS timer utilities.
meshx_err_t meshx_os_timer_start(const meshx_os_timer_t *timer_handle)
Start a timer.
struct meshx_os_timer meshx_os_timer_t
Alias for the meshx_os_timer structure.
meshx_err_t meshx_os_timer_create(const char *name, uint32_t period, bool reload, meshx_os_timer_cb_t cb, meshx_os_timer_t **timer_handle)
Create a timer.
#define MESHX_PROV_SRV_CLIENT_EVENT_BMAP
static meshx_os_timer_t * g_boot_timer
#define MESHX_PROV_SRV_SERVER_EVENT_BMAP
meshx_err_t meshx_prov_srv_reg_el_client_cb(prov_srv_cb_t cb)
Register a callback function for provisioning events.
meshx_err_t meshx_prov_srv_reg_el_server_cb(prov_srv_cb_t cb)
Register a callback function for provisioning events.
static meshx_err_t meshx_init_freshboot_timer(dev_struct_t *p_dev, uint16_t timeout_ms)
Initializes the fresh boot timer.
static meshx_err_t meshx_prov_srv_control_task_handler(dev_struct_t *pdev, control_task_msg_evt_t evt, meshx_prov_srv_param_t *params)
Control task handler for the provisioning server.
meshx_err_t meshx_init_prov(dev_struct_t *p_dev, const meshx_prov_params_t *prov_cfg)
Initialize provisioning parameters.
#define CONTROL_TASK_PROV_EVT_MASK
Mask for control task provisioning events.
static void meshx_handle_node_reset(dev_struct_t *pdev)
Handle node reset event.
static meshx_err_t meshx_prov_control_task_handler(dev_struct_t *pdev, control_task_msg_evt_t evt, void *params)
Handles provisioning control task events.
meshx_err_t meshx_prov_srv_notify_plat_event(meshx_prov_srv_param_t *param)
Notify the model event to the application.
static meshx_err_t meshx_prov_srv_meshx_reg_cb(void)
Register the BLE Mesh provisioning callback for MeshX Layer Internal.
static void meshx_init_freshboot_timer_trigger_cb(const meshx_os_timer_t *p_timer)
Callback function for the boot timer.
static meshx_err_t meshx_prov_srv_reg_from_ble_cb(void)
Register the BLE Mesh provisioning callback.
struct prov_cb_evt_ctrl_task_evt_table prov_cb_evt_ctrl_task_evt_table_t
Structure to map provisioning callback events to control task events.
Header file for provisioning related definitions and functions.
meshx_app_store_t meshx_store
meshx_prov_cb_param_t param
uint16_t freshboot_timeout_ms
Structure to map provisioning callback events to control task events.
control_task_msg_evt_provision_t ctrl_task_evt
BLE Mesh Node/Provisioner callback parameters union.
struct meshx_prov_cb_param_t::meshx_provision_complete_evt_param node_prov_complete