martinling / libserialport

Unofficial personal repository for libserialport - see git://sigrok.org/libserialport for official repo
http://sigrok.org/wiki/Libserialport
GNU Lesser General Public License v3.0
65 stars 34 forks source link

fix iSerial on windows for composite devices #14

Closed facchinm closed 8 years ago

facchinm commented 8 years ago

USB composite devices can contain an ACM serial interface. On Windows, the correct iSerial descriptor field is assigned to the parent (composite) device instead than to the actual serial interface. A bogus value is returned if the serial interface is asked to provide the S/N. This patch provides a fallback for this kind of devices (tested on Android with adb + cdc gadgets and on Arduino Zero Programming Port)

martinling commented 8 years ago

Thanks Martino, I've merged this into my master branch with your comments above added to the commit message.

Spork-Schivago commented 8 years ago

Sorry to butt in here, but shouldn't the commit 6c96f3c actually say, "Port not opened" instead of "Port not open"? Wouldn't the ed at the end of open be proper English? If not, please disregard this message!

Thanks and keep up the great work!