[serial_proxy] Add USB_SERIAL port type and device identity (#19308)

Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
puddly
2026-10-07 19:05:07 +00:00
committed by GitHub
co-authored by J. Nick Koston J. Nick Koston Keith Burzinski
parent ae6ebd2d9d
commit 1c0d406cbb
21 changed files with 558 additions and 14 deletions
@@ -49,6 +49,7 @@ class SerialProxy {
uint32_t get_modem_pins() const { return 0; }
uint32_t get_configured_modem_pins() const { return 0; }
SerialProxyResult flush_port(api::APIConnection *api_connection) { return SerialProxyResult::SERIAL_PROXY_RESULT_OK; }
void send_identity(api::APIConnection *api_connection) {}
protected:
uint32_t instance_index_{0};
@@ -0,0 +1,30 @@
# A hardware UART port alongside the USB one, so the USB identity define is exercised on a
# port that has no USB channel
packages:
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
wifi:
ssid: MySSID
password: password1
api:
usb_host:
usb_uart:
- type: CDC_ACM
vid: 0x303A
pid: 0x831A
channels:
- id: usb_serial_channel
baud_rate: 460800
serial_proxy:
- id: serial_proxy_usb
uart_id: usb_serial_channel
name: USB Serial Port
port_type: USB_SERIAL
- id: serial_proxy_hw
uart_id: uart_bus
name: Hardware Serial Port
port_type: TTL