diff --git a/CHANGELOG.md b/CHANGELOG.md index 052c272..0ecadf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] ### Added + +* Add recommendation on how to interpret `UsbPortInfo::interface_number`. + [#219](https://github.com/serialport/serialport-rs/pull/219) + ### Changed * Switched from core-foundation-sys to core-foundation for more conveniently @@ -15,6 +19,9 @@ project adheres to [Semantic Versioning](https://semver.org/). ### Fixed +* Fix enumeration USB reported as PCI devices which do not have a (short) + serial number. + [#160](https://github.com/serialport/serialport-rs/pull/160) * Fix ignoring the status of several function calls into Core Foundation on mac OS. [#218](https://github.com/serialport/serialport-rs/pull/218) diff --git a/src/lib.rs b/src/lib.rs index 15e0457..79d0f37 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -787,7 +787,9 @@ pub struct UsbPortInfo { pub manufacturer: Option, /// Product name (arbitrary string) pub product: Option, - /// Interface (id number for multiplexed devices) + /// The interface index of the USB serial port. This can be either the interface number of + /// the communication interface (as is the case on Windows and Linux) or the data + /// interface (as is the case on macOS), so you should recognize both interface numbers. #[cfg(feature = "usbportinfo-interface")] pub interface: Option, } diff --git a/src/posix/enumerate.rs b/src/posix/enumerate.rs index 3feba2b..ad83c64 100644 --- a/src/posix/enumerate.rs +++ b/src/posix/enumerate.rs @@ -142,9 +142,6 @@ fn port_type(d: &libudev::Device) -> Result { let usb_properties = vec![ d.property_value("ID_USB_VENDOR_ID"), d.property_value("ID_USB_MODEL_ID"), - d.property_value("ID_USB_VENDOR"), - d.property_value("ID_USB_MODEL"), - d.property_value("ID_USB_SERIAL_SHORT"), ] .into_iter() .collect::>>();