fix(gateway): improve TP-UART configuration logging and handling for ETS device states

Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
Tony
2026-05-16 10:25:20 +08:00
parent 77fe8c1b02
commit f2b7dee8bd
3 changed files with 9 additions and 13 deletions
+7 -11
View File
@@ -2922,17 +2922,13 @@ bool GatewayKnxTpIpRouter::configureTpUart() {
std::to_string(config_.tp_uart.uart_port) + " tx=" +
UartPinDescription(config_.tp_uart.tx_pin, tp_uart_tx_pin_) + " rx=" +
UartPinDescription(config_.tp_uart.rx_pin, tp_uart_rx_pin_);
if (ets_device_ != nullptr && !ets_device_->configured()) {
ESP_LOGW(kTag,
"%s; continuing KNXnet/IP in commissioning-only IP mode so ETS can program the "
"device",
last_error_.c_str());
tp_uart_port_ = -1;
tp_uart_online_ = false;
return true;
}
ESP_LOGE(kTag, "%s", last_error_.c_str());
return false;
const bool configured = ets_device_ != nullptr && ets_device_->configured();
ESP_LOGW(kTag,
"%s; continuing KNXnet/IP in %s IP mode while TP-UART stays offline",
last_error_.c_str(), configured ? "configured" : "commissioning-only");
tp_uart_port_ = -1;
tp_uart_online_ = false;
return true;
}
const TickType_t startup_elapsed_ticks = xTaskGetTickCount() - startup_begin_tick;
if (startup_elapsed_ticks > 0) {
+1 -1
Submodule knx updated: c39e8cfc55...51bb6cdf6a
+1 -1
Submodule tpuart updated: 0dd32a4246...7510e616f9