I don't know if you can get the port number easily (or if it will be meaningful), but in a project I worked on we used the chips' serial number to differentiate between multiple chips present.
You can find the code here: https://github.com/OpenLightingProject/ola/blob/master/plugins/ftdidmx/FtdiWidget.cpp We used ftdi_usb_get_strings() - see line 143. HTH, Eli 2015-08-31 17:58 GMT+03:00 <[email protected]>: > I'm trying to figure out a way to find out which usb port a device is > connected to. I have mulitiple of the same type of FT2232H chips hooked > up. > libusb has this command libusb_get_port_numbers. but it takes a > libusb_device as an argument. > > I tried to use libusb_get_device((&ftdic)->usb_dev), but this gave me a > segfault. > > Any help would be extremely appreciated. > > > Bryan T. Richmond > Software Engineer > Environmental Sensors > > INFICON, Inc > 2 Technology Place > East Syracuse, NY 13057-9714 > > Phone: (315) 434-2559 > Fax: (315) 437-3803 > > E-Mail: [email protected] > Web: www.INFICON.com > > ********************************************************************** > NOTICE: - This message including any attachments is intended only for the > use of the designated recipient(s) named above and may contain confidential > information protected by law. If you are not the intended recipient, you > are hereby notified that any disclosure, copying, distribution, or the > taking of any action in reliance on the contents of this information is > strictly prohibited. If you have received this transmission in error, > please notify the sender immediately by e-mail and delete the original > message including any attachments. > *********************************************************************** > -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
