diff --git a/components/wifi_provisioning/CMakeLists.txt b/components/wifi_provisioning/CMakeLists.txt index 58000d1d02..bb47508c69 100644 --- a/components/wifi_provisioning/CMakeLists.txt +++ b/components/wifi_provisioning/CMakeLists.txt @@ -1,8 +1,3 @@ -idf_build_get_property(target IDF_TARGET) -if(${target} STREQUAL "esp32c3") - return() -endif() - set(srcs "src/wifi_config.c" "src/wifi_scan.c" "src/manager.c" diff --git a/components/wifi_provisioning/src/manager.c b/components/wifi_provisioning/src/manager.c index 0c0b1c1917..473bb5f82c 100644 --- a/components/wifi_provisioning/src/manager.c +++ b/components/wifi_provisioning/src/manager.c @@ -268,7 +268,7 @@ static cJSON* wifi_prov_get_info_json(void) /* Declare the internal event handler */ static void wifi_prov_mgr_event_handler_internal(void* arg, esp_event_base_t event_base, - int event_id, void* event_data); + int32_t event_id, void* event_data); static esp_err_t wifi_prov_mgr_start_service(const char *service_name, const char *service_key) { @@ -801,7 +801,7 @@ esp_err_t wifi_prov_mgr_event_handler(void *ctx, system_event_t *event) } static void wifi_prov_mgr_event_handler_internal( - void* arg, esp_event_base_t event_base, int event_id, void* event_data) + void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) { if (!prov_ctx_lock) { ESP_LOGE(TAG, "Provisioning manager not initialized"); diff --git a/examples/provisioning/legacy/ble_prov/main/app_main.c b/examples/provisioning/legacy/ble_prov/main/app_main.c index e4ad35dec9..d9543a6f4b 100644 --- a/examples/provisioning/legacy/ble_prov/main/app_main.c +++ b/examples/provisioning/legacy/ble_prov/main/app_main.c @@ -28,7 +28,7 @@ static const char *TAG = "app"; static void start_ble_provisioning(void); static void event_handler(void* arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { static int s_retry_num_ap_not_found = 0; static int s_retry_num_ap_auth_fail = 0; diff --git a/examples/provisioning/legacy/ble_prov/main/app_prov.c b/examples/provisioning/legacy/ble_prov/main/app_prov.c index 7ce62346fa..ca12268d43 100644 --- a/examples/provisioning/legacy/ble_prov/main/app_prov.c +++ b/examples/provisioning/legacy/ble_prov/main/app_prov.c @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef CONFIG_BT_NIMBLE_ENABLED #include "esp_nimble_hci.h" @@ -35,7 +36,7 @@ static const char *TAG = "app_prov"; static const char *ssid_prefix = "PROV_"; /* Handler for catching WiFi events */ -static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int id, void* data); +static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int32_t id, void* data); /* Handlers for wifi_config provisioning endpoint */ extern wifi_prov_config_handlers_t wifi_prov_handlers; @@ -198,7 +199,7 @@ static void _stop_prov_cb(void * arg) /* Event handler for starting/stopping provisioning */ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { /* If pointer to provisioning application data is NULL * then provisioning is not running */ diff --git a/examples/provisioning/legacy/console_prov/main/app_main.c b/examples/provisioning/legacy/console_prov/main/app_main.c index 25806de8a3..55155f36a5 100644 --- a/examples/provisioning/legacy/console_prov/main/app_main.c +++ b/examples/provisioning/legacy/console_prov/main/app_main.c @@ -26,7 +26,7 @@ static const char *TAG = "app"; static void event_handler(void* arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { static int s_retry_num = 0; diff --git a/examples/provisioning/legacy/console_prov/main/app_prov.c b/examples/provisioning/legacy/console_prov/main/app_prov.c index c02e482803..6640467478 100644 --- a/examples/provisioning/legacy/console_prov/main/app_prov.c +++ b/examples/provisioning/legacy/console_prov/main/app_prov.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -26,7 +27,7 @@ static const char *TAG = "app_prov"; /* Handler for catching WiFi events */ -static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int id, void* data); +static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int32_t id, void* data); /* Handlers for wifi_config provisioning endpoint */ extern wifi_prov_config_handlers_t wifi_prov_handlers; @@ -136,7 +137,7 @@ static void _stop_prov_cb(void * arg) /* Event handler for starting/stopping provisioning */ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { /* If pointer to provisioning application data is NULL * then provisioning is not running */ diff --git a/examples/provisioning/legacy/custom_config/main/app_main.c b/examples/provisioning/legacy/custom_config/main/app_main.c index 773789a3b6..f0f053daa4 100644 --- a/examples/provisioning/legacy/custom_config/main/app_main.c +++ b/examples/provisioning/legacy/custom_config/main/app_main.c @@ -26,7 +26,7 @@ static const char *TAG = "app"; static void event_handler(void* arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { static int s_retry_num = 0; diff --git a/examples/provisioning/legacy/custom_config/main/app_prov.c b/examples/provisioning/legacy/custom_config/main/app_prov.c index 16e893a999..f514a9c0e7 100644 --- a/examples/provisioning/legacy/custom_config/main/app_prov.c +++ b/examples/provisioning/legacy/custom_config/main/app_prov.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -27,7 +28,7 @@ static const char *TAG = "app_prov"; /* Handler for catching WiFi events */ -static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int id, void* data); +static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int32_t id, void* data); /* Handlers for provisioning endpoints */ extern wifi_prov_config_handlers_t wifi_prov_handlers; @@ -152,7 +153,7 @@ static void _stop_prov_cb(void * arg) /* Event handler for starting/stopping provisioning */ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { /* If pointer to provisioning application data is NULL * then provisioning is not running */ diff --git a/examples/provisioning/legacy/softap_prov/main/app_main.c b/examples/provisioning/legacy/softap_prov/main/app_main.c index 6f6730087b..21aea40020 100644 --- a/examples/provisioning/legacy/softap_prov/main/app_main.c +++ b/examples/provisioning/legacy/softap_prov/main/app_main.c @@ -26,7 +26,7 @@ static const char *TAG = "app"; static void event_handler(void* arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { static int s_retry_num = 0; diff --git a/examples/provisioning/legacy/softap_prov/main/app_prov.c b/examples/provisioning/legacy/softap_prov/main/app_prov.c index 11e7988540..1637ea0927 100644 --- a/examples/provisioning/legacy/softap_prov/main/app_prov.c +++ b/examples/provisioning/legacy/softap_prov/main/app_prov.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -26,7 +27,7 @@ static const char *TAG = "app_prov"; /* Handler for catching WiFi events */ -static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int id, void* data); +static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int32_t id, void* data); /* Handlers for wifi_config provisioning endpoint */ extern wifi_prov_config_handlers_t wifi_prov_handlers; @@ -138,7 +139,7 @@ static void _stop_prov_cb(void * arg) /* Event handler for starting/stopping provisioning */ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { /* If pointer to provisioning application data is NULL * then provisioning is not running */ diff --git a/examples/provisioning/wifi_prov_mgr/main/Kconfig.projbuild b/examples/provisioning/wifi_prov_mgr/main/Kconfig.projbuild index 3cd03d66b4..d559d80f64 100644 --- a/examples/provisioning/wifi_prov_mgr/main/Kconfig.projbuild +++ b/examples/provisioning/wifi_prov_mgr/main/Kconfig.projbuild @@ -2,6 +2,7 @@ menu "Example Configuration" choice EXAMPLE_PROV_TRANSPORT bool "Provisioning Transport" + default EXAMPLE_PROV_TRANSPORT_SOFTAP if IDF_TARGET_ESP32S2 default EXAMPLE_PROV_TRANSPORT_BLE help Wi-Fi provisioning component offers both, SoftAP and BLE transports. Choose any one. @@ -9,7 +10,6 @@ menu "Example Configuration" config EXAMPLE_PROV_TRANSPORT_BLE bool "BLE" select BT_ENABLED - depends on IDF_TARGET_ESP32 config EXAMPLE_PROV_TRANSPORT_SOFTAP bool "Soft AP" endchoice diff --git a/examples/provisioning/wifi_prov_mgr/main/app_main.c b/examples/provisioning/wifi_prov_mgr/main/app_main.c index e446a5d629..4180731b39 100644 --- a/examples/provisioning/wifi_prov_mgr/main/app_main.c +++ b/examples/provisioning/wifi_prov_mgr/main/app_main.c @@ -37,7 +37,7 @@ static EventGroupHandle_t wifi_event_group; /* Event handler for catching system events */ static void event_handler(void* arg, esp_event_base_t event_base, - int event_id, void* event_data) + int32_t event_id, void* event_data) { if (event_base == WIFI_PROV_EVENT) { switch (event_id) { diff --git a/examples/provisioning/wifi_prov_mgr/partitions.csv b/examples/provisioning/wifi_prov_mgr/partitions.csv index d01414b8a9..711637a2ac 100644 --- a/examples/provisioning/wifi_prov_mgr/partitions.csv +++ b/examples/provisioning/wifi_prov_mgr/partitions.csv @@ -2,4 +2,4 @@ # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap nvs, data, nvs, 0x9000, 0x6000, phy_init, data, phy, 0xf000, 0x1000, -factory, app, factory, 0x10000, 1200000, +factory, app, factory, 0x10000, 1300000,