8Bitdo Gamepad autoconfigs (udev)

8Bitdo Gamepad autoconfigs (udev) added to https://github.com/libretro/retroarch-joypad-autoconfig/tree/master/udev 8Bitdo Gamepad info, manuals and firmware downloads is found at http://8bitdo.com/

If RetroArch do NOT detect a controller when connected via Bluetooth and won’t even recognize manual binding, fix this by adding these udev rules to force detection - https://github.com/paalfe/mixedcontent/blob/master/udev_rules.d/99-8bitdo-bluetooth-controllers.rules. Add the udev rules file to “/etc/udev/rules.d/99-8bitdo-bluetooth-controllers.rules” and reboot.


sudo wget https://goo.gl/H2SViY -O /etc/udev/rules.d/99-8bitdo-bluetooth-controllers.rules ; 

1 Like

Thank you for this.

I have been trying like crazy to making work. I will test more tomorrow.

One question… How in the world can I reset my bindings? Through my testing I have made it so Z and X don’t do anything anymore.

Can I delete I file in Ubuntu that will reset the bindings and such to default? Once I know this I will have no fear exploring.

Any guidance would be fantastic.

PZ

[QUOTE=zoomy942;26518]Thank you for this.

I have been trying like crazy to making work. I will test more tomorrow.

One question… How in the world can I reset my bindings? Through my testing I have made it so Z and X don’t do anything anymore.

Can I delete I file in Ubuntu that will reset the bindings and such to default? Once I know this I will have no fear exploring.

Any guidance would be fantastic.

PZ[/QUOTE]

Delete or manually edit the RetroArch config file found at ~/.config/retroarch/reotrarch.cfg For RetroArch documentation: https://github.com/libretro/RetroArch/wiki/RGUI

Thank you!! Now I can experiment and not worry about breaking anything.

Side note, you mentioned manually configuring it. Is there a set of text I can copy and paste into my config that would configure the buttons on the 8bitdoNES?

PZ

Just to confirm - via USB it connects and works great.

Still working with bluetooth. Can’t seem to get the buttons to configure correctly.

PZ

[QUOTE=zoomy942;26551]Just to confirm - via USB it connects and works great.

Still working with bluetooth. Can’t seem to get the buttons to configure correctly.

PZ[/QUOTE]

  • What Ubuntu version are you using? Use the commands “uname -a” and “lsb_release -a” in a terminal and post the output. Should look something like this:
[B]$ uname -a[/B]
Linux pfk-XPS15-1 3.19.0-21-generic #21~14.04.1-Ubuntu SMP Sun Jun 14 18:45:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

[B]$ lsb_release -a[/B]
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID:    Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:    trusty
  • Do you have the 8Bitdo NES30 Gamepad? http://www.nes30.com/

  • Have you upgraded the firmware on the Gamepad to the latest version? http://www.nes30.com/firmware.html (requires Windows or MacOS, I flashed using Windows in a VirtualBox Virtual Machine, https://www.virtualbox.org/).

  • Have you tried connecting the Gamepad via Bluetooth using the START mode (powering on the gamepad by holding START, d-pad works as keyboard arrow keys) and the START+R mode (powering on the gamepad by holding START+R, d-pad works as joystick). 8bitdo NES30 manual is found at http://www.nes30.com/manual.html. The START+R mode came with 8Bitdo Gamepad firmware v2.5 (2014-11-05) - http://www.nes30.com/firmware.html.

  • When the NES30 Gamepad is connected, how do the Bluetooth connection window in Ubuntu look like? Should look something like this: https://mrkr.io/6IdSqJ3rkQ

  • When the NES30 Gamepad is connected, what info do you get when running “dmesg | grep -i 8bitdo” in a terminal? Please post the output from that command. Should look something like this:

[B]# If Bluetooth mode(START)[/B]
[306254.032450] input: 8Bitdo NES30 GamePad as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.0/bluetooth/hci0/hci0:256/0005:2820:0009.0012/input/input28
[306254.032729] hid-generic 0005:2820:0009.0012: input,hidraw5: BLUETOOTH HID v1.00 Keyboard [8Bitdo NES30 GamePad] on 28:b2:bd:78:cb:42

