Unprovison node BLE mesh

jokockx
Posts: 14
Joined: Wed Jul 03, 2019 9:12 am

Unprovison node BLE mesh

Postby jokockx » Wed Jul 31, 2019 3:34 pm

Hello
I'm currently trying to make my provisioner unprovision a node that I achieved to provision earlier. I think this needs to be done through the configuration model but I'm unable to find the right function in the api/parameters to do so. I'm currently trying to do it using the following code but it doesn't work:

Code: Select all

int err;
esp_ble_mesh_client_common_param_t common = {0};
esp_ble_mesh_cfg_client_set_state_t set_state = {0};
esp_ble_mesh_set_msg_common(&common, node, config_client.model, ESP_BLE_MESH_MODEL_OP_NODE_RESET);
set_state.net_key_delete.net_idx = node->node_idx;
ESP_LOGI(TAGPROV, "Reseting node...");
err = esp_ble_mesh_config_client_set_state(&common, &set_state);
if (err) {
	ESP_LOGE(TAGPROV, "%s: failed", __func__);
	return;
}

jokockx
Posts: 14
Joined: Wed Jul 03, 2019 9:12 am

Re: Unprovison node BLE mesh

Postby jokockx » Thu Aug 01, 2019 8:54 am

Basically, I'm unable to find the right set_state variable because an appropriate member of the union esp_ble_mesh_cfg_client_set_state_t in "/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h" seems to be missing.
Could someone help me out? I'm really stuck here and it is pretty urgent.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 127 guests