[libhid-discuss] Need API for identifying the port no to which the usb device is connected
Charles Lepple
clepple at ghz.cc
Tue Jun 24 11:40:02 UTC 2008
On Jun 24, 2008, at 12:52 AM, shivaprasad javali wrote:
> Hi,
>
> The location being printed there is the busnumber/
> devicefilename. While this might be useful for me I am looking for
> a way for me to get the port no of the usb device. When I look at
> the file /proc/bus/usb/devices I get a port no field for each usb
> device there . Thats the port no I want to know about my USB
> device. Is ther any way to get that port no.
/proc/bus/usb/devices is not available on all systems (especially
systems where the usbdevfs is mounted at /dev/bus/usb instead).
Since there is no libusb API for this, I don't plan on adding one to
libhid.
> On Mon, Jun 23, 2008 at 5:43 PM, Charles Lepple <clepple at ghz.cc>
> wrote:
> On Jun 23, 2008, at 6:49 AM, shivaprasad javali wrote:
>
> > The usb device that I am working with doesnot have a unique
> > serial no
> > for each usb device. So I have to use the port no of the port it is
> > connected to identify the device uniquely. Is there an API in
> > libhid that I
> > can use to get port no?
>
>
> Look in src/hid_presentation.c for hid_write_identification() - it
> prints a "location" which should probably work for your needs.
>
> --
> Charles Lepple
>
>
>
>
> _______________________________________________
> libhid-discuss mailing list
> libhid-discuss at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss
>
--
Charles Lepple
clepple at ghz.cc
More information about the libhid-discuss
mailing list