feat(gateway): enhance DALI and KNX handling with broadcast management support and configurable task stack size

Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
Tony
2026-05-27 21:06:58 +08:00
parent 6d0b36b60a
commit 078c37a20f
12 changed files with 338 additions and 27 deletions
+9
View File
@@ -1577,6 +1577,15 @@ config GATEWAY_DALI_BAUDRATE
help
Runtime baudrate used when initializing the local DALI bus.
config GATEWAY_CONTROLLER_TASK_STACK_SIZE
int "Gateway controller task stack bytes"
range 6144 24576
default 12288
help
Stack used by the gateway command controller. BLE bridge transport
requests are decoded in this task and may execute JSON-heavy bridge
management actions such as KNX programming-mode changes.
endmenu
menu "Connectivity Startup"
+6
View File
@@ -164,6 +164,10 @@
#define CONFIG_GATEWAY_ETHERNET_RX_TASK_STACK_SIZE 3072
#endif
#ifndef CONFIG_GATEWAY_CONTROLLER_TASK_STACK_SIZE
#define CONFIG_GATEWAY_CONTROLLER_TASK_STACK_SIZE 12288
#endif
#ifndef CONFIG_GATEWAY_BRIDGE_MODBUS_TASK_STACK_SIZE
#define CONFIG_GATEWAY_BRIDGE_MODBUS_TASK_STACK_SIZE 6144
#endif
@@ -978,6 +982,8 @@ extern "C" void app_main(void) {
ESP_ERROR_CHECK(s_cache->start());
gateway::GatewayControllerConfig controller_config;
controller_config.task_stack_size =
static_cast<uint32_t>(CONFIG_GATEWAY_CONTROLLER_TASK_STACK_SIZE);
const bool network_transport_supported = profile.enable_wifi || profile.enable_eth;
controller_config.setup_supported = true;
controller_config.ble_supported = profile.enable_ble;
+107 -12
View File
@@ -600,7 +600,7 @@ CONFIG_PARTITION_TABLE_MD5=y
#
# DALI Settings
#
CONFIG_GATEWAY_CHANNEL_COUNT=2
CONFIG_GATEWAY_CHANNEL_COUNT=1
#
# Gateway Channel 1
@@ -619,17 +619,78 @@ CONFIG_GATEWAY_CHANNEL1_NATIVE_BAUDRATE=1200
#
# Gateway Channel 2
#
CONFIG_GATEWAY_CHANNEL2_GW_ID=4
# CONFIG_GATEWAY_CHANNEL2_PHY_DISABLED is not set
CONFIG_GATEWAY_CHANNEL2_PHY_NATIVE=y
# CONFIG_GATEWAY_CHANNEL2_PHY_UART1 is not set
# CONFIG_GATEWAY_CHANNEL2_PHY_UART2 is not set
CONFIG_GATEWAY_CHANNEL2_NATIVE_BUS_ID=1
CONFIG_GATEWAY_CHANNEL2_NATIVE_TX_PIN=4
CONFIG_GATEWAY_CHANNEL2_NATIVE_RX_PIN=3
CONFIG_GATEWAY_CHANNEL2_NATIVE_BAUDRATE=1200
# end of Gateway Channel 2
#
# Gateway Channel 3
#
# end of Gateway Channel 3
#
# Gateway Channel 4
#
# end of Gateway Channel 4
#
# Gateway Channel 5
#
# end of Gateway Channel 5
#
# Gateway Channel 6
#
# end of Gateway Channel 6
#
# Gateway Channel 7
#
# end of Gateway Channel 7
#
# Gateway Channel 8
#
# end of Gateway Channel 8
#
# Gateway Channel 9
#
# end of Gateway Channel 9
#
# Gateway Channel 10
#
# end of Gateway Channel 10
#
# Gateway Channel 11
#
# end of Gateway Channel 11
#
# Gateway Channel 12
#
# end of Gateway Channel 12
#
# Gateway Channel 13
#
# end of Gateway Channel 13
#
# Gateway Channel 14
#
# end of Gateway Channel 14
#
# Gateway Channel 15
#
# end of Gateway Channel 15
#
# Gateway Channel 16
#
# end of Gateway Channel 16
#
# Gateway Cache
#
@@ -644,10 +705,11 @@ CONFIG_GATEWAY_CACHE_OUTSIDE_BUS_FIRST=y
# end of Gateway Cache
# CONFIG_GATEWAY_ENABLE_DALI_BUS is not set
CONFIG_GATEWAY_CONTROLLER_TASK_STACK_SIZE=12288
# end of DALI Settings
#
# Gateway Startup Services
# Connectivity Startup
#
CONFIG_GATEWAY_BLE_SUPPORTED=y
CONFIG_GATEWAY_START_BLE_ENABLED=y
@@ -661,6 +723,7 @@ CONFIG_GATEWAY_SMARTCONFIG_TIMEOUT_SEC=60
CONFIG_GATEWAY_ETHERNET_SUPPORTED=y
CONFIG_GATEWAY_START_ETHERNET_ENABLED=y
CONFIG_GATEWAY_ETHERNET_IGNORE_INIT_FAILURE=y
# end of Connectivity Startup
#
# Gateway Wired Ethernet
@@ -678,7 +741,15 @@ CONFIG_GATEWAY_ETHERNET_PHY_ADDR=1
CONFIG_GATEWAY_ETHERNET_RX_TASK_STACK_SIZE=4096
# end of Gateway Wired Ethernet
#
# Bridge Runtime
#
CONFIG_GATEWAY_BRIDGE_SUPPORTED=y
# end of Bridge Runtime
#
# Modbus Settings
#
CONFIG_GATEWAY_MODBUS_BRIDGE_SUPPORTED=y
# CONFIG_GATEWAY_START_MODBUS_BRIDGE_ENABLED is not set
CONFIG_GATEWAY_MODBUS_DEFAULT_TRANSPORT_TCP=y
@@ -686,8 +757,14 @@ CONFIG_GATEWAY_MODBUS_DEFAULT_TRANSPORT_TCP=y
# CONFIG_GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII is not set
CONFIG_GATEWAY_MODBUS_TCP_PORT=1502
CONFIG_GATEWAY_MODBUS_UNIT_ID=1
# end of Modbus Settings
#
# BACnet Settings
#
CONFIG_GATEWAY_BACNET_BRIDGE_SUPPORTED=y
# CONFIG_GATEWAY_START_BACNET_BRIDGE_ENABLED is not set
# end of BACnet Settings
#
# KNX Settings
@@ -737,6 +814,9 @@ CONFIG_GATEWAY_BRIDGE_KNX_TASK_STACK_SIZE=12288
CONFIG_GATEWAY_BRIDGE_KNX_TASK_PRIORITY=5
# end of KNX Settings
#
# Cloud Settings
#
CONFIG_GATEWAY_CLOUD_BRIDGE_SUPPORTED=y
# CONFIG_GATEWAY_START_CLOUD_BRIDGE_ENABLED is not set
CONFIG_GATEWAY_CLOUD_TOPIC_PREFIX="devices"
@@ -747,14 +827,29 @@ CONFIG_GATEWAY_CLOUD_LTE_UART_PORT=-1
CONFIG_GATEWAY_CLOUD_LTE_UART_TX_PIN=-1
CONFIG_GATEWAY_CLOUD_LTE_UART_RX_PIN=-1
CONFIG_GATEWAY_CLOUD_LTE_UART_BAUDRATE=115200
# end of Cloud Settings
#
# Bridge Task Settings
#
CONFIG_GATEWAY_BRIDGE_MODBUS_TASK_STACK_SIZE=6144
CONFIG_GATEWAY_BRIDGE_MODBUS_TASK_PRIORITY=4
CONFIG_GATEWAY_BRIDGE_BACNET_TASK_STACK_SIZE=8192
CONFIG_GATEWAY_BRIDGE_BACNET_TASK_PRIORITY=5
# end of Bridge Task Settings
#
# USB Setup
#
CONFIG_GATEWAY_USB_STARTUP_DEBUG_JTAG=y
# CONFIG_GATEWAY_USB_STARTUP_SETUP_SERIAL is not set
# end of USB Setup
#
# UART0 Control
#
# CONFIG_GATEWAY_485_CONTROL_ENABLED is not set
# end of Gateway Startup Services
# end of UART0 Control
#
# Gateway Network Services