[libhid-discuss] Need API for identifying the port no to which the usb device is connected

shivaprasad javali jbsp72 at gmail.com
Wed Jun 25 11:49:26 UTC 2008


Thanks for all the info. Now i have figured out how to do it.. I got the bus
no from the hid itself and the port no by parsing the /proc/bus/usb/devces
file and combined the two to get a unique identifier for the usb port to
which my USB device is connected.

I have another question for you.

If I connect two USB devices to my machine, I need to loop to get all the
handles for the USB devices(right??). So I will have to call
hid_force_open() and the other calls in a  loop. How can I instruct  the
hid_force_open() call to pick up the next US B device ,  If it has already
got one of the handles.

Thanks
Shivaprasad



On Tue, Jun 24, 2008 at 5:18 PM, Charles Lepple <clepple at ghz.cc> wrote:

> On Jun 24, 2008, at 7:44 AM, shivaprasad javali wrote:
>
> > So the only way for me to get the port no the USB is attached to is
> > to parse the /proc/bus/usb/devices file(If it exists)??
>
> Read the reply from Peter Stuge about /sys/bus/usb/devices.
>
> Nothing is stopping you from using functions outside the libhid API.
>
> --
> Charles Lepple
> clepple at ghz.cc
>
>
> _______________________________________________
> libhid-discuss mailing list
> libhid-discuss at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss
>


More information about the libhid-discuss mailing list