Skip to content
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

Ifyoo V-one ( SHANWAN ? ) Controller doesn't send any buttons when in "xinput" mode ( mimicing xbox 360 controller ) #83

Open
tacchinotacchi opened this issue Aug 22, 2017 · 5 comments

Comments

@tacchinotacchi
Copy link

tacchinotacchi commented Aug 22, 2017

This controller is a weird beast. It seems like it's powered on, given the leds light up and it works in "directinput" mode ( though it doesn't support rumble and the triggers on the back are buttons rather then axes ). When you connect it it always presents itself with an unknown vendor and devices Ids, waits some time, enough to be recognized by the us, then switches to xbox 360 mode. It disconnects the previous interface and connects a new one, with the vendor and device ids of an xbox 360 controller. However, it doesn't send any inputs when initialized under linux. I analyzed the usb packets incoming and it doesn't even send them. It works when I plug it in on Windows, reboot ( the power stays on ) and use it in Linux. I suspect it tries to profile what system it is being connected to when it starts ( supports Windows, Android with OTG and PS3 ) and chooses how to behave, but it doesn't support non-Android linux distros. Not sure it's an xpad problem.

@Jigoku
Copy link

Jigoku commented Aug 13, 2018

Just got this controller, Same problem here...
Bus 011 Device 011: ID 045e:028e Microsoft Corp. Xbox360 Controller

@Jigoku
Copy link

Jigoku commented Aug 13, 2018

@tacchinotacchi
Did you ever analyse the usb packet data from a window machine? I wonder if there is a packet that the windows driver sends to the device to initialise it or something.

If it means anything, i just ran sdl2-jstest -r 0 which causes this controller to rumble whilst in Xinput mode. So the gamepad is able to receive packets on Linux whilst in Xinput mode... i am going to guess something needs to be sent to the controller before buttons will send any input back.

Testing input shows nothing; sdl2-jstest --test 0

There's also this:

$ sdl2-jstest --list
Found 1 joystick(s)

Joystick Name:     'Microsoft X-Box 360 pad'
Joystick GUID:     030000005e0400008e02000010010000
Joystick Number:    0
Number of Axes:     6
Number of Buttons: 11
Number of Hats:     1
Number of Balls:    0
GameController:
  Name:    'XInput Controller'
  Mapping: '(null)'

Could it be possible that the last line there may have something to do with it? Mapping: '(null)'

Edit: I did have a look at usb traffic with wireshark on a windows machine, but couldn't find anything obvious as to why no input occurs with this gamepad. Either way, i'm already packaging this up for a return to the seller, so won't be able to investigate further myself.

@tacchinotacchi
Copy link
Author

I too ended up returning it a week after, never figured out what was special about the packets it received from windows

@djurbloopers
Copy link

The fixcontroller.py script by dnmodder mentioned in #119 worked fine with a SHANWAN in X input mode.
That is, sending dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14) makes the gamepad work.

This particular model is a Trust GXT 540 Yula USB Wired Gamepad.

@Jigoku
Copy link

Jigoku commented Feb 10, 2019

djurbloopers That's the identical vendor/product id (idVendor=0x045e, idProduct=0x028e) i had previously with my SHANWAN device. Glad someone sussed that out. I am tempted to get another one of those controllers and see if that works for me. As it was a rather nice gamepad, despite it not working at the time.

Cheers for pointing that out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants