serialport / serialport-rs

A cross-platform serial port library in Rust. Provides a blocking I/O interface and port enumeration including USB device information.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto reconnect

thewh1teagle opened this issue · comments

How can I reconnect device after reconnect it to USB? (Windows / Linux)

How are you identifying your device in the first place? By its device file name?

If you can identify your device by VID, PID, manufacturer, product, serial number, ... then you could start watching for it reappearing by matching the SerialPortInfos returned by available_ports periodically.