"O. Beaudoux" wrote:
> I want to build an application that can use multiple input devices at the
> same time (typically two HIDs) for special kind of interaction (research
> perspective), with the ability to detect new incoming devices.
> 
> All is ok to check for the last point (hot'plug) but I desesperatly try to
> find a way to get HID reports, using "get_report" for instance. In fact, I
> worry about how to get all "usb_device" pointers so I can call "get_report".

Your email is confusing me, but I think you are trying to solve the wrong
problem. If you want to know if a USB device exists, you can use the hotplug
system, or poll() on /proc/bus/usb/devices, or whatever.

If you want to know if a mouse exists, open() the device file
/dev/input/mouseX. If you have one mouse plugged in, it will be
/dev/input/mouse0. If you try to open() /dev/input/mouse1, it will fail if
there is only one, and will give you the file descriptor if you now have two.
And so on with /dev/input/mouse2, etc.

If you aren't really doing mice, but that was an example, you can do basically
the same thing with /dev/input/eventX.

And if your device isn't using a typical application for an input device, and
you really need to pull special reports,  you can use the raw HID device
(/dev/usb/hiddevX).

If you can explain exactly what you are trying to do (what the devices are,
what applications are used, what reports are generated, what time frame you
need to respond to plugging, etc) I may be able to help you some more.

Brad

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to