-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
joysticks? #53
Comments
This definitely sounds familiar. I think the problem is that we pass most control messages straight through to the device apart from some special cases. Perhaps setting the configuration should be changed from a message that is passed through to the device to a call to libusb_set_configuration() ? For that, you will probably want to start looking in Plugins/Devices/DeviceProxy_Libusb.cpp (or whatever the file is called, I forget) |
For what it's worth all -x really does (at least when I first wrote it) is But other than that it doesn't do anything special. Setup and data
|
Thanks @dominicgs and @palesius. I think I know where to look. And now I get what -x is doing to boot. @palesius, when you last used -x with a 360 controller: what was your host type? e.g. windows? osx? Also could you guess the date or sha1 of this repo where you last tested? |
I've tested with a windows 7 host on master -- works like a charm. I think the problem is limited to Linux. |
Host was an xbox. And as I said the -x only really matters if you are
|
It might be worth running it with logging on for both windows and linux and
|
Thanks again, @palesius . Yeah I've been comparing usbmon pcaps of direct-connect to Linux and USBProxy'd ; the difference is a SET CONFIGURATION response URB Status: of -2 (ENOENT) in the USBProxy'd case. I haven't looked at a pcap of the windows case yet but I agree it should be enlightening. |
It definitely sounds like we need to do something more sensible with the set_configuration() call instead of passing it through. I'd be interested in the usbmon output when you proxy to a Windows host. My guess for why they are different is that Linux is explicitly setting the configuration while Windows probably sees that it's the active configuration and doesn't bother. Otherwise we ought to see the same error appear when proxying to a Windows host. I don't have any hardware that causes this sort of error, although I've heard of it happening before. Are you able to tell us the model of joystick that you're using? |
@dominicgs -- I'll try to get around to the windows pcap -- but I'll be honest with you: windows as a host isn't my rountine so it isn't going to be happening at a high priority. Of course I can say the joystick types :) Xbox 360, Xboxone and "TigerGame PS/PS2 Game Controller Adapter" / "ID 6666:8802 Prototype product Vendor ID SmartJoy Dual Plus PS2 converter". |
resolves issue usb-tools#53 for me; however, it's probably not a full solution since it doesn't cause any libusb_set_configuration() calls on the device proxy at all.
I'm going to close this as there hasn't been a response in a while, but please re-open this issue or open a new one if you still need assistance. |
I've tried usb-mitm with a couple different types of USB joysticks; with host and device proxy both on the BBB (using the release image) and with device proxy on BBB and host proxy on a PC; the result is so far always the same. The host (always linux in my setup) enumerates the proxied joystick device but then fails to create an input device; dmesg shows
I also tried using a userspace (libusb-based) driver for the joystick on the host; but that program fails to claim the interface
I can see that USBProxy has worked with joysticks since the -h output shows -x for Xbox360 support.
I'm happy to dig into this and likely (hopefully?) can fix it myself. Any ideas where I should start?
The text was updated successfully, but these errors were encountered: