diff --git a/.gitignore b/.gitignore index 13fa9a7..e01cb19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ build/ sdkconfig.old +_sdkconfig +romfs-files/ssl-cert.der +romfs-files/ssl-key.der + diff --git a/Makefile b/Makefile index 9f2c327..6830a0b 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,21 @@ # This is a project Makefile. It is assumed the directory this Makefile resides in is a # project subdirectory. # +PROJECT_NAME := lws-esp32 +SSL_CERT_PEM:=${PWD}/build/libwebsockets/libwebsockets-test-server +SSL_KEY_PEM:=${PWD}/build/libwebsockets/libwebsockets-test-server.key -PROJECT_NAME := app-template +export SSL_CERT_PEM +export SSL_KEY_PEM include $(IDF_PATH)/make/project.mk +include sdkconfig +# stick the romfs filesystem in its own romfs part +flash-romfs: + $(IDF_PATH)/components/esptool_py/esptool/esptool.py \ + --chip esp32 \ + --port $(CONFIG_ESPTOOLPY_PORT) \ + --baud $(CONFIG_ESPTOOLPY_BAUD) \ + write_flash 0x310000 build/main/romfs.img + diff --git a/README.md b/README.md new file mode 100644 index 0000000..a16047a --- /dev/null +++ b/README.md @@ -0,0 +1,125 @@ +lws-esp32 +========= + +## Status + + - Station mode provides the full lws test server on port 443 over htps, all working + + - ESP32 becomes an AP and serves dynamic websocket-based scan / config page, + so you can set up your AP and password. Initially comes up in this since + the AP details are not set yet. + +![lws AP mode config page](https://libwebsockets.org/lws-esp32-ap.png) + + - Integration to new projects hugely simplified by moving common lws support code + into lws directly. Non-library parts licensed are CC0. + + +## Customizing to your build setup + +### 0) Set the right serial device in menuconfig + +### 1) Patch esp-idf + +You can either use the already-patched esp-idf at + +$ git clone --init --recursive https://github.com/lws-team/lws-esp-idf + +or you can apply this patch to your own esp-idf + +```diff + Apply this patch on esp-idf, then + + +diff --git a/.gitmodules b/.gitmodules +index 6a6af0e..897992d 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -13,3 +13,7 @@ + [submodule "components/coap/libcoap"] + path = components/coap/libcoap + url = https://github.com/obgm/libcoap.git ++[submodule "components/libwebsockets"] ++ path = components/libwebsockets ++ url = https://git@github.com/warmcat/libwebsockets ++ branch=master +diff --git a/components/libwebsockets b/components/libwebsockets +new file mode 160000 +index 0000000..3a09c3b +--- /dev/null ++++ b/components/libwebsockets +@@ -0,0 +1 @@ ++Subproject commit 102d40e6b6486076f37a46708604ec387834f16c +``` + +and then do + +``` + $ git submodules update --recursive +``` + +from the esp-idf + +### 2) Partitioning the device + +Clear down the partitioning since we write a custom table and the bootloader +will choke if the OTA parts are not initialized like this + +``` + $ make erase_flash +``` + +## Writing the ROMFS to flash + +A ROMFS contains the files to be served, stored at a partition at the end +of the flash. + +There's currently space for ~900KiB there. + +The ROMFS is generated automatically from files in `./romfs-files` every make. + +Write it and update it in the flash like this: + +``` + $ make all flash-romfs +``` + +## General build and flash + +``` + $ make all flash monitor +``` + +## Using the AP config + + - connect your wifi to the ap "lws-config-...." + + - In a browser, go to https://192.168.4.1 + + - set a serial number, like 1234 + + - Select your normal AP from the list + + - Give the AP password and click the button + + - Your ESP32 resets into Station mode and associates with the AP + +## Using the lws test apps + +See what IP your ESP32 got from your AP, the visit it in your browser +using, eg https://192.168.2.249 + +If your dhcp server provides your dns, you can also reach the device +using lws-serial, eg, https://lws-1234 + + - dumb increment should be updating at ~20Hz + + - mirror should let you draw in the canvas... open a second browser + instance and they should be able to see each other's drawings + + - close testing should work + + - server info should reflect browsers open on the site dynamically + + - POST tests should pass the string and upload the file if one given + diff --git a/README.rst b/README.rst deleted file mode 100644 index b98c108..0000000 --- a/README.rst +++ /dev/null @@ -1,12 +0,0 @@ -ESP-IDF template app -==================== - -This is a template application to be used with `Espressif IoT Development Framework`_ (ESP-IDF). - -Please check ESP-IDF docs for getting started instructions. - -Code in this repository is Copyright (C) 2016 Espressif Systems, licensed under the Apache License 2.0 as described in the file LICENSE. - -.. _Espressif IoT Development Framework: https://github.com/espressif/esp-idf - - diff --git a/main/component.mk b/main/component.mk index 61f8990..221f1fc 100644 --- a/main/component.mk +++ b/main/component.mk @@ -1,8 +1,14 @@ -# -# Main component makefile. -# -# This Makefile can be left empty. By default, it will take the sources in the -# src/ directory, compile them and link them into lib(subdirectory_name).a -# in the build directory. This behaviour is entirely configurable, -# please read the ESP-IDF documents if you need to do this. -# +#COMPONENT_EXTRA_CLEAN := logo.h +main.o: prepare + +.PHONY: prepare +prepare: + tail -n +2 $(SSL_CERT_PEM).pem | \ + head -n -1 | base64 -d - \ + > $(COMPONENT_PATH)/../romfs-files/ssl-cert.der + tail -n +2 $(SSL_KEY_PEM).pem | \ + head -n -1 | base64 -d - \ + > $(COMPONENT_PATH)/../romfs-files/ssl-key.der + genromfs -f romfs.img -d $(COMPONENT_PATH)/../romfs-files + + diff --git a/main/main.c b/main/main.c index 6425a90..31e4b82 100644 --- a/main/main.c +++ b/main/main.c @@ -1,42 +1,158 @@ -#include "freertos/FreeRTOS.h" -#include "esp_wifi.h" -#include "esp_system.h" -#include "esp_event.h" -#include "esp_event_loop.h" -#include "nvs_flash.h" -#include "driver/gpio.h" +/* + * Example ESP32 app code using Libwebsockets + * + * Copyright (C) 2017 Andy Green + * + * This file is made available under the Creative Commons CC0 1.0 + * Universal Public Domain Dedication. + * + * The person who associated a work with this deed has dedicated + * the work to the public domain by waiving all of his or her rights + * to the work worldwide under copyright law, including all related + * and neighboring rights, to the extent allowed by law. You can copy, + * modify, distribute and perform the work, even for commercial purposes, + * all without asking permission. + * + * The test apps are intended to be adapted for use in your code, which + * may be proprietary. So unlike the library itself, they are licensed + * Public Domain. + * + */ +#include +#include + +/* replace this with the model name of your device, eg "Bogotron 9000" */ +char lws_esp32_model[16] = "lws"; + +/* + * where the ROMFS start in your partition table... + * this already matches the provided partition table + */ +#define ROMFS_START_IN_FLASH 0x310000 + +/* + * Configuration for normal station website + * + * We implement the generic lws test server features using + * generic plugin code from lws. Normally these plugins + * are dynamically loaded at runtime, but we use them by + * statically including them. + * + * To customize for your own device, you would remove these + * and put your own plugin include here + */ +#include "plugins/protocol_dumb_increment.c" +#include "plugins/protocol_lws_mirror.c" +#include "plugins/protocol_post_demo.c" +#include "plugins/protocol_lws_status.c" + +static const struct lws_protocols protocols_station[] = { + { + "http-only", + lws_callback_http_dummy, + 0, + 900, 0, NULL + }, + LWS_PLUGIN_PROTOCOL_DUMB_INCREMENT, /* demo... */ + LWS_PLUGIN_PROTOCOL_MIRROR, /* replace with */ + LWS_PLUGIN_PROTOCOL_POST_DEMO, /* your own */ + LWS_PLUGIN_PROTOCOL_LWS_STATUS, /* plugin protocol */ + { NULL, NULL, 0, 0, 0, NULL } /* terminator */ +}; + +/* + * this makes a special URL "/formtest" which gets passed to + * the "protocol-post-demo" plugin protocol for handling + */ +static const struct lws_http_mount mount_station_post = { + .mountpoint = "/formtest", + .origin = "protocol-post-demo", + .origin_protocol = LWSMPRO_CALLBACK, + .mountpoint_len = 9, +}; + +/* + * this serves "/station/..." in the romfs at "/" in the URL namespace + */ +static const struct lws_http_mount mount_station = { + .mount_next = &mount_station_post, + .mountpoint = "/", + .origin = "/station", + .def = "test.html", + .origin_protocol = LWSMPRO_FILE, + .mountpoint_len = 1, +}; esp_err_t event_handler(void *ctx, system_event_t *event) { - return ESP_OK; + /* deal with your own user events here first */ + + return lws_esp32_event_passthru(ctx, event); } -void app_main(void) +/* + * This is called to find out if we should boot into AP / config mode. + * + * If the nvs setup data is missing, we always go into AP / config mode. + * + * But there should also be a device-specific way to hold down a + * key at boot or whatever to force it, for example if he changes his + * location or AP and can no longer connect normally. + */ +int +lws_esp32_is_booting_in_ap_mode(void) { - nvs_flash_init(); - tcpip_adapter_init(); - ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL) ); - wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); - ESP_ERROR_CHECK( esp_wifi_init(&cfg) ); - ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) ); - ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); - wifi_config_t sta_config = { - .sta = { - .ssid = "access_point_name", - .password = "password", - .bssid_set = false - } - }; - ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &sta_config) ); - ESP_ERROR_CHECK( esp_wifi_start() ); - ESP_ERROR_CHECK( esp_wifi_connect() ); - - gpio_set_direction(GPIO_NUM_4, GPIO_MODE_OUTPUT); - int level = 0; - while (true) { - gpio_set_level(GPIO_NUM_4, level); - level = !level; - vTaskDelay(300 / portTICK_PERIOD_MS); - } + /* return 1 to force entry to AP mode */ + // return 1; + + return 0; } +/* + * This is called when the user asks to "Identify physical device" + * he is configuring, by pressing the Identify button on the AP + * setup page for the device. + * + * It should do something device-specific that + * makes it easy to identify which physical device is being + * addressed, like flash an LED on the device on a timer for a + * few seconds. + */ +void +lws_esp32_identify_physical_device(void) +{ + lwsl_notice("%s\n", __func__); +} + +void app_main(void) +{ + static struct lws_context_creation_info info; + struct lws_context *context; + + memset(&info, 0, sizeof(info)); + + info.port = 443; + info.fd_limit_per_thread = 30; + info.max_http_header_pool = 3; + info.max_http_header_data = 512; + info.pt_serv_buf_size = 900; + info.keepalive_timeout = 5; + info.options = LWS_SERVER_OPTION_EXPLICIT_VHOSTS | + LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT; + + info.ssl_cert_filepath = "/ssl-cert.der"; + info.ssl_private_key_filepath = "/ssl-key.der"; + + info.vhost_name = "station"; + info.protocols = protocols_station; + info.mounts = &mount_station; + + nvs_flash_init(); + lws_esp32_wlan_config(); + ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL)); + lws_esp32_wlan_start(); + context = lws_esp32_init(&info, ROMFS_START_IN_FLASH); + + while (!lws_service(context, 50)) + vTaskDelay(1); +} diff --git a/partitions.csv b/partitions.csv new file mode 100644 index 0000000..0ee09b7 --- /dev/null +++ b/partitions.csv @@ -0,0 +1,10 @@ +# Espressif ESP32 Partition Table +# Name, Type, SubType, Offset, Size +nvs, data, nvs, 0x9000, 0x4000 +otadata, data, ota, 0xd000, 0x2000 +phy_init, data, phy, 0xf000, 0x1000 +factory, 0, 0, 0x10000, 1M +ota_0, 0, ota_0, , 1M +ota_1, 0, ota_1, , 1M +romfs, data, 0x80, 0x310000, 0xf0000 + diff --git a/sdkconfig b/sdkconfig index 5cc493d..739fc78 100644 --- a/sdkconfig +++ b/sdkconfig @@ -7,43 +7,41 @@ # SDK tool configuration # CONFIG_TOOLPREFIX="xtensa-esp32-elf-" -CONFIG_PYTHON="python" +CONFIG_PYTHON="python2" # # Bootloader config # # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set -CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y -# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set -CONFIG_LOG_BOOTLOADER_LEVEL=2 +CONFIG_LOG_BOOTLOADER_LEVEL=3 # -# Secure boot configuration +# Security features # -CONFIG_SECURE_BOOTLOADER_DISABLED=y -# CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH is not set -# CONFIG_SECURE_BOOTLOADER_REFLASHABLE is not set -# CONFIG_SECURE_BOOTLOADER_ENABLED is not set +# CONFIG_SECURE_BOOT_ENABLED is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set # # Serial flasher config # -CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" -CONFIG_ESPTOOLPY_BAUD_115200B=y +CONFIG_ESPTOOLPY_PORT="/dev/serial/by-path/pci-0000:00:14.0-usb-0:3.3:1.0-port0" +# CONFIG_ESPTOOLPY_BAUD_115200B is not set # CONFIG_ESPTOOLPY_BAUD_230400B is not set -# CONFIG_ESPTOOLPY_BAUD_921600B is not set +CONFIG_ESPTOOLPY_BAUD_921600B=y # CONFIG_ESPTOOLPY_BAUD_2MB is not set # CONFIG_ESPTOOLPY_BAUD_OTHER is not set CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_BAUD=115200 -# CONFIG_ESPTOOLPY_COMPRESSED is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set -CONFIG_ESPTOOLPY_FLASHMODE_DIO=y -# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set CONFIG_ESPTOOLPY_FLASHMODE="dio" # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set CONFIG_ESPTOOLPY_FLASHFREQ_40M=y @@ -51,84 +49,126 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set CONFIG_ESPTOOLPY_FLASHFREQ="40m" # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y -# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_BEFORE_RESET=y +# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +# CONFIG_ESPTOOLPY_AFTER_NORESET is not set +CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 # # Partition Table # -CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_SINGLE_APP is not set # CONFIG_PARTITION_TABLE_TWO_OTA is not set -# CONFIG_PARTITION_TABLE_CUSTOM is not set +CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000 -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" CONFIG_APP_OFFSET=0x10000 -CONFIG_PHY_DATA_OFFSET=0xf000 -CONFIG_OPTIMIZATION_LEVEL_DEBUG=y -# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_PHY_DATA_OFFSET= +# CONFIG_OPTIMIZATION_LEVEL_DEBUG is not set +CONFIG_OPTIMIZATION_LEVEL_RELEASE=y # # Component config # +# CONFIG_BT_ENABLED is not set CONFIG_BT_RESERVE_DRAM=0 # -# ESP32-specific config +# ESP32-specific # # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set # CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 -CONFIG_ESP32_ENABLE_STACK_WIFI=y -# CONFIG_ESP32_ENABLE_STACK_BT is not set -# CONFIG_ESP32_ENABLE_STACK_NONE is not set CONFIG_MEMMAP_SMP=y # CONFIG_MEMMAP_TRACEMEM is not set CONFIG_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_WIFI_ENABLED=y +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +# CONFIG_ESP32_ENABLE_COREDUMP is not set +# CONFIG_TWO_MAC_ADDRESS_FROM_EFUSE is not set +CONFIG_FOUR_MAC_ADDRESS_FROM_EFUSE=y +CONFIG_NUMBER_OF_MAC_ADDRESS_GENERATED_FROM_EFUSE=4 CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048 -CONFIG_MAIN_TASK_STACK_SIZE=4096 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=4096 +CONFIG_MAIN_TASK_STACK_SIZE=8192 CONFIG_NEWLIB_STDOUT_ADDCR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 # CONFIG_ULP_COPROC_ENABLED is not set CONFIG_ULP_COPROC_RESERVE_MEM=0 # CONFIG_ESP32_PANIC_PRINT_HALT is not set -CONFIG_ESP32_PANIC_PRINT_REBOOT=y +# CONFIG_ESP32_PANIC_PRINT_REBOOT is not set # CONFIG_ESP32_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP32_PANIC_GDBSTUB is not set +CONFIG_ESP32_PANIC_GDBSTUB=y CONFIG_ESP32_DEBUG_OCDAWARE=y CONFIG_INT_WDT=y CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y CONFIG_TASK_WDT=y # CONFIG_TASK_WDT_PANIC is not set CONFIG_TASK_WDT_TIMEOUT_S=5 CONFIG_TASK_WDT_CHECK_IDLE_TASK=y +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y -CONFIG_ESP32_PHY_AUTO_INIT=y +CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=0 +CONFIG_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=0 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 +CONFIG_ESP32_WIFI_AMPDU_ENABLED=y +CONFIG_ESP32_WIFI_NVS_ENABLED=y +CONFIG_PHY_ENABLED=y + +# +# PHY +# +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP32_PHY_MAX_TX_POWER=20 +# CONFIG_ETHERNET is not set # # FreeRTOS # -CONFIG_FREERTOS_UNICORE=y +# CONFIG_FREERTOS_UNICORE is not set CONFIG_FREERTOS_CORETIMER_0=y # CONFIG_FREERTOS_CORETIMER_1 is not set -# CONFIG_FREERTOS_CORETIMER_2 is not set -CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_HZ=100 CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set -CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY is not set -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3 +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set # CONFIG_FREERTOS_ASSERT_DISABLE is not set @@ -136,8 +176,14 @@ CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG=y # CONFIG_ENABLE_MEMORY_DEBUG is not set CONFIG_FREERTOS_ISR_STACKSIZE=1536 # CONFIG_FREERTOS_LEGACY_HOOKS is not set +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 # CONFIG_FREERTOS_DEBUG_INTERNALS is not set +# +# Libwebsockets +# +CONFIG_LWS=y + # # Log output # @@ -154,20 +200,35 @@ CONFIG_LOG_COLORS=y # LWIP # # CONFIG_L2_TO_L3_COPY is not set -CONFIG_LWIP_MAX_SOCKETS=4 +CONFIG_LWIP_MAX_SOCKETS=30 CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX=0 # CONFIG_LWIP_SO_REUSE is not set +# CONFIG_LWIP_SO_RCVBUF is not set CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 +# CONFIG_LWIP_IP_FRAG is not set +# CONFIG_LWIP_IP_REASSEMBLY is not set +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=6 +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set # # mbedTLS # -CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 +CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=4096 # CONFIG_MBEDTLS_DEBUG is not set CONFIG_MBEDTLS_HARDWARE_AES=y CONFIG_MBEDTLS_HARDWARE_MPI=y CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y -CONFIG_MBEDTLS_MPI_INTERRUPT_NUM=18 +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_HAVE_TIME=y +# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set + +# +# OpenSSL +# +# CONFIG_OPENSSL_DEBUG is not set +CONFIG_OPENSSL_ASSERT_DO_NOTHING=y +# CONFIG_OPENSSL_ASSERT_EXIT is not set # # SPI Flash driver