On 2012.07.17 22:13, Markus wrote: > While information about the host controller itself is not accessible > via libusbx, the root hub can be enumerated and queried for its > VID/PID (which is identical to the HC make and model).
That latter part is only true on Windows I'm afraid... In libusb and libusbx, Linux, OS-X and Windows currently all return different VID:PID for root hubs. Using a multiboot test platform, I can for instance tell you that the same root hub will return the following VID:PID through libusbx: - Linux 1d6b:0002 (1d6b = Linux Foundation) - OS-X 05ac:8005 (05ac = Apple) - Windows 8086:2836 (8086 = Intel) It's only Windows that tries to carry forward the VID from the HC manufacturer, and in early version of libusb/Windows, we were actually duplicating the Linux VID:PID for root hubs, before considering that Windows users might probably wonder about that... > Constructing > a device tree (including manufacturer and device names) from the > root is thus trivial when using the information returned by > libusb_get_port_path(). Except it won't be consistent across platforms, and we would probably have to go out of our way on Linux and OS-X to make the root hub VID match the HC VID... > I'd definitely deem it a valuable thing being able to retrieve > this information in the same way on all supported operating > systems BTW. The only promise libusbx can make here is that, when we have choice in a backend, we will attempt to pick the one that brings us closer to what the other backends seem to do (thus if we have a choice between using 255 or 1 for the libusbx device number for root hubs, and other platforms appear to use 1, we should probably try to use 1 as well). But that still doesn't mean all platforms will behave the same with regards to data items that don't really come from the USB specs, but from disparate OSes (or even the same OS between 2 sessions). Regards, /Pete ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel