diff --git a/main/app_main.cpp b/main/app_main.cpp index 36cb4b3..e0b082d 100644 --- a/main/app_main.cpp +++ b/main/app_main.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -414,6 +415,13 @@ void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) extern "C" void app_main() { + // Select the external antenna. + // GPIO03 low + GPIO14 high routes the RF switch to the U.FL connector. + gpio_set_direction(GPIO_NUM_3, GPIO_MODE_OUTPUT); + gpio_set_direction(GPIO_NUM_14, GPIO_MODE_OUTPUT); + gpio_set_level(GPIO_NUM_3, 0); + gpio_set_level(GPIO_NUM_14, 1); + // General-purpose NVS partition: auto-erased on unrecoverable corruption. // Holds only non-Matter app state; safe to wipe because all Matter // credentials live on the protected nvs_matter partition. diff --git a/sdkconfig.defaults b/sdkconfig.defaults index ecf31ae..2c8462b 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -85,6 +85,9 @@ CONFIG_ENABLE_WIFI_STATION=n # under marginal RF conditions. pdMS_TO_TICKS() in app code is unaffected. CONFIG_FREERTOS_HZ=1000 +# Matter device product name shown in Home Assistant and other controllers. +CONFIG_DEVICE_PRODUCT_NAME="GH LK Control" + # Matter + logging defaults CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y # Canonical integer form for the log-level choice (2 = INFO)