mirror of
https://github.com/esphome/esphome.git
synced 2026-10-04 18:11:29 +00:00
[serial_proxy] Add USB identity query for USB-bridged ports
Add SERIAL_PROXY_PORT_TYPE_USB_SERIAL, derived automatically when a port's uart_id resolves to a usb_uart channel (never set by the user), and a SerialProxyGetUsbInfoRequest/Response pair (IDs 153/154) that reads VID/PID/bcdDevice and the manufacturer/product/serial strings live from the descriptors the USB host stack caches, so a client can identify the attached device before subscribing. Ports that are not USB_SERIAL answer NOT_SUPPORTED; an unplugged device answers with connected=false. ZigbeeProxyRequest moves to ID 155 (expected merge order: set_mode, USB info, zigbee).
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
api:
|
||||
|
||||
usb_host:
|
||||
|
||||
# port_type is omitted deliberately: a port on a USB UART channel derives USB_SERIAL
|
||||
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
|
||||
@@ -21,7 +21,6 @@ serial_proxy:
|
||||
- id: zigbee_usb_serial
|
||||
uart_id: zigbee_usb_channel
|
||||
name: Zigbee
|
||||
port_type: TTL
|
||||
|
||||
zigbee_proxy:
|
||||
serial_proxy_id: zigbee_usb_serial
|
||||
|
||||
Reference in New Issue
Block a user