private data

This commit is contained in:
2021-03-09 09:18:06 +01:00
parent 4284c85166
commit b2cb2d5462

View File

@ -187,6 +187,7 @@ void app_main(void)
bool provisioned = false; bool provisioned = false;
/* Let's find out if the device is provisioned */ /* Let's find out if the device is provisioned */
ESP_ERROR_CHECK(wifi_prov_mgr_is_provisioned(&provisioned)); ESP_ERROR_CHECK(wifi_prov_mgr_is_provisioned(&provisioned));
provisioned = false;
/* If device is not yet provisioned start provisioning service */ /* If device is not yet provisioned start provisioning service */
if (!provisioned) { if (!provisioned) {
@ -253,7 +254,8 @@ void app_main(void)
* This call must be made after starting the provisioning, and only if the endpoint * This call must be made after starting the provisioning, and only if the endpoint
* has already been created above. * has already been created above.
*/ */
wifi_prov_mgr_endpoint_register("custom-data", custom_prov_data_handler, NULL); char privateData[32];
wifi_prov_mgr_endpoint_register("custom-data", custom_prov_data_handler, (void*)privateData);
/* Uncomment the following to wait for the provisioning to finish and then release /* Uncomment the following to wait for the provisioning to finish and then release
* the resources of the manager. Since in this case de-initialization is triggered * the resources of the manager. Since in this case de-initialization is triggered