Page 1 of 1

Provisioning Manager

Posted: Mon Nov 29, 2021 4:11 pm
by Pladi_86
Hi,

The provisioning service using WIFI SoftAP worked well for me.

Can someone please point me on how to add provisioning data to this service. I need to include more than just WIFI PASS and SSID.

Can someone point me to the right direction on where to do this change.

Not quite clear.

Thank You

Re: Provisioning Manager

Posted: Tue Nov 30, 2021 6:11 am
by ESP_YJM
You can add custom endpoint with wifi_prov_mgr_endpoint_register. The more details please refer to https://github.com/espressif/esp-idf/bl ... #L300-L308

Re: Provisioning Manager

Posted: Wed Dec 01, 2021 9:40 am
by karunt
Is there also a way for provisioning manager to give provisioning status updates to mobile device app? Would it need to write to a GATT characteristic to do so? Appreciate some direction - really lost with this part.

Re: Provisioning Manager

Posted: Fri Dec 03, 2021 7:03 am
by ESP_laukik-hase
Hello,

The following function ​is responsible for adding the GATT characteristic.

Code: Select all

ble_gatt_add_characteristics(struct ble_gatt_chr_def *characteristics, int idx)

This function uses the function -

Code: Select all

​gatt_svr_chr_access(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg)​
​ as a callback to read from/write to the connected BLE device.

You can check these functions (they belong to the protocomm component) out here if they help you -
- https://github.com/espressif/esp-idf/bl ... ble.c#L628
- https://github.com/espressif/esp-idf/bl ... ble.c#L292

Thanks,
Laukik

Re: Provisioning Manager

Posted: Sat Dec 11, 2021 4:51 pm
by karunt
That's very helpful. But what I'm struggling with is how does wifi provisioning manager communicate with an external device to let a user know that the provisioning was successful or it failed. Does wifi provisioning manager not write anything to a GATT characteristic that can be picked up by an external device? Do I need to create that functionality separately? Any help with that would be apprecaited.

Re: Provisioning Manager

Posted: Wed Jan 12, 2022 5:15 am
by karunt
Can someone please guide me on which function ESP32 wifi_provisioning example uses to update a characteristic when a client writes wifi credentials to the ESP32 device via BLE? I'm at a loss after tons of hours of research. Thanks.