Gamepad not detected
-
I'm using an USB SNES Controller that I made myself with a PIC32 microcontroller. When EmulationStation starts on RetroPie it says no Gamepads are detected. I'm wondering what I can do to troubleshoot this?
The gamepad appears as /dev/input/js0 and when I use jstest all the buttons work as they should. The Gamepad has 8 buttons and a 2-axis Hat Switch. It's also worked as plug-and play on multiple Windows PCs.
Pi 3
5V USB micro power supply
RetroPie 4.1
SD Image on RetroPie website
USB Devices connected: USB HID Gamepad
Controller used: SNES-USB -
@Osirus please post the output of
udevadm info /dev/input/js0
(please wrap it in a codeblock - http://commonmark.org/help/) -
P: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0000:0001.0005/input/input1/js0 N: input/js0 E: DEVNAME=/dev/input/js0 E: DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0000:0001.0005/input/input1/js0 E: ID_BUS=usb E: ID_INPUT=1 E: ID_MODEL=SNES_Controller E: ID_MODEL_ENC=SNES\x20Controller E: ID_MODEL_ID=0001 E: ID_PATH=platform-3f980000.usb-usb-0:1.4:1.0 E: ID_PATH_TAG=platform-3f980000_usb-usb-0_1_4_1_0 E: ID_REVISION=0100 E: ID_SERIAL=My_Name_SNES_Controller E: ID_TYPE=hid E: ID_USB_DRIVER=usbhid E: ID_USB_INTERFACES=:030000: E: ID_USB_INTERFACE_NUM=00 E: ID_VENDOR=My_Name E: ID_VENDOR_ENC=My\x20Name E: ID_VENDOR_ID=0000 E: MAJOR=13 E: MINOR=0 E: SUBSYSTEM=input E: USEC_INITIALIZED=641332
-
create a file
/etc/udev/rules.d/99-gamepad.rules
with the contentSUBSYSTEM=="input", ATTRS{name}=="NAME OF DEVICE", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
replacing
NAME OF DEVICE
with the fullname - that will show indmesg
eghid-generic 0003:0583:2060.0006: input,hidraw2: USB HID v1.10 Joystick [USB,2-axis 8-button gamepad ] on usb-3f980000.usb-1.5/input0
in my case it would be
ATTRS{name}=="USB,2-axis 8-button gamepad "
-
Thanks, that worked.
ES still said "No Gamepads Detected" but when I held down a button on the SNES pad it showed its name and let me configure it.
Any possible reasons why I wasn't detected before creating the 99-gamepad.rules file? Here is the HID descriptor I use for the gamepad:
0x05,0x01, // USAGE_PAGE (Generic Desktop) 0x09,0x05, // USAGE (Game Pad) 0xA1,0x01, // COLLECTION (Application) 0x15,0x00, // LOGICAL_MINIMUM(0) 0x25,0x01, // LOGICAL_MAXIMUM(1) 0x35,0x00, // PHYSICAL_MINIMUM(0) 0x45,0x01, // PHYSICAL_MAXIMUM(1) 0x75,0x01, // REPORT_SIZE(1) 0x95,0x08, // REPORT_COUNT(8) 0x05,0x09, // USAGE_PAGE(Button) 0x19,0x01, // USAGE_MINIMUM(Button 1) 0x29,0x08, // USAGE_MAXIMUM(Button 8) 0x81,0x02, // INPUT(Data,Var,Abs) 0x05,0x01, // USAGE_PAGE(Generic Desktop) 0x25,0x07, // LOGICAL_MAXIMUM(7) 0x46,0x3B,0x01, // PHYSICAL_MAXIMUM(315) 0x75,0x04, // REPORT_SIZE(4) 0x95,0x01, // REPORT_COUNT(1) 0x65,0x14, // UNIT(Eng Rot:Angular Pos) 0x09,0x39, // USAGE(Hat Switch) 0x81,0x42, // INPUT(Data,Var,Abs,Null) 0x65,0x00, // UNIT(None) 0x95,0x01, // REPORT_COUNT(1) 0x81,0x01, // INPUT(Cnst,Ary,Abs) 0xC0
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.