diff --git a/examples/.build-rules.yml b/examples/.build-rules.yml index 111d44436..2a17d4c5a 100644 --- a/examples/.build-rules.yml +++ b/examples/.build-rules.yml @@ -33,6 +33,12 @@ examples/generic_switch: temporary: true reason: the other targets are not tested yet +examples/multiple_on_off_plugin_units: + enable: + - if: IDF_TARGET in ["esp32c3", "esp32", "esp32s3", "esp32h2"] + temporary: true + reason: the other targets are not tested yet + examples/esp-now_bridge_light: enable: - if: IDF_TARGET in ["esp32c3"] diff --git a/examples/multiple_on_off_plugin_units/CMakeLists.txt b/examples/multiple_on_off_plugin_units/CMakeLists.txt new file mode 100644 index 000000000..33aaf49d3 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/CMakeLists.txt @@ -0,0 +1,40 @@ +# The following lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) + +if(NOT DEFINED ENV{ESP_MATTER_PATH}) + message(FATAL_ERROR "Please set ESP_MATTER_PATH to the path of esp-matter repo") +endif(NOT DEFINED ENV{ESP_MATTER_PATH}) + +set(PROJECT_VER "1.0") +set(PROJECT_VER_NUMBER 1) + +set(ESP_MATTER_PATH $ENV{ESP_MATTER_PATH}) +set(MATTER_SDK_PATH ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip) + +# This should be done before using the IDF_TARGET variable. +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +include(${ESP_MATTER_PATH}/examples/common/cmake_common/components_include.cmake) + +set(EXTRA_COMPONENT_DIRS + "${MATTER_SDK_PATH}/config/esp32/components" + "${ESP_MATTER_PATH}/components" + ${extra_components_dirs_append}) + +project(multiple_on_off_plugin_units) + +# WARNING: This is just an example for using key for decrypting the encrypted OTA image +# Please do not use it as is. +if(CONFIG_ENABLE_ENCRYPTED_OTA) + target_add_binary_data(light.elf "esp_image_encryption_key.pem" TEXT) +endif() + +if(CONFIG_IDF_TARGET_ESP32C2) + include(relinker) +endif() + +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H;-Wno-overloaded-virtual" APPEND) +idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) +# For RISCV chips, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) diff --git a/examples/multiple_on_off_plugin_units/README.md b/examples/multiple_on_off_plugin_units/README.md new file mode 100644 index 000000000..4f3fac2c7 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/README.md @@ -0,0 +1,53 @@ +# Multiple On Off plugin unit + +This example demonstrates the creation of a Multiple On-Off Plugin Unit, where multiple endpoints are mapped to GPIO pins. + +## Plugin Manager Configuration +Three default on-off plugin units have been created. You can create similar plugin units. + +To update the existing CONFIG_GPIO_PLUG values, follow these steps: + +1. Open a terminal. +1. Run the following command to access the configuration menu: +`idf.py menuconfig` +1. Navigate to the "Plugin manager" menu. +1. Update the GPIO pin number values (**Use only available GPIO pins as per the target chip**). + + +You can update maximum configurable plugin units from same menu. + +See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html) for more information about building and flashing the firmware. + +## 1. Additional Environment Setup + +No additional setup is required. + +## 2. Post Commissioning Setup + +No additional setup is required. + +## 3. Device Performance + +### 3.1 Memory usage + +The following is the Memory and Flash Usage. + +- `Bootup` == Device just finished booting up. Device is not + commissionined or connected to wifi yet. +- `After Commissioning` == Device is conneted to wifi and is also + commissioned and is rebooted. +- device used: esp32c3_devkit_m +- tested on: + [6a244a7](https://github.com/espressif/esp-matter/commit/6a244a7b1e5c70b0aa1bf57254f19718b0755d95) + (2022-06-16) + +| | Bootup | After Commissioning | +|:- |:-: |:-: | +|**Free Internal Memory** | 212KB |127KB | + +**Flash Usage**: Firmware binary size: 1.40MB + +This should give you a good idea about the amount of free memory that is +available for you to run your application's code. + +Applications that do not require BLE post commissioning, can disable it using app_ble_disable() once commissioning is complete. It is not done explicitly because of a known issue with esp32c3 and will be fixed with the next IDF release (v4.4.2). diff --git a/examples/multiple_on_off_plugin_units/main/CMakeLists.txt b/examples/multiple_on_off_plugin_units/main/CMakeLists.txt new file mode 100644 index 000000000..43626a795 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/main/CMakeLists.txt @@ -0,0 +1,5 @@ +idf_component_register(SRC_DIRS "." + PRIV_INCLUDE_DIRS "." "${ESP_MATTER_PATH}/examples/common/utils") + +set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) +target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H") diff --git a/examples/multiple_on_off_plugin_units/main/Kconfig.projbuild b/examples/multiple_on_off_plugin_units/main/Kconfig.projbuild new file mode 100644 index 000000000..35d2614a2 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/main/Kconfig.projbuild @@ -0,0 +1,25 @@ +menu "Plugin manager" + config MAX_CONFIGURABLE_PLUGS + int "Maximum virtual configurable plugs" + default 5 + range 1 16 + + config GPIO_PLUG_1 + int "GPIO pin number for plug 1" + default 3 if IDF_TARGET_ESP32S3 + default 2 if !IDF_TARGET_ESP32S3 + help + Set GPIO pin value for target chip to create plugin unit + + config GPIO_PLUG_2 + int "GPIO pin number for plug 2" + default 4 + help + Set GPIO pin value for target chip to create plugin unit + + config GPIO_PLUG_3 + int "GPIO pin number for plug 3" + default 5 + help + Set GPIO pin value for target chip to create plugin unit +endmenu \ No newline at end of file diff --git a/examples/multiple_on_off_plugin_units/main/app_driver.cpp b/examples/multiple_on_off_plugin_units/main/app_driver.cpp new file mode 100644 index 000000000..a78d47d1b --- /dev/null +++ b/examples/multiple_on_off_plugin_units/main/app_driver.cpp @@ -0,0 +1,88 @@ +/* + This example code is in the Public Domain (or CC0 licensed, at your option.) + + Unless required by applicable law or agreed to in writing, this + software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. +*/ + +#include +#include +#include +#include "driver/gpio.h" + +#include + +#include + +using namespace chip::app::Clusters; +using namespace esp_matter; + +static const char *TAG = "app_driver"; + +static esp_err_t app_driver_update_gpio_value(gpio_num_t pin, bool value) +{ + esp_err_t err = ESP_OK; + + err = gpio_set_level(pin, value); + if (err != ESP_OK) { + ESP_LOGE(TAG, "Failed to set GPIO level"); + return ESP_FAIL; + } else { + ESP_LOGI(TAG, "GPIO pin : %d set to %d", pin, value); + } + return err; +} + +esp_err_t app_driver_plugin_unit_init(const gpio_plug* plug) +{ + esp_err_t err = ESP_OK; + + gpio_reset_pin(plug->GPIO_PIN_VALUE); + + err = gpio_set_direction(plug->GPIO_PIN_VALUE, GPIO_MODE_OUTPUT); + if (err != ESP_OK) { + ESP_LOGE(TAG, "Unable to set GPIO OUTPUT mode"); + return ESP_FAIL; + } + + err = gpio_set_level(plug->GPIO_PIN_VALUE, 0); + if (err != ESP_OK) { + ESP_LOGI(TAG, "Unable to set GPIO level"); + } + return err; +} + +// Return GPIO pin from plug-endpoint mapping list +gpio_num_t get_gpio(uint16_t endpoint_id) +{ + gpio_num_t gpio_pin = GPIO_NUM_NC; + for (int i = 0; i < s_configure_plugs; i++) { + if (s_plugin_unit_list[i].endpoint_id == endpoint_id) { + gpio_pin = s_plugin_unit_list[i].plug; + } + } + return gpio_pin; +} + + +esp_err_t app_driver_attribute_update(app_driver_handle_t driver_handle, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val) +{ + esp_err_t err = ESP_OK; + + if (cluster_id == OnOff::Id) { + if (attribute_id == OnOff::Attributes::OnOff::Id) { + gpio_num_t gpio_pin = get_gpio(endpoint_id); + if (gpio_pin != GPIO_NUM_NC) { + err = app_driver_update_gpio_value(gpio_pin, val->val.b); + } else { + ESP_LOGE(TAG, "GPIO pin mapping for endpoint_id: %d not found", endpoint_id); + return ESP_FAIL; + } + } + } + return err; +} + + diff --git a/examples/multiple_on_off_plugin_units/main/app_main.cpp b/examples/multiple_on_off_plugin_units/main/app_main.cpp new file mode 100644 index 000000000..9bc398cd8 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/main/app_main.cpp @@ -0,0 +1,245 @@ +/* + This example code is in the Public Domain (or CC0 licensed, at your option.) + + Unless required by applicable law or agreed to in writing, this + software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. +*/ + +#include +#include +#include + +#include +#include +#include +#include "driver/gpio.h" + +#include +#include +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#endif + +#include +#include + +static const char *TAG = "app_main"; + +using namespace esp_matter; +using namespace esp_matter::attribute; +using namespace esp_matter::endpoint; +using namespace chip::app::Clusters; + +constexpr auto k_timeout_seconds = 300; +uint16_t s_configure_plugs = 0; +plugin_endpoint s_plugin_unit_list[CONFIG_MAX_CONFIGURABLE_PLUGS]; + +#if CONFIG_ENABLE_ENCRYPTED_OTA +extern const char decryption_key_start[] asm("_binary_esp_image_encryption_key_pem_start"); +extern const char decryption_key_end[] asm("_binary_esp_image_encryption_key_pem_end"); + +static const char *s_decryption_key = decryption_key_start; +static const uint16_t s_decryption_key_len = decryption_key_end - decryption_key_start; +#endif // CONFIG_ENABLE_ENCRYPTED_OTA + +static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) +{ + switch (event->Type) { + case chip::DeviceLayer::DeviceEventType::kInterfaceIpAddressChanged: + ESP_LOGI(TAG, "Interface IP Address changed"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningComplete: + ESP_LOGI(TAG, "Commissioning complete"); + break; + + case chip::DeviceLayer::DeviceEventType::kFailSafeTimerExpired: + ESP_LOGI(TAG, "Commissioning failed, fail safe timer expired"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningSessionStarted: + ESP_LOGI(TAG, "Commissioning session started"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningSessionStopped: + ESP_LOGI(TAG, "Commissioning session stopped"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningWindowOpened: + ESP_LOGI(TAG, "Commissioning window opened"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningWindowClosed: + ESP_LOGI(TAG, "Commissioning window closed"); + break; + + case chip::DeviceLayer::DeviceEventType::kFabricRemoved: { + ESP_LOGI(TAG, "Fabric removed successfully"); + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) { + chip::CommissioningWindowManager &commissionMgr = chip::Server::GetInstance().GetCommissioningWindowManager(); + constexpr auto kTimeoutSeconds = chip::System::Clock::Seconds16(k_timeout_seconds); + if (!commissionMgr.IsCommissioningWindowOpen()) { + /* After removing last fabric, this example does not remove the Wi-Fi credentials + * and still has IP connectivity so, only advertising on DNS-SD. + */ + CHIP_ERROR err = commissionMgr.OpenBasicCommissioningWindow(kTimeoutSeconds, + chip::CommissioningWindowAdvertisement::kDnssdOnly); + if (err != CHIP_NO_ERROR) { + ESP_LOGE(TAG, "Failed to open commissioning window, err:%" CHIP_ERROR_FORMAT, err.Format()); + } + } + } + break; + } + + case chip::DeviceLayer::DeviceEventType::kFabricWillBeRemoved: + ESP_LOGI(TAG, "Fabric will be removed"); + break; + + case chip::DeviceLayer::DeviceEventType::kFabricUpdated: + ESP_LOGI(TAG, "Fabric is updated"); + break; + + case chip::DeviceLayer::DeviceEventType::kFabricCommitted: + ESP_LOGI(TAG, "Fabric is committed"); + break; + + case chip::DeviceLayer::DeviceEventType::kBLEDeinitialized: + ESP_LOGI(TAG, "BLE deinitialized and memory reclaimed"); + break; + + default: + break; + } +} + +// This callback is invoked when clients interact with the Identify Cluster. +// In the callback implementation, an endpoint can identify itself. (e.g., by flashing an LED or light). +static esp_err_t app_identification_cb(identification::callback_type_t type, uint16_t endpoint_id, uint8_t effect_id, + uint8_t effect_variant, void *priv_data) +{ + ESP_LOGI(TAG, "Identification callback: type: %u, effect: %u, variant: %u", type, effect_id, effect_variant); + return ESP_OK; +} + +// This callback is called for every attribute update. The callback implementation shall +// handle the desired attributes and return an appropriate error code. If the attribute +// is not of your interest, please do not return an error code and strictly return ESP_OK. +static esp_err_t app_attribute_update_cb(attribute::callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data) +{ + esp_err_t err = ESP_OK; + + if (type == PRE_UPDATE) { + /* Driver update */ + app_driver_handle_t driver_handle = (app_driver_handle_t)priv_data; + err = app_driver_attribute_update(driver_handle, endpoint_id, cluster_id, attribute_id, val); + } + + return err; +} + +// Creates plug-endpoint mapping for each GPIO pin configured. +static esp_err_t create_plug(gpio_plug* plug, node_t* node) +{ + esp_err_t err = ESP_OK; + + if (!node) { + ESP_LOGE(TAG, "Matter node cannot be NULL"); + return ESP_ERR_INVALID_ARG; + } + + if (!plug) { + ESP_LOGE(TAG, "Plug cannot be NULL"); + return ESP_ERR_INVALID_ARG; + } + + // Check for plug if already configured. + for (int i = 0; i < s_configure_plugs; i++) { + if (s_plugin_unit_list[i].plug == plug->GPIO_PIN_VALUE) { + ESP_LOGE(TAG, "Plug already configured for gpio pin : %d", plug->GPIO_PIN_VALUE); + return ESP_OK; + } + } + + on_off_plugin_unit::config_t plugin_unit_config; + plugin_unit_config.on_off.on_off = false; + endpoint_t *endpoint = on_off_plugin_unit::create(node, &plugin_unit_config, ENDPOINT_FLAG_NONE, plug); + + if (!endpoint) { + ESP_LOGE(TAG, "Matter endpoint creation failed"); + return ESP_FAIL; + } + + // GPIO pin Initialization + err = app_driver_plugin_unit_init(plug); + + if (err != ESP_OK) { + ESP_LOGE(TAG, "Failed to initialize plug"); + } + + // Check for maximum plugs that can be configured. + if (s_configure_plugs < CONFIG_MAX_CONFIGURABLE_PLUGS) { + s_plugin_unit_list[s_configure_plugs].plug = plug->GPIO_PIN_VALUE; + s_plugin_unit_list[s_configure_plugs].endpoint_id = endpoint::get_id(endpoint); + s_configure_plugs++; + } else { + ESP_LOGE(TAG, "Maximum plugs configuration limit exceeded!!!"); + return ESP_FAIL; + } + + uint16_t plug_endpoint_id = endpoint::get_id(endpoint); + ESP_LOGI(TAG, "Plug created with endpoint_id %d", plug_endpoint_id); + return err; +} + +extern "C" void app_main() +{ + esp_err_t err = ESP_OK; + + /* Initialize the ESP NVS layer */ + nvs_flash_init(); + + /* Create a Matter node and add the mandatory Root Node device type on endpoint 0 */ + node::config_t node_config; + + // node handle can be used to add/modify other endpoints. + node_t *node = node::create(&node_config, app_attribute_update_cb, app_identification_cb); + ABORT_APP_ON_FAILURE(node != nullptr, ESP_LOGE(TAG, "Failed to create Matter node")); + + struct gpio_plug plug1; + plug1.GPIO_PIN_VALUE = (gpio_num_t) CONFIG_GPIO_PLUG_1; + create_plug(&plug1, node); + + struct gpio_plug plug2; + plug2.GPIO_PIN_VALUE = (gpio_num_t) CONFIG_GPIO_PLUG_2; + create_plug(&plug2, node); + + struct gpio_plug plug3; + plug3.GPIO_PIN_VALUE = (gpio_num_t) CONFIG_GPIO_PLUG_3; + create_plug(&plug3, node); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + /* Set OpenThread platform config */ + esp_openthread_platform_config_t config = { + .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), + .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), + .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), + }; + set_openthread_platform_config(&config); +#endif + + /* Matter start */ + err = esp_matter::start(app_event_cb); + ABORT_APP_ON_FAILURE(err == ESP_OK, ESP_LOGE(TAG, "Failed to start Matter, err:%d", err)); + +#if CONFIG_ENABLE_CHIP_SHELL + esp_matter::console::diagnostics_register_commands(); + esp_matter::console::wifi_register_commands(); +#if CONFIG_OPENTHREAD_CLI + esp_matter::console::otcli_register_commands(); +#endif + esp_matter::console::init(); +#endif +} diff --git a/examples/multiple_on_off_plugin_units/main/app_priv.h b/examples/multiple_on_off_plugin_units/main/app_priv.h new file mode 100644 index 000000000..3af07c203 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/main/app_priv.h @@ -0,0 +1,78 @@ +/* + This example code is in the Public Domain (or CC0 licensed, at your option.) + + Unless required by applicable law or agreed to in writing, this + software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. +*/ + +#pragma once + +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include "esp_openthread_types.h" +#endif + +/** Default attribute values used during initialization */ + +struct gpio_plug { + gpio_num_t GPIO_PIN_VALUE; +}; + +struct plugin_endpoint { + uint16_t endpoint_id; + gpio_num_t plug; +}; + +gpio_num_t get_gpio(uint16_t endpoint_id); + +extern plugin_endpoint s_plugin_unit_list[CONFIG_MAX_CONFIGURABLE_PLUGS]; +extern uint16_t s_configure_plugs; + +typedef void *app_driver_handle_t; + +/** GPIO pin initialization + * + * This API is called to initialize GPIO pin + * + * @param[in] plugin GPIO pin. + * + * @return ESP_OK on success. + * @return error in case of failure. + */ +esp_err_t app_driver_plugin_unit_init(const gpio_plug* plug); + +/** Driver Update + * + * This API should be called to update the driver for the attribute being updated. + * This is usually called from the common `app_attribute_update_cb()`. + * + * @param[in] endpoint_id Endpoint ID of the attribute. + * @param[in] cluster_id Cluster ID of the attribute. + * @param[in] attribute_id Attribute ID of the attribute. + * @param[in] val Pointer to `esp_matter_attr_val_t`. Use appropriate elements as per the value type. + * + * @return ESP_OK on success. + * @return error in case of failure. + */ +esp_err_t app_driver_attribute_update(app_driver_handle_t driver_handle, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_NATIVE, \ + } + +#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ + { \ + .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + } + +#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ + { \ + .storage_partition_name = "nvs", .netif_queue_size = 10, .task_queue_size = 10, \ + } +#endif diff --git a/examples/multiple_on_off_plugin_units/main/idf_component.yml b/examples/multiple_on_off_plugin_units/main/idf_component.yml new file mode 100644 index 000000000..c489c846c --- /dev/null +++ b/examples/multiple_on_off_plugin_units/main/idf_component.yml @@ -0,0 +1,6 @@ +dependencies: + espressif/cmake_utilities: + version: 0.* + rules: # will add "optional_component" only when all if clauses are True + - if: "idf_version >=5.0" + - if: "target in [esp32c2]" \ No newline at end of file diff --git a/examples/multiple_on_off_plugin_units/partitions.csv b/examples/multiple_on_off_plugin_units/partitions.csv new file mode 100644 index 000000000..ffe5f242e --- /dev/null +++ b/examples/multiple_on_off_plugin_units/partitions.csv @@ -0,0 +1,10 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted +nvs, data, nvs, 0x10000, 0xC000, +nvs_keys, data, nvs_keys,, 0x1000, encrypted +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +fctry, data, nvs, 0x3E0000, 0x6000 diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults b/examples/multiple_on_off_plugin_units/sdkconfig.defaults new file mode 100644 index 000000000..fa2968919 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults @@ -0,0 +1,42 @@ +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y + +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#disable BT connection reattempt +CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_OFFSET=0xC000 + +# Enable chip shell +CONFIG_ENABLE_CHIP_SHELL=y + +#enable lwIP route hooks +CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y +CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# disable softap by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n + +# Disable DS Peripheral +CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=n + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y + +# Increase LwIP IPv6 address number to 6 (MAX_FABRIC + 1) +# unique local addresses for fabrics(MAX_FABRIC), a link local address(1) +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.c6_thread b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.c6_thread new file mode 100644 index 000000000..69d50a489 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.c6_thread @@ -0,0 +1,56 @@ +CONFIG_IDF_TARGET="esp32c6" + +# libsodium +CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y + +# NIMBLE +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=n +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n + +# FreeRTOS should use legacy API +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y + +# Enable OpenThread +CONFIG_OPENTHREAD_ENABLED=y +CONFIG_OPENTHREAD_SRP_CLIENT=y +CONFIG_OPENTHREAD_DNS_CLIENT=y +CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n +CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y +CONFIG_OPENTHREAD_CLI=n + +# Disable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=n + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +# LwIP config for OpenThread +CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 +CONFIG_LWIP_MULTICAST_PING=y + +# MDNS platform +CONFIG_USE_MINIMAL_MDNS=n +CONFIG_ENABLE_EXTENDED_DISCOVERY=y + +# Enable OTA Requestor +CONFIG_ENABLE_OTA_REQUESTOR=y + +# Disable STA and AP for ESP32C6 +CONFIG_ENABLE_WIFI_STATION=n +CONFIG_ENABLE_WIFI_AP=n + +# Enable chip shell +CONFIG_ENABLE_CHIP_SHELL=y + +# Disable persist subscriptions +CONFIG_ENABLE_PERSIST_SUBSCRIPTIONS=n + +# MRP configs +CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_THREAD=5000 +CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_THREAD=5000 +CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_THREAD=5000 +CONFIG_MRP_MAX_RETRANS=3 diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2 b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2 new file mode 100644 index 000000000..cbac0a598 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2 @@ -0,0 +1,167 @@ +# Bluetooth +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +## NimBLE Options +CONFIG_BT_NIMBLE_MAX_CONNECTIONS=1 +CONFIG_BT_NIMBLE_MAX_BONDS=2 +CONFIG_BT_NIMBLE_MAX_CCCDS=2 +CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=3072 +CONFIG_BT_NIMBLE_ROLE_CENTRAL=n +CONFIG_BT_NIMBLE_ROLE_OBSERVER=n +CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT=10 +CONFIG_BT_NIMBLE_MSYS_1_BLOCK_SIZE=100 +CONFIG_BT_NIMBLE_MSYS_2_BLOCK_COUNT=4 +CONFIG_BT_NIMBLE_ACL_BUF_COUNT=5 +CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT=5 +CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT=3 +CONFIG_BT_NIMBLE_GATT_MAX_PROCS=1 +CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n +CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT=n +CONFIG_BT_NIMBLE_WHITELIST_SIZE=1 +## Controller Options +CONFIG_BT_LE_CONTROLLER_TASK_STACK_SIZE=3072 +CONFIG_BT_LE_LL_RESOLV_LIST_SIZE=1 +CONFIG_BT_LE_LL_DUP_SCAN_LIST_COUNT=1 + +# Release BT IRAM memory +CONFIG_BT_RELEASE_IRAM=y + +# SPI Configuration +CONFIG_SPI_MASTER_ISR_IN_IRAM=n +CONFIG_SPI_SLAVE_ISR_IN_IRAM=n + +# Ethernet +CONFIG_ETH_USE_SPI_ETHERNET=n + +# Event Loop Library +CONFIG_ESP_EVENT_POST_FROM_ISR=n + +# Chip revision +CONFIG_ESP32C2_REV2_DEVELOPMENT=y + +# Main XTAL Config +CONFIG_XTAL_FREQ_26=y +CONFIG_XTAL_FREQ_40=n + +# ESP Ringbuf +CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y +CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH=y + +# ESP System Settings +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=16 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=3072 + +## Memory protection +CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT=n + +# High resolution timer (esp_timer) +CONFIG_ESP_TIMER_TASK_STACK_SIZE=2048 + +# Wi-Fi +CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=n +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=3 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=6 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=6 +CONFIG_ESP32_WIFI_IRAM_OPT=n +CONFIG_ESP32_WIFI_RX_IRAM_OPT=n +CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=n +CONFIG_ESP32_WIFI_ENABLE_WPA3_OWE_STA=n +CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE=n +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n + +# FreeRTOS +## Kernel +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +## Port +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=n +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y +CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y + +# Hardware Abstraction Layer (HAL) and Low Level (LL) +CONFIG_HAL_ASSERTION_DISABLE=y + +# LWIP +CONFIG_LWIP_MAX_SOCKETS=5 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=16 +CONFIG_LWIP_DHCPS=n +CONFIG_LWIP_IPV6_AUTOCONFIG=y +CONFIG_LWIP_MAX_ACTIVE_TCP=5 +CONFIG_LWIP_MAX_LISTENING_TCP=5 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=n +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSL=40000 +CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=16000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=4096 +CONFIG_LWIP_TCP_WND_DEFAULT=2440 +CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS=y +CONFIG_LWIP_TCP_RTO_TIME=1500 +CONFIG_LWIP_MAX_UDP_PCBS=8 +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560 +CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y +CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# mbedTLS +CONFIG_MBEDTLS_DYNAMIC_BUFFER=y +CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y +CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT=y +CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH=y +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN=y +CONFIG_MBEDTLS_TLS_CLIENT_ONLY=y +CONFIG_MBEDTLS_SSL_PROTO_SSL3=n +CONFIG_MBEDTLS_SSL_PROTO_TLS1=n +CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=n + +# ESP-MQTT Configurations +CONFIG_MQTT_PROTOCOL_311=n + +# Protocomm +CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_1=n +CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_2=n + +# SPI Flash driver +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=n +CONFIG_SPI_FLASH_ROM_IMPL=y + +# Websocket +CONFIG_WS_TRANSPORT=n + +# Virtual file system +CONFIG_VFS_SUPPORT_DIR=n +CONFIG_VFS_SUPPORT_SELECT=n +CONFIG_VFS_SUPPORT_TERMIOS=n + +# Wear Levelling +CONFIG_WL_SECTOR_SIZE_512=y + +# CHIP Core +## General Options +CONFIG_MAX_EXCHANGE_CONTEXTS=6 +CONFIG_MAX_BINDINGS=6 +CONFIG_MAX_PEER_NODES=12 +CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS=6 +CONFIG_ENABLE_CHIP_SHELL=n +CONFIG_DISABLE_IPV4=y +CONFIG_BUILD_CHIP_TESTS=n +## Networking Options +CONFIG_NUM_TCP_ENDPOINTS=1 +CONFIG_NUM_UDP_ENDPOINTS=6 +## System Options +CONFIG_NUM_TIMERS=24 +CONFIG_ENABLE_OTA_REQUESTOR=y + +# CHIP Device Layer +## General Options +CONFIG_CHIP_TASK_STACK_SIZE=6144 +CONFIG_MAX_EVENT_QUEUE_SIZE=20 +## Event Logging Options +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=256 +CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE=256 +CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE=256 + +# ESP Matter +CONFIG_ESP_MATTER_MAX_DEVICE_TYPE_COUNT=4 +CONFIG_ESP_MATTER_MAX_DYNAMIC_ENDPOINT_COUNT=4 + diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2.v5.1 b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2.v5.1 new file mode 100644 index 000000000..245ec1227 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2.v5.1 @@ -0,0 +1,4 @@ +# CMake Utilities +CONFIG_CU_RELINKER_ENABLE=y +CONFIG_CU_RELINKER_ENABLE_CUSTOMIZED_CONFIGURATION_FILES=y +CONFIG_CU_RELINKER_CUSTOMIZED_CONFIGURATION_FILES_PATH="../common/relinker/esp32c2_v5.1" diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2.v5.2 b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2.v5.2 new file mode 100644 index 000000000..5d4ed95fe --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c2.v5.2 @@ -0,0 +1,4 @@ +# CMake Utilities +CONFIG_CU_RELINKER_ENABLE=y +CONFIG_CU_RELINKER_ENABLE_CUSTOMIZED_CONFIGURATION_FILES=y +CONFIG_CU_RELINKER_CUSTOMIZED_CONFIGURATION_FILES_PATH="../common/relinker/esp32c2_v5.2" diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c3 b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c3 new file mode 100644 index 000000000..5bc059944 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c3 @@ -0,0 +1,10 @@ +CONFIG_IDF_TARGET="esp32c3" + +# Enable OTA Requestor +CONFIG_ENABLE_OTA_REQUESTOR=y + +# Disable AP +CONFIG_ENABLE_WIFI_STATION=y +CONFIG_ENABLE_WIFI_AP=n + + diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c6 b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c6 new file mode 100644 index 000000000..47740a85a --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32c6 @@ -0,0 +1,36 @@ +CONFIG_IDF_TARGET="esp32c6" + +# libsodium +CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y + +# NIMBLE +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=n +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=y + +# FreeRTOS should use legacy API +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y + +# Disable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +# Use minimal mDNS +CONFIG_USE_MINIMAL_MDNS=y +CONFIG_ENABLE_EXTENDED_DISCOVERY=y + +# Enable OTA Requestor +CONFIG_ENABLE_OTA_REQUESTOR=y + +# Disable AP +CONFIG_ENABLE_WIFI_STATION=y +CONFIG_ENABLE_WIFI_AP=n + +# Enable chip shell +CONFIG_ENABLE_CHIP_SHELL=y + diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32h2 b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32h2 new file mode 100644 index 000000000..4bb51601c --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32h2 @@ -0,0 +1,60 @@ +CONFIG_IDF_TARGET="esp32h2" + +# libsodium +CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y + +# NIMBLE +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=n +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n + +# FreeRTOS should use legacy API +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y + +# Enable OpenThread +CONFIG_OPENTHREAD_ENABLED=y +CONFIG_OPENTHREAD_SRP_CLIENT=y +CONFIG_OPENTHREAD_DNS_CLIENT=y +CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n +CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y +CONFIG_OPENTHREAD_CLI=n + + +# Disable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=n + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +# LwIP config for OpenThread +CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 +CONFIG_LWIP_MULTICAST_PING=y + +# MDNS platform +CONFIG_USE_MINIMAL_MDNS=n +CONFIG_ENABLE_EXTENDED_DISCOVERY=y + +# Enable OTA Requestor +CONFIG_ENABLE_OTA_REQUESTOR=y + +# Disable STA and AP for ESP32H2 +CONFIG_ENABLE_WIFI_STATION=n +CONFIG_ENABLE_WIFI_AP=n + +# Enable chip shell +CONFIG_ENABLE_CHIP_SHELL=y + +# Enable DS Peripheral +CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=y + +# Disable persist subscriptions +CONFIG_ENABLE_PERSIST_SUBSCRIPTIONS=n + +# MRP configs +CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_THREAD=5000 +CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_THREAD=5000 +CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_THREAD=5000 +CONFIG_MRP_MAX_RETRANS=3 diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32s3 b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32s3 new file mode 100644 index 000000000..79302c66f --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.esp32s3 @@ -0,0 +1,24 @@ +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#disable BT connection reattempt +CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_OFFSET=0xC000 + +# Enable chip shell +CONFIG_ENABLE_CHIP_SHELL=y + +#enable lwIP route hooks +CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y +CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.ext_plat b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.ext_plat new file mode 100644 index 000000000..ca9a49869 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.ext_plat @@ -0,0 +1,48 @@ +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y + +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#disable BT connection reattempt +CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" + +# Disable chip shell +CONFIG_ENABLE_CHIP_SHELL=n + +# Disable chip tests +CONFIG_BUILD_CHIP_TESTS=n + +#enable lwIP route hooks +CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y +CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# External Platform +CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM=y +CONFIG_CHIP_EXTERNAL_PLATFORM_DIR="../../../../../platform/ESP32_custom" +CONFIG_CHIP_EXTERNAL_PLATFORM_INCLUDE_DIR="../../../../.." + +# disable softap by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n + +# Disable DS Peripheral +CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=n + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y + +# ESP32-DevKit Settings + diff --git a/examples/multiple_on_off_plugin_units/sdkconfig.defaults.ext_plat_ci b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.ext_plat_ci new file mode 100644 index 000000000..1206c4223 --- /dev/null +++ b/examples/multiple_on_off_plugin_units/sdkconfig.defaults.ext_plat_ci @@ -0,0 +1,48 @@ +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y + +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#disable BT connection reattempt +CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" + +# Disable chip shell +CONFIG_ENABLE_CHIP_SHELL=n + +# Disable chip tests +CONFIG_BUILD_CHIP_TESTS=n + +#enable lwIP route hooks +CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y +CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# External Platform +CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM=y +CONFIG_CHIP_EXTERNAL_PLATFORM_DIR="../../../../../builds/app-frameworks/platform/ESP32_custom" +CONFIG_CHIP_EXTERNAL_PLATFORM_INCLUDE_DIR="../../../../../builds/app-frameworks/" + +# disable softap by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n + +# Disable DS Peripheral +CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=n + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y + +# ESP32-DevKit Settings +