wjwwood / serial

Cross-platform, Serial Port library written in C++
http://wjwwood.github.com/serial/
MIT License
2.13k stars 1.04k forks source link

SerialNumber read interface if available #201

Closed rahuldeo2047 closed 3 years ago

rahuldeo2047 commented 5 years ago

In case the serial is attached to the system and if a device which can provide vendor or product information; a method will allow users to enumerate all the serials and select the specified serial connection which has the given vendor and product ID associated. Information can be availed as follows:

VendorID ProductID DeviceID iSerialNumber

rahuldeo2047 commented 5 years ago

OK found usb_sysfs_friendly_name

will check it first.

wjwwood commented 3 years ago

Might be useful if it can be made to be portable. Closing for now, feel free to comment and I can reopen if needed.

rahuldeo2047 commented 3 years ago

I will get back to check. Unable to recall currently. Will check usb_sysfs_friendly_name as well. Aimed to select one serial interface when multiple same vid and pid connected and aimed to see if rest of the two did or serial number differed. And remained identifiable everytime. Thanks for the library.