diff --git a/components/nabto_device/Kconfig b/components/nabto_device/Kconfig index 366ce9b..bdae8c6 100644 --- a/components/nabto_device/Kconfig +++ b/components/nabto_device/Kconfig @@ -19,7 +19,7 @@ menu "Nabto Edge" "Set the stack size for the thread which runs all the core operations." config NABTO_DEVICE_NETWORK_THREAD_STACK_SIZE int "Nabto Network Thread Stack Size" - default 2048 + default 3072 depends on ENABLE_NABTO_DEVICE help "Set the stack size for the thread which runs the network." diff --git a/components/nabto_device/src/nm_select_unix.c b/components/nabto_device/src/nm_select_unix.c index bd663ab..9ab1e57 100644 --- a/components/nabto_device/src/nm_select_unix.c +++ b/components/nabto_device/src/nm_select_unix.c @@ -61,7 +61,7 @@ void nm_select_unix_run(struct nm_select_unix* ctx) { esp_pthread_cfg_t pthreadConfig = esp_pthread_get_default_config(); pthreadConfig.stack_size = NETWORK_THREAD_STACK_SIZE; - pthreadConfig.thread_name = "Network"; + pthreadConfig.thread_name = "Nabto Network"; pthreadConfig.prio = 15; //pthreadConfig.pin_to_core = 1; diff --git a/examples/tcptunnel/main/tcptunnel_esp32.c b/examples/tcptunnel/main/tcptunnel_esp32.c index 9100403..e526c87 100644 --- a/examples/tcptunnel/main/tcptunnel_esp32.c +++ b/examples/tcptunnel/main/tcptunnel_esp32.c @@ -92,14 +92,15 @@ void app_main(void) nabto_esp32_iam_init(&iam, dev, iamConfig, defaultIamState, nvsHandle); - //httpd_handle_t webserver = + // Either the webserver or the perf server can be enabled but not both at the same time, the reason is currently not known. + start_webserver(&logger); - // On the ESP32 without extra ram the perf server cannot coexists with the webserver. - xTaskCreate(&perf_task, "perf_task", 4096, NULL, 5, NULL); + CHECK_NABTO_ERR(nabto_device_add_tcp_tunnel_service(dev, "http", "http", "127.0.0.1", 80)); + // On the ESP32 without extra ram the perf server cannot coexists with the webserver. + //xTaskCreate(&perf_task, "perf_task", 4096, NULL, 5, NULL); + //CHECK_NABTO_ERR(nabto_device_add_tcp_tunnel_service(dev, "perf", "perf", "127.0.0.1", 9000)); - CHECK_NABTO_ERR(nabto_device_add_tcp_tunnel_service(dev, "http", "http", "127.0.0.1", 80)); - CHECK_NABTO_ERR(nabto_device_add_tcp_tunnel_service(dev, "perf", "perf", "127.0.0.1", 9000)); CHECK_NABTO_ERR(nabto_device_limit_connections(dev, 2)); CHECK_NABTO_ERR(nabto_device_limit_stream_segments(dev, 80));