|
From: Tim R. <ti...@pr...> - 2017-11-13 05:34:06
|
On Nov 12, 2017, at 12:38 PM, Martin Rys <spl...@gm...> wrote: > > I've decided to reverse a driver for the mouse I bought, and I got to > a point where I have a working VM with proprietary drivers I'm trying > to reverse and wireshark works to see what's happening on USB. There's really no need to reverse-engineer this. All USB mice work exactly the same, and all of the USB specifications are detailed and freely available. You can download the HID class spec fro the USB Implementor's Forum at www.usb.org <http://www.usb.org/> and learn exactly what your device is doing. What, exactly, are you hoping to do? There's really no opportunity to do anything fancy or innovative with a USB mouse. It does what the spec requires. There are no hidden capabilities. > My issue is that __I can only run this program while the device is not > passed through__, if I do I get what seems to be an IO error. I don't know what you mean by "not passed through". A USB device can only be claimed by one driver at a time. If some other driver owns your mouse, you can't have it. > libusb: error [submit_control_transfer] submiturb failed error -1 errno=16 That's EBUSY. It could mean that you are sending a control message aimed at one of the HID interfaces, and you have not claimed the HID interface. I don't see any calls to claim interfaces in your code at all. > I'd welcome any help or pointers on how to fix the issue so I can send > custom commands to the mouse while also having it work with the > proprietary drivers at the same time. Are you sure it uses proprietary drivers, and not the standard HID driver? Note that, in Linux, each device can be owned by only one driver. You can't have your driver AND have another driver still operate. — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |