esp_ble_mesh_provisioner_set_primary_elem_addr() function
This function is called by Provisioner to set own Primary element address.
Syntax
esp_err_t esp_ble_mesh_provisioner_set_primary_elem_addr(uint16_t addr); Arguments
addr
Unicast address of the Primary element of Provisioner.
Return value
ESP_OK on success or error code otherwise.
Notes
This API must be invoked when BLE Mesh initialization is completed successfully, and can be invoked before Provisioner functionality is enabled. Once this API is invoked successfully, the prov_unicast_addr value in the struct esp_ble_mesh_prov_t will be ignored, and Provisioner will use this address as its own primary element address. And if the unicast address going to assigned for the next unprovisioned device is smaller than the input address + element number of Provisioner, then the address for the next unprovisioned device will be recalculated internally.