[B]# If Bluetooth mode(START+R)[/B]
[311516.208197] input: 8Bitdo NES30 GamePad Joystick as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.0/bluetooth/hci0/hci0:256/0005:2820:0009.001A/input/input36
[311516.208491] hid-generic 0005:2820:0009.001A: input,hidraw5: BLUETOOTH HID v1.00 Keyboard [8Bitdo NES30 GamePad Joystick] on 28:b2:bd:78:cb:42
  • Have you installed RetroArch from https://launchpad.net/~libretro/+archive/ubuntu/stable? Version 1.2.2 (you find the version number at the bottom left in RetroArch)?

  • Have you installed the package “retroarch-joypad-autoconfig”, what is the content of the folder “/usr/share/libretro/autoconfig/”? The folder should contain 77 files and the 8bitdo part of the files should look something like this: https://mrkr.io/6lQ50tMS1y

  • Install the package “jstest-gtk” and test the Gamepad with the jstest-gtk tool. Should look something like this: https://mrkr.io/dhUQHlUAtp

  • Do you have several Gamepads connected to the PC or only the 8Bitdo NES30 Gamepad?

  • For ReotroArch autoconfig to work there should be NO manual Gamepad bindings assigned in RetroArch, when the Gamepad is connected you should have Auto Gamepad bindings and the Keyboard bindings. Should look something like this in RetroArch > Settings > Input User 1 Binds: https://mrkr.io/dHteiBz3pL

You can reset the Gamepad bindings in RetroArch via RetroArch > Settings > Input > User 1 Bind Default All. https://mrkr.io/G4kX0TyOdu

When all the Input_player1_#_btn and _axis values in ~/.config.retroarch/retroarch.cfg is set to “nul”, then autoconfig will be used if autoconfig is enabled.

input_player1_b = "z"
input_player1_b_btn = "nul"
input_player1_b_axis = "nul"
input_player1_y = "a"
input_player1_y_btn = "nul"
input_player1_y_axis = "nul"
input_player1_select = "rshift"
input_player1_select_btn = "nul"
input_player1_select_axis = "nul"
input_player1_start = "enter"
input_player1_start_btn = "nul"
input_player1_start_axis = "nul"
  • Is RetroArch Autoconfig enabled, Bind Mode set to “RetroPad” and User 1 Device Type set to “RetroPad” in RetroArch > Settings > Input. https://mrkr.io/37DGZqBIXZ

I have the same problem. My SFC30 is auto-detected on Android and allows me to remap the buttons appropriately but on Linux only the D-pad works (I think it emulates the cursor keys by default). With auto-config enabled it doesn’t come up, no on-screen message (i.e. yellow font) to say it’s been detected, nothing happens when I hit a key. If I run jstest I can see events from all the buttons, so Linux is clearly reading them.

I would like to understand how this works a little better. Please let me know if there’s anything I can do to troubleshoot further.

[QUOTE=Modeler;27391]I have the same problem. My SFC30 is auto-detected on Android and allows me to remap the buttons appropriately but on Linux only the D-pad works (I think it emulates the cursor keys by default). With auto-config enabled it doesn’t come up, no on-screen message (i.e. yellow font) to say it’s been detected, nothing happens when I hit a key. If I run jstest I can see events from all the buttons, so Linux is clearly reading them.

I would like to understand how this works a little better. Please let me know if there’s anything I can do to troubleshoot further.[/QUOTE]

Post all info you get from checking/doing the things from my post #6 - http://libretro.com/forums/showthread.php?t=3649&p=26576&viewfull=1#post26576 I need info to be able to try to help you.

I use all the 8bitdo controllers on several Ubuntu installations on multiple hardware and with different architectures. I also got them working in Lakka now - http://libretro.com/forums/showthread.php?t=2347

Here’s what I’ve got:

[dan@IdeaPad-U310 ~]$ uname -a
Linux IdeaPad-U310 4.1.6-1-ARCH #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015 x86_64 GNU/Linux

[dan@IdeaPad-U310 ~]$ lsb_release -a
LSB Version:	1.4
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a

I’ve updated the autoconfig profiles, but it doesn’t pick up the pad at all, whether I use START or START+R:

