I am using the wifi_provisioning example provided by espressif for my application. I am planning to use some ble/nimble functionalities while the wifi provisioning service is active and waiting for a connection. I have used the additional endpoint functionality the example provides:
- wifi_prov_mgr_init(config);
- wifi_prov_mgr_endpoint_create("custom-endpoint");
- wifi_prov_mgr_start_provisioning(security, pop, service_name, service_key);
- wifi_prov_mgr_endpoint_register("custom-endpoint", custom_ep_handler, custom_ep_data);
- esp_err_t echo_req_handler (uint32_t session_id,
- const uint8_t *inbuf, ssize_t inlen,
- uint8_t **outbuf, ssize_t *outlen,
- void *priv_data)
- {
- if(*inbuf = certain_byte){
- wifi_prov_mgr_deinit();
- start_other_nimble_application();
- }
- return ESP_OK;
- }