From ab1e9ed8980e83a5da3e94e351a5047ad9f2e846 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Mar 2026 09:04:18 +0000 Subject: [PATCH 1/2] sdkconfig.defaults: set product name to "GH LK Control" CONFIG_DEVICE_PRODUCT_NAME is the Basic Information cluster's ProductName attribute, which Home Assistant (and other Matter controllers) display as the device name. The default value in the CHIP SDK is "TEST_PRODUCT". https://claude.ai/code/session_01SxqAiQApiRTwXefk9aQ6bR --- sdkconfig.defaults | 3 +++ 1 file changed, 3 insertions(+) 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) From e79c0ef9988bd8e787999ae48254e93678c64d51 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Mar 2026 09:09:02 +0000 Subject: [PATCH 2/2] app_main: select external antenna via GPIO03/GPIO14 at startup Set GPIO03 low and GPIO14 high to route the RF switch to the U.FL connector on the XIAO ESP32-C6, enabling the external antenna for both BLE (commissioning) and IEEE 802.15.4 (Thread) operation. https://claude.ai/code/session_01SxqAiQApiRTwXefk9aQ6bR --- main/app_main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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.