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)??
And if that file is not present on a system what other options do I have?Are there any helpful API's in libusb possibly? Thanks Shivaprasad On Tue, Jun 24, 2008 at 5:10 PM, Charles Lepple <[EMAIL PROTECTED]> wrote: > 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 <[EMAIL PROTECTED]> > > 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 > > [email protected] > > http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss > > > > > -- > Charles Lepple > [EMAIL PROTECTED] > > > _______________________________________________ > libhid-discuss mailing list > [email protected] > http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss > _______________________________________________ libhid-discuss mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss

