diff --git a/src/service.rs b/src/service.rs index ee17c00..c643315 100644 --- a/src/service.rs +++ b/src/service.rs @@ -5,7 +5,7 @@ use service_specific::*; fn main() -> Result<()> { let mut port = Port::open(SerialPortSettings { - baud_rate: 9600, + baud_rate: 57600, data_bits: DataBits::Eight, parity: Parity::None, stop_bits: StopBits::One, diff --git a/src/service_specific/port.rs b/src/service_specific/port.rs index 5f6bad1..5b072e1 100644 --- a/src/service_specific/port.rs +++ b/src/service_specific/port.rs @@ -68,13 +68,8 @@ impl Port { for available_port in available_ports.iter() { if let serialport::SerialPortType::UsbPort(usb_info) = &available_port.port_type { // check for the correct device - if let Some(product_name) = &usb_info.product { - if product_name == "FT232R_USB_UART" - && usb_info.vid == 0x0403 - && usb_info.pid == 0x6001 - { - return Ok(available_port.port_name.clone()); - } + if usb_info.vid == 0x0403 && usb_info.pid == 0x6001 { + return Ok(available_port.port_name.clone()); } } }