MeshX 0.3
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
Loading...
Searching...
No Matches
esp_prov_srv_model.c
Go to the documentation of this file.
1
13
15
22
32 const MESHX_PROV_CB_PARAM *param)
33{
34 MESHX_LOGD(MODULE_ID_MODEL_SERVER, "Event 0x%02x", event);
35
36 meshx_prov_srv_param_t prov_srv_param;
37
38 memcpy(&prov_srv_param.param, param, sizeof(meshx_prov_cb_param_t));
39 prov_srv_param.prov_evt = event;
40
42 {
43 MESHX_LOGE(MODULE_ID_MODEL_SERVER, "Failed to notify model event");
44 }
45}
46
60{
61 if (!uuid)
62 {
63 MESHX_LOGE(MODULE_ID_MODEL_SERVER, "Invalid server configuration");
64 return MESHX_INVALID_ARG;
65 }
66 g_meshx_prov.uuid = uuid;
67
68 return esp_ble_mesh_register_prov_callback((esp_ble_mesh_prov_cb_t)meshx_provisioning_cb);
69}
70
meshx_err_t meshx_plat_init_prov(const uint8_t *uuid)
Initialize provisioning parameters.
static void meshx_provisioning_cb(MESHX_PROV_CB_EVT event, const MESHX_PROV_CB_PARAM *param)
Callback function for BLE Mesh provisioning events.
meshx_ptr_t meshx_plat_get_prov(void)
Get the provisioning parameters.
static MESHX_PROV g_meshx_prov
Global provisioning structure.
void * meshx_ptr_t
This header file defines the provisioning server interface for the MeshX BLE Mesh stack....
struct meshx_ble_mesh_prov_srv_param meshx_prov_srv_param_t
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
@ MESHX_SUCCESS
Definition meshx_err.h:40
@ MESHX_INVALID_ARG
Definition meshx_err.h:42
#define MESHX_LOGE(module_id, format,...)
Definition meshx_log.h:73
#define MESHX_LOGD(module_id, format,...)
Definition meshx_log.h:113
#define MESHX_PROV
#define MESHX_PROV_CB_PARAM
#define MESHX_PROV_CB_EVT
meshx_err_t meshx_prov_srv_notify_plat_event(meshx_prov_srv_param_t *param)
Notify the model event to the application.
@ MODULE_ID_MODEL_SERVER
Definition module_id.h:30
BLE Mesh Node/Provisioner callback parameters union.