How to know the USB port number?
I am using a USB hub with 7 downstream ports.
I am connecting 4 of the same devices(custom class device) on 4 ports.
I have a requirement to know to which physical port is a device connected, cause I have to number them accordingly in the application GUI.
I found an ioctl USBDEVFS_HUB_PORTINFO, in "usbdevice_fs.h" which does give me this information.
"hub_ioctl" does give us this information.
now I don't know how to call this ioctl from my application.
Do I have to make any provision in my device driver to talk to the hub driver? if so can anyone please explain me how do we do that.
I did google on this but it seems to be very trivial, so could not find any information.
Note: am using 2.6.22 on i.Mx21S target
Thanks in advance
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal
- New Products
- Users, Permissions and Multitenant Sites
- Flexible Access Control with Squid Proxy
- Security in Three Ds: Detect, Decide and Deny
- Solving ODEs on Linux
- Tighten Up SSH
- High-Availability Storage with HA-LVM
- DevOps: Everything You Need to Know
- Non-Linux FOSS: MenuMeters
- Android Candy: Bluetooth Auto Connect