Re: ESP BLE Mesh v0.6 Released, SIG Certified
Posted: Sat May 18, 2019 5:18 pm
Hi again!EddLeon wrote: ↑Fri May 17, 2019 3:10 pmThanks so much for the info, I had seen already the provisioner's apis in your provisioner examples. I'll definitely take a look into the bt_mesh_device_auto_enter_network and bt_mesh_provisioner_store_node_info.ESP_Island wrote: ↑Wed May 15, 2019 3:05 amEddLeon wrote: ↑Mon May 13, 2019 3:20 pmHi Espressif,
I am currently trying to build a testing network with the ESP32 chips. I plan to have a bunch of nodes and configure them in such a way I can test out the Mesh flooding mechanism.
At this moment, I want to self-provision and self-configure nodes so I can deploy the mesh faster and make quick reconfigurations. The problem is that the API does not provide access to the functions to do so. (bt_mesh_cfg_app_key_add and bt_mesh_cfg_mod_app_bind; self-provision seems to work fine). I've been trying different ways but they all end up in kernel panics.
Would anyone be so kind to help me out here?
For BLE Mesh unprovisioned devices entering network automatically, we have developed two test APIs (one for node, the other for provisioner). They are not released and currently used for the internal test, but you can test it if you need.
Following are the introductions about those two test APIs:
1. For Node
int ble_mesh_device_auto_enter_network(struct bt_mesh_device_network_info *info), the parameter includes the following info:
* Network key, Network key Index, flags, iv_index and unicast address (which can be assigned during provisioning)
* Device key
* Application Key and Application Key Index
* Group address
2. For Provisioner
int bt_mesh_provisioner_store_node_info(struct bt_mesh_node_t *node_info), the parameter includes the following info:
* node's name (max length 31 octets)
* Device UUID and oob_info
* unicast address, element number
* Network key Index, flags, iv_index
* Device key
1. Currently these two APIs are just for test.
2. Before Provisioner invokes the API bt_mesh_provisioner_store_node_info() to add node information, the followings need to done previously.
* Call esp_ble_mesh_provisioner_add_local_net_key() to add local Network Key (which is used by bt_mesh_provisioner_store_node_info())
* Call esp_ble_mesh_provisioner_add_local_app_key() to add local Application Key (which is used by bt_mesh_provisioner_store_node_info())
* Call esp_ble_mesh_provisioner_bind_app_key_to_local_model() to bind AppKey with Provisioner's models
3. The source files which contain these APIs.
* bt_mesh_device_auto_enter_network() -> components/bt/ble_mesh/mesh_core/test.c
* bt_mesh_provisioner_store_node_info() -> components/bt/ble_mesh/mesh_core/provisioner_main.c
* esp_ble_mesh_provisioner_add_local_net_key() -> component/bt/ble_mesh/api/core/esp_ble_mesh_networking_api.c
* esp_ble_mesh_provisioner_add_local_app_key() -> component/bt/ble_mesh/api/core/esp_ble_mesh_networking_api.c
* esp_ble_mesh_provisioner_bind_app_key_to_local_model() -> component/bt/ble_mesh/api/core/esp_ble_mesh_networking_api.c
Once again, thanks!
How about self-binding app keys to models by nodes? With hard-coded keys of course without enabling provisioning regular nodes?