Re: Getting a functional driver for Mad Catz Fightstick TE 2 (Xbox One version)

2016-03-08 Thread Silvan Jegen
On Tue, Mar 08, 2016 at 11:35:26AM -0800, Greg KH wrote:
> On Tue, Mar 08, 2016 at 08:15:26PM +0100, Silvan Jegen wrote:
> > Heyho
> > 
> > I bought a Mad Catz Fightstick TE2 for Xbox One because I wanted to play
> > some fighting games on Linux. I chose this stick because it has gotten good
> > reviews and I assumed that the Kernel driver should work because there are
> > already drivers for Xbox One controllers in drivers/input/joystick/xpad.c.
> > 
> > It turns out that the driver does not work and dmesg just shows
> > 
> > [12293.077720] usb 1-1.2.1: new full-speed USB device number 9 using 
> > ehci-pci
> > 
> > when plugging it in. Simply adding the line
> > 
> > { 0x0738, 0x4a01, "Mad Catz FightStick TE 2", 0, XTYPE_XBOXONE },
> > 
> > (where the two Hex values are VENDOR_ID and PRODUCT_ID) to xpad_device[]
> > in xpad.c does not help either (which I naively hoped it would).
> 
> Try asking this on the linux-in...@vger.kernel.org mailing list, the
> developers there should be able to help you out better than this one
> can.

Thanks, I will try that! I had a look at the mail archive of linux-input
before sending this one and thought the question may be too newbish...


Cheers,

Silvan


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Getting a functional driver for Mad Catz Fightstick TE 2 (Xbox One version)

2016-03-08 Thread Greg KH
On Tue, Mar 08, 2016 at 08:15:26PM +0100, Silvan Jegen wrote:
> Heyho
> 
> I bought a Mad Catz Fightstick TE2 for Xbox One because I wanted to play
> some fighting games on Linux. I chose this stick because it has gotten good
> reviews and I assumed that the Kernel driver should work because there are
> already drivers for Xbox One controllers in drivers/input/joystick/xpad.c.
> 
> It turns out that the driver does not work and dmesg just shows
> 
> [12293.077720] usb 1-1.2.1: new full-speed USB device number 9 using ehci-pci
> 
> when plugging it in. Simply adding the line
> 
> { 0x0738, 0x4a01, "Mad Catz FightStick TE 2", 0, XTYPE_XBOXONE },
> 
> (where the two Hex values are VENDOR_ID and PRODUCT_ID) to xpad_device[]
> in xpad.c does not help either (which I naively hoped it would).

Try asking this on the linux-in...@vger.kernel.org mailing list, the
developers there should be able to help you out better than this one
can.

good luck,

greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Getting a functional driver for Mad Catz Fightstick TE 2 (Xbox One version)

2016-03-08 Thread Silvan Jegen
Heyho

I bought a Mad Catz Fightstick TE2 for Xbox One because I wanted to play
some fighting games on Linux. I chose this stick because it has gotten good
reviews and I assumed that the Kernel driver should work because there are
already drivers for Xbox One controllers in drivers/input/joystick/xpad.c.

It turns out that the driver does not work and dmesg just shows

[12293.077720] usb 1-1.2.1: new full-speed USB device number 9 using ehci-pci

when plugging it in. Simply adding the line

{ 0x0738, 0x4a01, "Mad Catz FightStick TE 2", 0, XTYPE_XBOXONE },

(where the two Hex values are VENDOR_ID and PRODUCT_ID) to xpad_device[]
in xpad.c does not help either (which I naively hoped it would).

I realized that the stick does not conform to the USB HID interface
after looking more closely at the lsusb -v output (pasted below).


Bus 001 Device 007: ID 0738:4a01 Mad Catz, Inc. 
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass  255 Vendor Specific Class
  bDeviceSubClass   255 Vendor Specific Subclass
  bDeviceProtocol   255 Vendor Specific Protocol
  bMaxPacketSize064
  idVendor   0x0738 Mad Catz, Inc.
  idProduct  0x4a01 
  bcdDevice0.34
  iManufacturer   1 MADCATZ
  iProduct2 FIGHTSTICK
  iSerial 3 BCA2F0E774D2
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   32
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0xa0
  (Bus Powered)
  Remote Wakeup
MaxPower  200mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   2
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass 71 
  bInterfaceProtocol208 
  iInterface  0 
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01  EP 1 OUT
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   4
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   4
Device Status: 0x0002
  (Bus Powered)
  Remote Wakeup Enabled


The Fightstick seems to use a "Vendor Specific Class" and not the HID
interface.

The device is relatively simple having only about 10 buttons and a digital
stick and the Xbox One driver for Windows works for it so xpad.c should
be able to deal with it I assume. Worst case I would have to reverse-
engineer the USB protocol it uses on my Window installation though I
hope that will not be necessary given that the much more sophisticated
Xbox One controller works on Linux already.

What I would like to know is if it is possible to use the xpad.c
infrastructure in this case and maybe some pointers on where to go from
here (I have looked at [0],[1] and [2] but want to check if somebody
has dealt with a similar case already and can give me a hint). Thanks!


Cheers,

Silvan

[0] 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/input?id=refs/tags/v4.5-rc7
[1] https://lwn.net/Kernel/LDD3/
[2] 
http://matthias.vallentin.net/blog/2007/04/writing-a-linux-kernel-driver-for-an-unknown-usb-device/


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies