ble mesh provisioner sample

jiangch6
Posts: 5
Joined: Tue Nov 12, 2019 10:28 am

ble mesh provisioner sample

Postby jiangch6 » Mon Nov 18, 2019 3:52 am

Hi,

I'm developing a ble mesh gateway using esp32, based on example ble_mesh_provisioner.I can now
provision a ble mesh light, bought from market, and control its onoff. After that, I have some problems:

1, How to communite with node again after the provisioner is rebooted? I tried to save theprovisioned
node information, including dev uuid and unicast, to flash, and then poweroff, then power on again. But
when I use the unicast to send onoff message, it failed. What other steps Ineed to do after rebooting?

2. How to control the level? I have followded everything on onoff_client to add a level_client,but it
failed to send level message to the light with return code ESP_ERR_INVALID_ARG. there is the code snip:

Code: Select all

static esp_ble_mesh_client_t level_client;
..............................
static esp_ble_mesh_model_t root_models[] = {
    ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
    ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
    ESP_BLE_MESH_MODEL_GEN_ONOFF_CLI(NULL, &onoff_client),
    ESP_BLE_MESH_MODEL_GEN_LEVEL_CLI(NULL, &level_client),
};
..............................
            set_state.model_app_bind.element_addr = node->unicast;
            set_state.model_app_bind.model_app_idx = prov_key.app_idx;
            set_state.model_app_bind.model_id = BLE_MESH_MODEL_ID_GEN_LEVEL_SRV;
            set_state.model_app_bind.company_id = CID_NVAL;
            err = esp_ble_mesh_config_client_set_state(&common, &set_state);
..............................
        err = esp_ble_mesh_set_msg_common(&common, node, level_client.model, ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_SET);
        set_state.level_set.op_en = false;
        set_state.level_set.level = atoi(argv[2]);
        set_state.level_set.tid = (g_tid += 1);
        err = esp_ble_mesh_generic_client_set_state(&common, &set_state);
        if (err) {
            ESP_LOGE(TAG, "%s: Generic Level Set failed: %d", __func__, err);
            return;
        }
Could you provide a sample about the two questions?

BRs,

jiangch6
Posts: 5
Joined: Tue Nov 12, 2019 10:28 am

Re: ble mesh provisioner sample

Postby jiangch6 » Mon Nov 18, 2019 9:25 am

The 2nd problem is fixed now, by setting project config menu: CONFIG_BLE_MESH_GENERIC_LEVEL_CLI=y

For the 1st problem, I find a config item: CONFIG_BLE_MESH_SETTING, but it says that it currently only
supports storing BLE Mesh node configuration. Any plan for provisioner configuration?

BRs,

Wangcheng
Posts: 73
Joined: Wed Mar 06, 2019 3:26 am

Re: ble mesh provisioner sample

Postby Wangcheng » Mon Nov 25, 2019 12:38 pm

jiangch6 wrote:
Mon Nov 18, 2019 9:25 am
The 2nd problem is fixed now, by setting project config menu: CONFIG_BLE_MESH_GENERIC_LEVEL_CLI=y

For the 1st problem, I find a config item: CONFIG_BLE_MESH_SETTING, but it says that it currently only
supports storing BLE Mesh node configuration. Any plan for provisioner configuration?

BRs,
Hi ,
1. The provisioner configuration store has been developed and will be available soon.
2. What kind of lamp do you buy? Can you provide a link? We need to test the compatibility.

mm_1993
Posts: 65
Joined: Sat Aug 28, 2021 5:16 am

Re: ble mesh provisioner sample

Postby mm_1993 » Mon Jan 03, 2022 1:04 pm

jiangch6 wrote:
Mon Nov 18, 2019 3:52 am
Hi,
I'm developing a ble mesh gateway using esp32, based on example ble_mesh_provisioner.I can now
provision a ble mesh light, bought from market, and control its onoff. After that, I have some problems:
........
Hi jiangch6
did you solve this? I want to make a esp32 ble mesh gateway for my test project so i have two question:

1- my gateway should be in Which mode ? for example in ble_mesh_fast_provision -- fast_prov_server or
fast_prov_client

2- how can connect two mobile devices to gateway ?

it's really important for me! I did a lot of searching but it didn't work and I'm really tired.

thank you

ghoshaljayant
Posts: 2
Joined: Tue Nov 21, 2023 12:01 pm

Re: ble mesh provisioner sample

Postby ghoshaljayant » Thu Nov 23, 2023 1:58 am

Hi jiangch6,

If you have achieved esp32 ble mesh provisioner, to provision different nodes with different model, Could you please tell how do you identify the model_id ?

Who is online

Users browsing this forum: No registered users and 158 guests