Homepage Forums RetroPie Project Controller Configuration in RetroPie The old story… setting up 2x 8BitDo NES30 Bluetooth

Viewing 35 posts - 1 through 35 (of 57 total)
  • Author
    Posts
  • #104050
    johnnygossamer
    Participant

    (Had this posted in the Getting Started forum but realized it might be more appropriate here).

    So, I have Retropie 3.0 running on a Raspberry Pi 2. My wife bought me two 8BitDo NES30 controllers for my birthday last week so we can play together. We want to utilize the controllers’ bluetooth capabilities because our couch is some distance from our TV, too long to use with the USB cables comfortably, and I want to put the Pi on the back of the TV with some velcro dots or 3M Command strips so it’s out of sight when not in use.

    I am at my wit’s end trying to get the controllers set up. There is no shortage of articles and forum threads about this topic, and I have read every one I can find, and none of them bring me any closer to success. Most of them are at least several months old and all seem to differ in the configuration options described compared to what I see on my Pi.

    This was the most promising looking tutorial I found: http://forum.8bitdo.com/thread-328-1-1.html Until I get to the step requiring “317 Register RetroArch Controller,” which seems to no longer exist in RetroPie Setup (317 is now something completely different). Nevertheless I managed to get one controller connected using this tutorial in gamepad mode, but then only the D-pad is recognized in the EmulationStation configuration and none of the buttons, or I got it connected in keyboard mode with Start+B but then only the buttons are recognized and not the D-pad. Then for no apparent reason it stopped connecting at all, which brings me to where I am now, which is the point where I throw up my hands and accept that I have to ask for some help.

    All I want is:

    1: To be able to connect both of my NES30 gamepads to my Pi so my wife and I can play together.

    2: For both controllers to auto-connect when I press the appropriate button or buttons (Start, Start+B, Start+B+R, whatever, as long as it’s reliable)

    3: To not have to muck around with the console ever again once I complete the initial setup of the two controllers.

    Is this possible? It must be. It doesn’t seem like I’m asking for that much.

    I’m sorry for the long-winded, ranty post but I just wanted to make it clear I’ve read I’m not asking for help before trying my level best to get this done on my own. Is there anybody here who has achieved the three goals above and done it recently who would be so kind as to give me a detailed rundown of the steps they took? I would be forever grateful, and my wife would be more so since it would save her birthday present to me from being a bit of a bust.

    I have this JBtek Bluetooth adapter: http://www.amazon.com/gp/product/B00L08NCPQ?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00 Both of my controllers are updated to the latest firmware.

    #104144
    retrotk
    Participant

    Subscribing. I have the same configuration and desire.

    But I’m hoping that I learn enough that I can add PS3 or xbox360 controllers to the mix.

    #104170
    bunglenutter
    Participant

    I managed to get one of these controllers to connect to the Pi over Bluetooth after a couple of evenings of frustration, but now I have an issue where in the initial controller configuration the d-pad is recognised as a keyboard input and the buttons are recognised as the NES30 gamepad.

    I noticed that on the 8bitdo firmware updates section that in firmware version 2.52 they had addressed the issue of d-pads being registered as keyboard arrows, but it would seem that this is not the case. Personally I think it is a firmware issue that has not been adequately addressed, but I’m willing to be proven wrong.

    I might be able to help you connect the thing over bluetooth (if you haven’t sussed that out already), but I wouldn’t be able to solve the issue I’m having for you, if you indeed come across it yourself.

    #104173
    johnnygossamer
    Participant

    Bunglenutter,

    I’ll take any advice I can get, getting the controllers to reliably connected via Bluetooth is more progress than I’ve made so far.

    Does the issue you run into prevent you from successfully binding all of the controller inputs and playing?

    #104174
    bunglenutter
    Participant

    I’ll get back to you once I’ve revisited what I did, it might be a while as I won’t be near my pi for a while. Someone else might get to you before I do!

    In terms of the bindings I pretty much gave up when I got the keyboard issue and didn’t take it any further, for now at least.

    #104182
    herbert42
    Participant

    I think your solution is found in the setup guide for the NES30 controllers:
    http://forum.8bitdo.com/thread-328-1-1.html

    I had the same problem, till I followed the setup to the letter. You need to configure the controller twice. Once for the dpad first, then a second time for the remaining keys.

    <quote>
    reboot your raspberry pi

    While loading hold start on your controller to turn it back on

    your blue light should go solid when you get into emulation station

    it should ask to setup a controller. ( if not use the a usb keyboard hit enter to open the options and config controller)

    Hold down on the Dpad (it should say keyboard)

    Only set UP, DOWN, LEFT, RIGHT

    Skip A, B, START, SELECT, LEFT BUMPER, RIGHT BUMPER

    then hit ok

    Now reopen the controller config and hold A (should say 8Bitdo NES30 GamePad)

    skip UP,DOWN, LEFT, RIGHT ( you should be able to use your down arrow on your Dpad to skip them)

    Set A, B, START, SELECT, LEFT BUMPER, RIGHT BUMPER

    then hit ok and you should have a working controller.
    </quote>

    #104186
    bunglenutter
    Participant

    See I tried that but I had an issue where certain buttons can’t be skipped which led to confusion. I’ll maybe try it again.

    #104188
    bunglenutter
    Participant

    Here’s what I did to get my controller to connect over bluetooth:

    – Make sure controller firmware is up to date.

    – Connect dongle to Pi and switch on, press F4 to go to command line after RetroPie has loaded.

    – Follow step 1 in this tutorial exactly: link

    – Skip step 2 in that tutorial and go on to step 3. I believe I turned my NES30 controller on in normal mode (hold START for 3 secs) before performing the hcitool scan. The Pi may ask you at a certain point during step 3 for a PIN, just type 0000, but you shouldn’t need to press anything on the controller. If it doesn’t work with the controller in normal mode, try it in keyboard mode (START + B).

    You “should” have the thing connected now. If you switch off your controller and reboot the Pi, once the OS has finished loading and asks for a controller config you should be able to switch the controller on in normal mode and it should connect (solid blue light). However you might then have the keyboard conflict issue that I have. Try what herbert42 said and see if that works out for you.

    #104217
    johnnygossamer
    Participant

    [quote=104182]I think your solution is found in the setup guide for the NES30 controllers:
    http://forum.8bitdo.com/thread-328-1-1.html

    I had the same problem, till I followed the setup to the letter. You need to configure the controller twice. Once for the dpad first, then a second time for the remaining keys.

    <quote>
    reboot your raspberry pi

    While loading hold start on your controller to turn it back on

    your blue light should go solid when you get into emulation station

    it should ask to setup a controller. ( if not use the a usb keyboard hit enter to open the options and config controller)

    Hold down on the Dpad (it should say keyboard)

    Only set UP, DOWN, LEFT, RIGHT

    Skip A, B, START, SELECT, LEFT BUMPER, RIGHT BUMPER

    then hit ok

    Now reopen the controller config and hold A (should say 8Bitdo NES30 GamePad)

    skip UP,DOWN, LEFT, RIGHT ( you should be able to use your down arrow on your Dpad to skip them)

    Set A, B, START, SELECT, LEFT BUMPER, RIGHT BUMPER

    then hit ok and you should have a working controller.
    </quote>

    [/quote]

    Yes, this is the same guide I said I tried in the first post of the thread.

    I decided to try it again but once again, that guide appears to be somewhat out of date. 317 in RetroPie setup is no longer “Register RetroArchController.” It’s “Install RetroArch Joypad Autoconfigs.” I did that and it scrolls through a long list of what appears to be config files for various different gamepads and then drops me back to the setup menu.

    #104220
    bunglenutter
    Participant

    Is it not KeyboardDisplay you search for as opposed to DisplayKeyboard?

    #104222
    johnnygossamer
    Participant

    [quote=104220]Is it not KeyboardDisplay you search for as opposed to DisplayKeyboard?

    [/quote]

    Yep, that was my mistake. Still run into a problem at the stage of actually configuring the controller though (see edited post above, sorry I edited while you were replying).

    #104225
    bunglenutter
    Participant

    So you’re at the same place as me then? Let me know if you solve it!

    #104226
    johnnygossamer
    Participant

    [quote=104225]So you’re at the same place as me then? Let me know if you solve it!

    [/quote]

    Nope. I don’t even get as far as you. See above.

    Also, if I forge ahead to the step where I’m supposed to enter

    cd /opt/retropie/emulators/retroarch/configs

    I get

    -bash: cd: /opt/retropie/emulators/retroarch/configs: No such file or directory

    …and my controller, while it was connected with a solid blue light before, has now turned itself off, and does not reconnect when I turn it back on again by holding Start.

    Like I said, the guide by NinjaJoey, while detailed, does not appear to match up with what goes on in the stable 3.0 release of Retropie.

    #104229
    bunglenutter
    Participant

    Sorry I misread you. I don’t believe I needed to modify the config in the end but it definitely existed, and I’m on version 3 also. I’ll maybe take another look when I get home.

    #104242
    bunglenutter
    Participant

    Did you go through the Adafruit tutorial that I suggested?

    #104279
    hlashbrooke
    Participant

    I have the same problem with the 8bitdo NES30 controllers and the same bluetooth dongle – I have 2 controllers, but just trying to get one connected first.

    I have OSMC installed with RetroPie installed alongside it.

    I cannot install bluez-utils – it tells me to use bluetoothctl instead, which works just fine to pair and connect with the controller, so there’s no problem there I don’t think.

    But when I follow that same guide that you linked to I get this message after attempting to create the .cfg file from the RetroPie setup:

    The configuration file has been saved as '/opt/retropie/configs/all/retroarch-joypads/.cfg' and will be used by RetroArch from now on whenever that controller is connected.

    It then creates the retroarch-joypads folder, but it is empty. I’m not sure what that means to be honest, so if you work this out then please share your solution here :)

    #104283
    bunglenutter
    Participant

    I’d be interested to know if it would work for you if you had a go at the Adafruit tutorial I posted previously: https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/linux-e-dot-g-raspberry-pi

    Seems odd that you can’t install bluez.

    #104289
    hlashbrooke
    Participant

    I seem to have bluez installed, but I cannot install bluez-utils. I get this message when I try to do so:

    Package bluez-utils is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
      bluez
    
    E: Package 'bluez-utils' has no installation candidate

    So I don’t have the bluez-simple-agent utility or anything like that. I can, however, successfully use bluetoothctl to pair and connect with bluetooth devices with no problems.

    So all of that means that I cannot access /usr/bin/bluez-simple-agent as it does not exist on my Pi and I cannot install it. I’m not sure if this has anything to do with the fact that I am running RetroPie alongside OSMC.

    #104311
    johnnygossamer
    Participant

    [quote=104242]Did you go through the Adafruit tutorial that I suggested?

    [/quote]

    Yes, I did it today. At the step where we need to make the controller a trusted device it returns the error you can see in the picture below (sorry I didn’t know how to copy the text from Putty).

    [attachment file=”putty does not exist.jpg”]

    #104327
    bunglenutter
    Participant

    [quote=104289]I seem to have bluez installed, but I cannot install bluez-utils.
    [/quote]

    Looks like my usefulness has been exhausted with yourself then :S In fairness I’m only running RetroPie by itself so yeah it might be some conflict there.

    [quote=104311]
    Yes, I did it today. At the step where we need to make the controller a trusted device it returns the error you can see in the picture below (sorry I didn’t know how to copy the text from Putty).
    [/quote]

    It might be because you tried to set up the controller with a different method, leading to a conflict? If it were me I would start over with a new image.

    #104332
    johnnygossamer
    Participant

    [quote=104327]

    I seem to have bluez installed, but I cannot install bluez-utils.

    Looks like my usefulness has been exhausted with yourself then :S In fairness I’m only running RetroPie by itself so yeah it might be some conflict there.

    Yes, I did it today. At the step where we need to make the controller a trusted device it returns the error you can see in the picture below (sorry I didn’t know how to copy the text from Putty).

    It might be because you tried to set up the controller with a different method, leading to a conflict? If it were me I would start over with a new image.

    [/quote]

    Perhaps. I am getting sort of tired of flashing new clean installs of Retropie over and over, though. Thinking of maybe setting the whole thing aside for a time (a long time) until proper Bluetooth functionality is built in.

    #104333
    bunglenutter
    Participant

    To be honest I regret buying the thing, should have just gotten a cheaper wired USB SNES controller instead.

    #104336
    johnnygossamer
    Participant

    Well the NES30 should still work fine connected with its USB cable, right?

    #104370
    bunglenutter
    Participant

    It does but the cable’s not long enough for what I need. The wired SNES controller would have been less expensive!

    #104375
    kingchili
    Participant

    I struggled with the same issue setting up the buttons to be able to navigate in emulationstation until I finally realized it would be much easier to manually edit the cfg file. The file is located at: /home/pi/.emulationstation/es_input.cfg
    I uploaded my cfg file here, if anyone wants to try to copy it over theirs
    I have the snes30 and nes30, it works for both. I connect my controller in joystick mode, just holding start to turn on.

    #104511
    grizzlema
    Participant

    First off i would like to thank NinjaJoey’s post over at http://forum.8bitdo.com/thread-328-1-1.html

    @kingchili
    for the use of his es_input.cfg

    I have beat my head against a wall on this for about 2 days and these are the step I took with Retropie v3.0 final. I have uploaded my es_input.cfg,8BitdoNES30Gamepad.cfg, retroarch.cfg (controllers.rar)
    I would make backups of your current es_input and retroarch configs and over write them with the ones i uploaded to save yourself from doing a lot of editing.The biggest thing is getting the bluetooth mac addresses and registering them. I have tested the controllers in Super Dodge Ball and both worked great. Make sure you back up the files you edit incase something goes wrong, or risk reloading your image.

    Make sure you have updated your controllers firmware( at the time of posting 2.62)

    Raspberry Pi2
    RetroPi 3.0
    Kinivo BTD400 bluetooth adapter
    All commands were done through putty to ensure only the BT dongle was plugged into the Pi
    File transfers were done using WinSCP

    es_input.cfg goes here: /home/pi/.emulationstation/
    retroarch.cfg goes here: /opt/retropie/configs/all/
    8BitdoNES30Gamepad.cfg goes here: /opt/retropie/configs/all/retroarch-joypads

    1. sudo apt-get update

    2. sudo nano /usr/bin/bluez-simple-agent
    Once in you need to look for ‘KeyboardDisplay’ (search for it by crtl+w) and change it to ‘DisplayYesNo’
    Now hit Ctrl + x, y, enter to save it

    3. sudo reboot

    4. Make sure your dongle is plugged in and see if it is working
    lsusb

    5. To check your device number (mine was hci0)
    hcitool dev

    6. HOLD START on your NES30 controller for 3 secs until it comes on ( YES, just START )

    7. hcitool scan (get the MAC address of the controller)
    *You will see xx:xx:xx:xx:xx:xx “8Bitodo NES30 GamePad”

    8. sudo bluez-simple-agent hci0 xx:xx:xx:xx:xx:xx

    9. sudo bluez-test-device trusted xx:xx:xx:xx:xx:xx yes(dont forget the yes)

    10. Verify it was added (should return only a “1”, if “0” start over at step 6)
    sudo bluez-test-device trusted xx:xx:xx:xx:xx:xx

    11. sudo bluez-test-input connect xx:xx:xx:xx:xx:xx
    **Now you should have a solid blue light**

    12. I changed the retroarch.cfg (if you used the one i uploaded you can skip this)

    sudo nano /opt/retropie/configs/all/retroarch.cfg

    Now Look for

    input_player1_left = left
    input_player1_right = right
    input_player1_up = up
    input_player1_down = down

    These should be under keyboard.

    Now change them to:

    input_player1_left = nul
    input_player1_right = nul
    input_player1_up = nul
    input_player1_down = nul

    and at the end of the file add this: ( all the way to the bottom )

    # Player 1
    input_player1_a_btn = “11”
    input_player1_b_btn = “12”
    input_player1_y_btn = “15”
    input_player1_x_btn = “14”
    input_player1_start_btn = “22”
    input_player1_select_btn = “21”
    input_player1_l_btn = “17”
    input_player1_r_btn = “18”
    input_player1_left_btn = “2”
    input_player1_right_btn = “3”
    input_player1_up_btn = “0”
    input_player1_down_btn = “5”

    # Player 2
    input_player2_a_btn = “11”
    input_player2_b_btn = “12”
    input_player2_y_btn = “15”
    input_player2_x_btn = “14”
    input_player2_start_btn = “22”
    input_player2_select_btn = “21”
    input_player2_l_btn = “17”
    input_player2_r_btn = “18”
    input_player2_left_btn = “2”
    input_player2_right_btn = “3”
    input_player2_up_btn = “0”
    input_player2_down_btn = “5”

    input_enable_hotkey_btn = “21”
    input_exit_emulator_btn = “22”

    13. In Retropie 3.0 controller configs are located:
    /opt/retropie/configs/all/retroarch-joypads

    I made my own .cfg file named 8BitdoNES30GamePad.cfg and pasted the below into it it, then uplaoded to the controller directory.
    ####
    input_device = “8Bitdo NES30 GamePad”
    input_driver = “udev”
    input_b_btn = “12”
    input_y_btn = “15”
    input_select_btn = “21”
    input_start_btn = “22”
    input_up_btn = “0”
    input_down_btn = “5”
    input_left_btn = “2”
    input_right_btn = “3”
    input_a_btn = “11”
    input_x_btn = “14”
    input_l_btn = “17”
    input_r_btn = “18”

    input_enable_hotkey_btn = “21”
    input_exit_emulator_btn = “22”
    ####

    14. Register the 2nd controller
    Hold start on the controller
    hcitool scan
    sudo bluez-simple-agent hci0 xx:xx:xx:xx:xx:xx
    sudo bluez-test-device trusted xx:xx:xx:xx:xx:xx yes

    This will add the controllers mac to the trusted devices and will let it connect when using the shell script

    I made a shell file on my pc and uploaded it to the ports rom folder to connect player 2 controller
    sudo bluez-test-input connect XX:XX:XX:XX:XX:XX (controller2.sh) with your MAC
    Do the following so you can execute the script from ES
    cd RetroPie/roms/ports
    cdmod +x controller2.sh

    sudo reboot

    Now the shell should show up in the ports folder and can be ran. I just pressed start to start my 2 controller and came up fine.

    To be able to control emulationstation with the controller i used config modified by kingchili
    make a backup of your current es_input.cfg and over write it with the one post above.

    #104515
    hlashbrooke
    Participant

    Thanks for this @grizzlema – looks pretty thorough and I’ll be trying it out later.

    Once quick question (which might be obvious once I get there), but where you say this:

    “For now I made a shell to reconnect player 2 controller and placed it into the ports folder”

    Is that simply adding sudo bluez-test-input connect XX:XX:XX:XX:XX:XX to the script, putting it in the RetroPie/roms/ports folder and running chmod on it?

    That sounds like what you’re saying, but just want to clarify :)

    Thanks for sharing!

    #104517
    grizzlema
    Participant

    Yup, just make sure the MAC address you put in the shell is the 2nd controller,

    i used the chmod +x on the file

    #104518
    hlashbrooke
    Participant

    Thanks! :)

    #104519
    grizzlema
    Participant

    One note, if i let the controller go idle and disconnect i havent been able to get it to repair unless i run the command again from commandline or do a reboot.

    #104569
    petrockblog
    Keymaster

    Instead of editing /usr/bin/bluez-simple-agent have you tried passing a parameter ?

    /usr/bin/bluez-simple-agent -c DisplayYesNo …

    Looking at the code it checks for this parameter although it’s poorly documented.

    #104973
    hlashbrooke
    Participant

    Thanks for all of this grizzlema – everything seemed to work out properly, except for one problem – the controllers don’t seem to work in the actual games.

    I’m testing with SNES roms because that’s currently all that I have and when I launch one of the games, it all starts up fine, but none of the controller buttons do anything, except for when I push the up arrow on the D-pad – when I do that it exits the game.

    I followed your guide exactly, so not sure where the issue is coming in – can you offer any help there?

    #105030
    grizzlema
    Participant

    Are you using the cfg files i uploaded and put them into /opt/retropie/configs/all/retroarch-joypads ?

    I am having to start from square one again since i am using smither’s dual boot retropie and kodi build.

    I did have them working with a straight retropie install, but i am now getting no response with the buttons with the dual boot image.

    #105118
    hlashbrooke
    Participant

    @grizzlema – I found the fix :) I had to go into raspi-config and resize the partition to use the entire SD card. Not quite sure why that worked, but it did. Enjoying all my roms now – thanks for the help!

    #105144
    hlashbrooke
    Participant

    Regarding the issue of not being able to reconnect the controller after it switches off, something like this might fix that up: http://askubuntu.com/questions/53377/bluetooth-mouse-not-auto-reconnecting – I’m not at home right now (and that guide is for Ubuntu), but will check it out later as I’m sure something similar will work for RetroPie.

Viewing 35 posts - 1 through 35 (of 57 total)
  • The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.