Trying to configure a ps4 controller

I didn’t want to clutter mcobit’s Retrosmc thread any more than I already have, so decided to open a specific thread just for getting this ps4 dual-shock controller working properly on my rpi2.

The original thread:

My steps so far:

(1) install fresh image of OSMC, do initial configuration as needed.

(2) ssh into OSMC and update

$ sudo apt-get update $ sudo apt-get dist-upgrade $ sudo reboot

(3) build and install the latest ds4drv 0.5.1 driver:

[code] $ sudo apt-get install python2.7-dev python-setuptools python3
$ git clone https://github.com/chrippa/ds4drv.git
$ cd ds4drv
$ sudo python setup.py install
$ cd /etc/udev/rules.d
$ sudo wget ds4drv/50-ds4drv.rules at master · chrippa/ds4drv · GitHub
$ sudo udevadm control --reload-rules
$ sudo udevadm trigger

$ sudo nano /etc/rc.local

** add the following **

By default this script does nothing.

/usr/local/bin/ds4drv --hidraw --led 000008 &
exit 0

$ sudo reboot[/code]

I then installed RetroPie using mcobit’s script, set it up as suggested in the thread, then rebooted. Once in OSMC, I enabled bluetooth under the networks tab, and paired the device with pin. I rebooted once again, making sure the controller gets discovered and connects at boot.

I then Started up RetroPie, and even before I configure my keyboard, it’s saying “2 Gamepads Detected”. (Without the driver, it just detects 1 gamepad… but it’s unresponsive). Configure my keyboard, then configure my controller. Navigate through Emulationstation using the controller, but as soon as I start a game… any game… it says the controller is not configured, followed by “SonyWireless… connected on port #”, and the controller is completely unresponsive. Exit back to Emulationstation using the keyboard, and the controller works again. This is driving me nuts. :stuck_out_tongue:

I found that emulationstation keeps a log in ~/.emulationstation/es_log.txt.

lvl2: EmulationStation - v2.0.1a, built Sep 6 2016 - 00:00:37 lvl2: Creating surface... lvl2: Created window successfully. lvl2: Added unconfigured joystick Wireless Controller (GUID: 050000004c050000c405000000010000, instance ID: 0, device index: 0). lvl2: Added known joystick Sony Computer Entertainment Wireless Controller (instance ID: 1, device index: 1) lvl2: Checking available OpenGL extensions... lvl2: ARB_texture_non_power_of_two: MISSING lvl2: Loading system config file /etc/emulationstation/es_systems.cfg... lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/amstradcpc/gamelist.xml"... lvl1: System "amstradcpc" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/arcade/gamelist.xml"... lvl1: System "arcade" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/atari2600/gamelist.xml"... lvl1: System "atari2600" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/atari7800/gamelist.xml"... lvl1: System "atari7800" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/atarilynx/gamelist.xml"... lvl1: System "atarilynx" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/fba/gamelist.xml"... lvl1: System "fba" has no games! Ignoring it. lvl1: Unknown platform for system "fds" (platform "fds" from list "fds") lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/fds/gamelist.xml"... lvl1: System "fds" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/gamegear/gamelist.xml"... lvl1: System "gamegear" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/gb/gamelist.xml"... lvl1: System "gb" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/gba/gamelist.xml"... lvl1: System "gba" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/gbc/gamelist.xml"... lvl1: System "gbc" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/mame-libretro/gamelist.xml"... lvl1: System "mame-libretro" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/mame-mame4all/gamelist.xml"... lvl1: System "mame-mame4all" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/mastersystem/gamelist.xml"... lvl1: System "mastersystem" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/megadrive/gamelist.xml"... lvl1: System "megadrive" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/msx/gamelist.xml"... lvl1: System "msx" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/n64/gamelist.xml"... lvl1: System "n64" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/neogeo/gamelist.xml"... lvl1: System "neogeo" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/nes/gamelist.xml"... lvl1: System "nes" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/ngp/gamelist.xml"... lvl1: System "ngp" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/ngpc/gamelist.xml"... lvl1: System "ngpc" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/pcengine/gamelist.xml"... lvl1: System "pcengine" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/psp/gamelist.xml"... lvl1: System "psp" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/psx/gamelist.xml"... lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/retropie/gamelist.xml"... lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/sega32x/gamelist.xml"... lvl1: System "sega32x" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/segacd/gamelist.xml"... lvl1: System "segacd" has no games! Ignoring it. lvl1: Unknown platform for system "sg-1000" (platform "sg-1000" from list "sg-1000") lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/sg-1000/gamelist.xml"... lvl1: System "sg-1000" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/snes/gamelist.xml"... lvl1: System "snes" has no games! Ignoring it. lvl1: Unknown platform for system "vectrex" (platform "vectrex" from list "vectrex") lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/vectrex/gamelist.xml"... lvl1: System "vectrex" has no games! Ignoring it. lvl2: Parsing XML file "/home/osmc/.emulationstation/gamelists/zxspectrum/gamelist.xml"... lvl1: System "zxspectrum" has no games! Ignoring it. lvl1: OptionListComponent too narrow! lvl1: OptionListComponent too narrow! lvl1: OptionListComponent too narrow! lvl2: req sound [basic.launch] lvl2: (missing) lvl2: Attempting to launch game... lvl2: /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ psx /home/osmc/RetroPie/roms/psx/007/007\ -\ The\ World\ Is\ Not\ Enough.cue lvl2: Creating surface... lvl2: Created window successfully. lvl2: Added unconfigured joystick Wireless Controller (GUID: 050000004c050000c405000000010000, instance ID: 0, device index: 0). lvl2: Added known joystick Sony Computer Entertainment Wireless Controller (instance ID: 1, device index: 1) lvl2: Added unconfigured joystick Wireless Controller (GUID: 050000004c050000c405000000010000, instance ID: 0, device index: 0). lvl2: Added known joystick Sony Computer Entertainment Wireless Controller (instance ID: 1, device index: 1) lvl2: EmulationStation cleanly shutting down.

What the heck is going on?? :stuck_out_tongue:

ok… doing a bit more research, it seems this is a pre-existing issue with RetroPie itself. A few threads suggested updating the binaries and scripts, then doing the controller config setup window again. We shall see.