Skip to content

Fix UART TCP Bridge issues #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions main/uart_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#if (USE_UART_BRIDGE == 1)

#ifdef CONFIG_IDF_TARGET_ESP8266
#define UART_BRIDGE_TX UART_NUM_0
#define UART_BRIDGE_RX UART_NUM_1
#define UART_BRIDGE_TX UART_NUM_1
#define UART_BRIDGE_RX UART_NUM_0
#elif defined CONFIG_IDF_TARGET_ESP32
#define UART_BRIDGE_TX UART_NUM_2
#define UART_BRIDGE_RX UART_NUM_2
Expand Down Expand Up @@ -302,11 +302,10 @@ void uart_bridge_task() {
} while (netbuf_next(netbuf) >= 0);
netbuf_delete(netbuf);
} else {
if (events.nc->pending_err == ERR_CLSD) {
continue; // The same hacky way to treat a closed connection
if (is_conn_valid) {
close_tcp_netconn(events.nc);
uart_bridge_reset();
}
close_tcp_netconn(events.nc);
uart_bridge_reset();
}
}
}
Expand Down
Loading