[dan@IdeaPad-U310 ~]$ ls /usr/share/libretro/autoconfig/udev/8Bitdo-SFC30*
/usr/share/libretro/autoconfig/udev/8Bitdo-SFC30-GamePad-Bluetooth-Mode(START).cfg
/usr/share/libretro/autoconfig/udev/8Bitdo-SFC30-GamePad-Bluetooth-Mode(START+R).cfg

jstest-gtk shows all axes and buttons responding as expected. Any further help would be appreciated, thanks.

I have not used RetroArch on Arch Linux, I have only used RetroArch on Ubuntu Linux and Lakka (OpenElec).

  • Have you upgraded the firmware on the Gamepad to the latest version? You find the latest firmware at http://8bitdo.com/ (firmware upgrading procedure requires Windows or OSX).
  • After connecting the GamePad via Bluetooth, what info do you get when running “dmesg | grep -i 8bitdo” in a terminal?

Try adding these udev rules to “/etc/udev/rules.d/10-local.rules” and reboot.

# Add the ID_INPUT_JOYSTICK attribute to the device so SDL picks up on it
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SFC30 GamePad", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SFC30 GamePad Joystick", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"

The udev rules above is needed in Lakka (OpenElec) to make SDL pick up the GamePad(s), this may also be the case in Arch Linux. For the udev rules for all the 8Bitdo devices - http://libretro.com/forums/showthread.php?t=2347&page=3&p=27263&viewfull=1#post27263.

[QUOTE=paalfe;27446]Try adding these udev rules to “/etc/udev/rules.d/10-local.rules” and reboot.

# Add the ID_INPUT_JOYSTICK attribute to the device so SDL picks up on it
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SFC30 GamePad", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SFC30 GamePad Joystick", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"

The udev rules above is needed in Lakka (OpenElec) to make SDL pick up the GamePad(s), this may also be the case in Arch Linux. For the udev rules for all the 8Bitdo devices - http://libretro.com/forums/showthread.php?t=2347&page=3&p=27263&viewfull=1#post27263.[/QUOTE]

That’s it! Well done Sir, those udev rules - exactly as you pasted them here - got it working in both START and START+R modes. Thank you so much for this.

I’ve done some further digging so I might understand this in more detail. There’s an interesting page here: https://hg.libsdl.org/SDL/file/704a0bfecf75/README-linux.txt

sudo udevadm info --query=all --name=input/eventXX

If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don’t see it, you need to set up an udev rule to force this variable.

I wasn’t seeing that, so the information you provided makes perfect sense; it’s telling udev to mark the input device as a joystick so SDL knows to use it as such. It’s a tad obscure though and I don’t think I would have found this without your help, so thanks again. I owe you a pint.

Should I add those rules in Lakka’s rootfs?

That would be great, then it works out of the box in Lakka. Maybe you make it available via GitHub (https://github.com/libretro/Lakka) so I and others can add new/other Bluetooth devices?

Hi paalfe,

Should I add all these rules by default on Lakka?

(We’re not using SDL at all)

[QUOTE=Kivutar;31330]Hi paalfe,

Should I add all these rules by default on Lakka?

(We’re not using SDL at all)[/QUOTE]

OK, I believe the rule is not directly affecting SDL. The rule force udev to see the controllers as Joystick, which makes RetroArch see the controllers.

New beta FW out for Nes30/Nes30 Pro,SNES/SFC30 that could fix the SDL problems people have experienced…

http://forum.8bitdo.com/thread-588-1-1.html

[QUOTE=Rion;36625]New beta FW out for Nes30/Nes30 Pro,SNES/SFC30 that could fix the SDL problems people have experienced…

http://forum.8bitdo.com/thread-588-1-1.html[/QUOTE]

I have issues with this, lakka and bluetooth detect NES30 PRO Joypad but only works arrows and start button.

Buttons have been remapped with firmware v1.69 (2016-03-21), new config soon available.

Buttons have been remapped with firmware v1.69 (2016-03-21), new config soon available.

I understand very little of this, but I think this is on track with what I need… Trying to setup the mupen64plus emulator with my 8bitdo but once inside emulator only buttons that work are select and start to exit emulation. I know very little about Linux, command line, or mapping out buttons manually. thx for any advice