Forum Replies Created
-
AuthorPosts
-
qraygParticipant
Here’s a more detailed setup process. I’ve successfully paired my DS4 controller from a fresh RP install many times using this process:
# Launch RetroPie Setup
# Pair Controller via Bluetooth menu in Retropie Setup, very simple
# Press Ps + Share button on controller to put into pair mode# Edit file, x = your MAC address, which is different for every controller
sudo nano /var/lib/bluetooth/xx:xx:xx:xx:xx:xx/config# Copy "class" value from config file
# In my case, my controller class value was "0x420100"# Edit file
sudo nano /etc/rc.local# Paste after "this file does nothing…"
# Make sure class value = class value from previous step#!/bin/bash
hciconfig device up
hciconfig set name raspberrypi-0
hciconfig set class 0x420100
hciconfig enable iscan
hciconfig enable pscan# Save/Exit
CTRL + X, Y, Return# Reboot
sudo reboot# Run through the normal controller configurations
# edit /opt/retropie/configs/all/retroarch.cfg
# find this area and set the values
input_player1_left_btn = "h0left"
input_player1_right_btn = "h0right"
input_player1_up_btn = "h0up"
input_player1_down_btn = "h0down"qraygParticipantThanks so much. I really appreciate the help.
How do I know what driver I’m using? To get the DS4 working I just start from a fresh RP image, install PiAssist, pair DS4, edit /etc/rc.local to allow the controller to reconnect without rebooting, and it works.
qraygParticipantAs stated in my original post “this only works on a fresh RP image and was tested on v3.0 B4”. If you tried to pair a different controller then it probably won’t work. Also, if you are not using B4 then it might not work. This is just a post to help point people in the right direction. If it doesn’t work for you, then it doesn’t work. That’s the nature of Linux. I ended up getting mine to work on a FRESH image with nothing else installed or paired so I tried to help others so maybe someone can find a better method. This is not a definitive set of instructions.
qraygParticipantTo put a Dual Shock 4 controller into pair mode you need to press PS + Share button.
qraygParticipantYou need to open the config file from within your MAC address folder and use the value from the class line. I just used xxx as the folder name since everyone’s MAC address is different. I guess the more accurate folder name example would be xx:xx:xx:xx:xx:xx. The folder name is irrelevant though, you want the class value from the config file.
qraygParticipantI think I figured it out myself… I’m not sure if this is the correct way, but it is the only way I could get it to connect and reconnect after turning off the controller. Also, if a PS3 controller was already paired this method did not work (not sure why)… this only works on a fresh RP image and was tested on v3.0 B4:
# SSH or go the command line:
# Install/Launch PiAssist
$ wget https://raw.githubusercontent.com/Death259/PiAssist/master/PiAssist.sh
$ chmod +x PiAssist.sh
$ sudo ./PiAssist.sh# Pair Controller via Bluetooth menu, very simple
# Edit rc.local
$ sudo nano /etc/rc.local
# Paste the following after “this file does nothing…”
#!/bin/bash
hciconfig device up
hciconfig set name raspberrypi-0
hciconfig set class 0x420100
hciconfig enable iscan
hciconfig enable pscan# Change class to value from /var/lib/bluetooth/xxx/config
# This whole bit allows reconnection later without having to re-pair# Save/Exit
CTRL + X, Y, Return# Reboot
$ sudo reboot -
AuthorPosts