GameStick controller connects but input not recognized
-
Have a couple GameStick controllers I'd love to use with our RetroPie, but for some reason they won't play nice together.
I've paired one controller with the RetroPie (Raspberry Pi 3 Model B), and if I drop to the console I can see axes move and buttons trigger using jstest. But when the controller is configured, no button presses are recognized except the Home button (the big round center button) and the "Back" button. And these are detected as "Keyboard" for some reason.
Interestingly, when running jstest, both the Home and Back button don't show activity, except that an "@" character is displayed at the end of the jstest line.
What would cause the controller not to be recognized even if it successfully pairs via Bluetooth and jstest shows that the controller actually produces input events? Is there a config file that can be tweaked to recognize this thing? It pairs successfully, and is operational, with Android devices, so I figure there must be a way...
-
OK, so... can anyone point me to documentation about how, "under the hood", controllers are recognized by Emulation Station/RetroArch/whatever? Like I said, this thing pairs, and the Linux kernel is obviously seeing the inputs.
How does the software read events from controllers? Is there documentation? I'm willing to poke around but a little nudge in the right direction would save me quite a bit of time...
-
@ray-ingles I'm not familiar with gamestick controllers. But basically: you have the kernel level integration in Linux that you see results with jstest. When you configure controls through emulationstation, the generated ES config is parsed out into the retroarch configs and a few non retroarch systems as well.
This page talks a bit about controller heirarchy in retroarch specifically.
-
Well, I dug around the docs, and even manually created some configurations in "/opt/retropie/configs/all/retroarch-joypads", and an entry in "es_input.cfg" for the controller. It shows up in the Bluetooth settings as "GameStick Controller", so that's what I named it in the configuration files.
But no go. When I boot up the retropie and EmulationStation starts up, it still says "No Gamepads Detected", even though the controller is paired.
How does EmulationStation figure out what controllers are available? Do I have to dig into the code?
-
@ray-ingles ES uses SDL underneath, so the easiest way to test is to grab a program called
jstest-sdl
[*] (which is similar tojstest
mentioned in the docs) and see if your gamepad is detected by this program. -
@mitu - I've done some more digging. The GameStick doesn't seem to be recognized properly by the evdev system. Found some fun log messages via dmesg:
[ 15.328485] hid-generic 0005:0F0D:1011.0003: unknown main item tag 0x0 [ 15.328963] input: GameStick Controller as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:0F0D:1011.0003/input/input2 [ 15.330713] hid-generic 0005:0F0D:1011.0003: input.hidraw2: BLUETOOTH HID v7.07 Keyboard [GameStick Controller] on b8:27:eb:03:bd:7f
It appears that the "unknown main item tag" error (which, googling around, seems to be a bug), is causing the controller to be detected by evdev as a "Keyboard". Which, obviously, doesn't work so hot for controller stuff, since the various buttons don't seem to map to anything ES's controller setup recognizes as a button or axis.
I'm going to see if there's any kind of config option or something I can pass to allow this to work...
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.