diff --git a/examples/protocols/esp_local_ctrl/main/Kconfig.projbuild b/examples/protocols/esp_local_ctrl/main/Kconfig.projbuild index 661ac8fa7b..f1301ec9f7 100644 --- a/examples/protocols/esp_local_ctrl/main/Kconfig.projbuild +++ b/examples/protocols/esp_local_ctrl/main/Kconfig.projbuild @@ -2,19 +2,19 @@ menu "Example Configuration" choice EXAMPLE_LOCAL_CTRL_TRANSPORT bool "Local Control Transport" - default EXAMPLE_LOCAL_CTRL_TRANSPORT_BLE if !SOC_WIFI_SUPPORTED - default EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP + default EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP + default EXAMPLE_LOCAL_CTRL_TRANSPORT_BLE if SOC_BT_SUPPORTED help - Local Control component offers both, SoftAP and BLE transports. Choose any one. + Local Control component offers both, HTTP/S and BLE transports. Choose any one. - config EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP - bool "Soft AP" + config EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP + bool "HTTP/S" select LWIP_IPV4 - depends on SOC_WIFI_SUPPORTED config EXAMPLE_LOCAL_CTRL_TRANSPORT_BLE bool "BLE" select BT_ENABLED + depends on SOC_BT_SUPPORTED endchoice choice EXAMPLE_PROTOCOMM_SECURITY_VERSION diff --git a/examples/protocols/esp_local_ctrl/main/app_main.c b/examples/protocols/esp_local_ctrl/main/app_main.c index ee2a2ff224..83d52c1a9d 100644 --- a/examples/protocols/esp_local_ctrl/main/app_main.c +++ b/examples/protocols/esp_local_ctrl/main/app_main.c @@ -39,7 +39,7 @@ void app_main(void) } ESP_ERROR_CHECK(ret); -#ifdef CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP +#ifdef CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP ESP_ERROR_CHECK(esp_netif_init()); ESP_ERROR_CHECK(esp_event_loop_create_default()); @@ -47,7 +47,7 @@ void app_main(void) ESP_LOGI(TAG, "Connection failed, not starting esp_local_ctrl service"); vTaskDelay(portMAX_DELAY); } -#endif /* CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP */ +#endif /* CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP */ start_esp_local_ctrl_service(); ESP_LOGI(TAG, "esp_local_ctrl service started"); diff --git a/examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c b/examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c index 595952d06a..f0ff5b9d27 100644 --- a/examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c +++ b/examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c @@ -225,7 +225,7 @@ static void free_str(void *arg) /* Function used by app_main to start the esp_local_ctrl service */ void start_esp_local_ctrl_service(void) { -#ifdef CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP +#ifdef CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP #ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE /* Set the configuration */ httpd_ssl_config_t https_conf = HTTPD_SSL_CONFIG_DEFAULT(); @@ -262,7 +262,7 @@ void start_esp_local_ctrl_service(void) 0xb4, 0x42, 0xeb, 0x31, 0x4a, 0x1e, 0x98, 0x3d, } }; -#endif /* CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP */ +#endif /* CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP */ #ifdef CONFIG_EXAMPLE_PROTOCOMM_SECURITY_VERSION_1 /* What is the security level that we want (0, 1, 2): @@ -306,7 +306,7 @@ void start_esp_local_ctrl_service(void) #endif esp_local_ctrl_config_t config = { -#ifdef CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP +#ifdef CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP .transport = ESP_LOCAL_CTRL_TRANSPORT_HTTPD, .transport_config = { #ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE @@ -320,7 +320,7 @@ void start_esp_local_ctrl_service(void) .transport_config = { .ble = ble_conf, }, -#endif /* CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP */ +#endif /* CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP */ .proto_sec = { .version = security, .custom_handle = NULL, @@ -337,7 +337,7 @@ void start_esp_local_ctrl_service(void) .max_properties = 10 }; -#ifdef CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_SOFTAP +#ifdef CONFIG_EXAMPLE_LOCAL_CTRL_TRANSPORT_HTTP mdns_init(); mdns_hostname_set(SERVICE_NAME); #endif diff --git a/examples/protocols/esp_local_ctrl/sdkconfig.defaults.esp32p4 b/examples/protocols/esp_local_ctrl/sdkconfig.defaults.esp32p4 new file mode 100644 index 0000000000..4b3a4ff2b9 --- /dev/null +++ b/examples/protocols/esp_local_ctrl/sdkconfig.defaults.esp32p4 @@ -0,0 +1,2 @@ +CONFIG_MDNS_PREDEF_NETIF_STA=n +CONFIG_MDNS_PREDEF_NETIF_AP=n