You should really get this information in the same way that System
Profiler does -- by looking at the USB Service plane of the
IORegistry. Try using IORegistry Explorer found in
The location ID property is not intended to be anything more than a
unique identifier of USB devices attached to the system.
As for why you see multiple "root hubs", that is because the system
has multiple USB controllers, and each one has a root hub (which is
not a real USB device, and is simulated by the "OHCI Root Hub
simulation", or "EHCI Root Hub simulation"). On the new G5, you may
see as many as 5 USB controllers (or more if some PCI cards have been
USB Software Team
Apple Computer, Inc.
At 9:07 PM +0200 10/14/03, Rolf wrote:
I need to develop an application that displays the USB device tree.
As far as I can see the clue to figuring out the position of each
USB device in tree is looking at their location ID's (in hex string
format). Through experimentation I think I have figured out how to
do that but I
have a few questions:
1. Can I trust that the format of the location ID's will not change
in future versions of OS X ? Is it documented anywhere ?
2. How do I determine with 100% accuracy if a device at a given
location ID is a hub or not ? I guess one could search for the word
"Hub" in the product string but that seems a bit risky.
3. On my PowerBook G4 DVI I get two "OHCI Root Hub simulation" - one
at locationID 0x0000000 and the other at location 0x01000000. Why is