FengChendian / serial_port_win32

A flutter SerialPort library using win32 API.
BSD 3-Clause "New" or "Revised" License
30 stars 8 forks source link

Question: Is there any way I can get serial number, manufacturer name, PID and VID information. #13

Closed nirmalaranawat closed 1 year ago

nirmalaranawat commented 2 years ago

I am making an windows application which communicates with hardware connected over serial port ( via USB to Serial converter). I want to the application to connected to an com port automatically if it meets certain criteria (Serial number, Manufacturer ID etc.).

FengChendian commented 2 years ago

It's different from serial port communication. So I didn't implement it using dart.

If you can use C++:

Please see How to get USB vendor and product Id programmatically in c++ and win32 doc SetupDiEnumDeviceInfo

nirmalaranawat commented 2 years ago

Thank you for the links. I will explore C++ option as well as the lib serial port from flutter.

FengChendian commented 2 years ago

I will try to support the feature in next version. But I find that win32 package does't support function SetupDiGetDeviceInstanceIdW for now.

Please refer to issue