Like a lot of other people around the net, I had big problems to use wireless Bluetooth controllers. The fake PS3 controller called Gasia and Shanwan didn't work as they should. I tried a lot of solutions I found on the internet but no one worked! It was impossible to pair any controller, sometimes I got 2 of them working but not all.
559.063868 sony 0003:054C:0268.0004: input,hiddev0,hidraw1: USB HID v1.10 Joystick SHANWAN PS3 GamePad on usb-3f980000.usb-1.2/input0 Lakka:/dev/usb # lsusb Bus 001 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode). Then in configuration / options I could install the PS3 Driver (Shanwan) and after that I paired it with 'Pair PS3 controller (clone support shanwan). Now it works in Kodi too. Hopefully the OSMC Team can have a look into this issue. And maybe someday it won't be needed anymore to install Retropie just to pair a Shanwan clone with OSMC. Because your controllers are working over wifi 2.4ghz and not bluetooth, this might not help you, but you could nevertheless give it a try: in the batocera.conf file (located under share/system) you can change the PS3 controller drivers from bluez to 'official' or 'shanwan' Please enable only one of these.
So here I describe a list of simple steps to get them paired under RetroPie 4.0.2.
1. Install RetroPie 4.0.2
First format an SD-card of your choice with a tool called SDFormatter (Windows) Palm driver download for windows 10.
Then install the already downloaded image of RetroPie onto your formated SD-card using Win32DiskImager (Windows)
After RetroPie has started you have to connect a USB-Controller to the USB-plug and configure that controller. It is also possible to use a USB-keyboard to do the following steps.
2. Get an internet connection
The next step after configure a controller is to get an internet connection. The simplest solution will be to connect to a WIFI network.
Goto RetroPie -> WIFI to connect to a WIFI. This is necessary to be able to download the missing packages.
3. Install the needed PS 3 Controller packages
Open the RetroPie Menu Screen and start RetroPie Setup.
Then goto:
(P) Manage packages -> (driver) Manage driver packages -> (812) ps3controller -> (S) Install from source
If you have an internet connection the missing packages will be downloaded and installed.
4. Remove PS 3 Controller Configuration
After the installation of the missing packages goto: (C) Configuration / Options
and then (5) Remove PS3 controller configurations.
This step is important! You have to delete the configuration directly after you installed the packages.
After removing the configuration a screen pops up: Removed PS3 controller configuration.
5. Install the correct Shanwan driver
Now the correct driver packages can be installed, therefore goto (4) Install/Pair PS3 controller (clone support shanwan).
Don't be afraid, also all my Gasia Controllers worked well! After this driver package is installed the controllers will be detected as they should.
6. Pair the controller
After you installed the Shanwan driver packages go back to the RetroPie home screen.
Now connect the first Bluetooth PS3 controller via USB to the RetroPie and wait approximately 10 seconds, all 4 LEDs should blink simultaneously. Then unplug the USB connection and push the PS3 / P3 button on your controller. After a few seconds, the controller should be paired and you can see which number the controller has. If you have still connected the USB-Controller from step 1, your paired Bluetooth PS3 controller should have number 2. (Have a look at Additional Information)
Shanwan Ps3 Controller Driver
7. Configure the PS3 controllers
Now a configuration of the controllers should be done. Therefore push the START button to open the MAIN MENU and goto CONFIGURE INPUT.
2. Get an internet connection
The next step after configure a controller is to get an internet connection. The simplest solution will be to connect to a WIFI network.
Goto RetroPie -> WIFI to connect to a WIFI. This is necessary to be able to download the missing packages.
3. Install the needed PS 3 Controller packages
Open the RetroPie Menu Screen and start RetroPie Setup.
Then goto:
(P) Manage packages -> (driver) Manage driver packages -> (812) ps3controller -> (S) Install from source
If you have an internet connection the missing packages will be downloaded and installed.
4. Remove PS 3 Controller Configuration
After the installation of the missing packages goto: (C) Configuration / Options
and then (5) Remove PS3 controller configurations.
This step is important! You have to delete the configuration directly after you installed the packages.
After removing the configuration a screen pops up: Removed PS3 controller configuration.
5. Install the correct Shanwan driver
Now the correct driver packages can be installed, therefore goto (4) Install/Pair PS3 controller (clone support shanwan).
Don't be afraid, also all my Gasia Controllers worked well! After this driver package is installed the controllers will be detected as they should.
6. Pair the controller
After you installed the Shanwan driver packages go back to the RetroPie home screen.
Now connect the first Bluetooth PS3 controller via USB to the RetroPie and wait approximately 10 seconds, all 4 LEDs should blink simultaneously. Then unplug the USB connection and push the PS3 / P3 button on your controller. After a few seconds, the controller should be paired and you can see which number the controller has. If you have still connected the USB-Controller from step 1, your paired Bluetooth PS3 controller should have number 2. (Have a look at Additional Information)
Shanwan Ps3 Controller Driver
7. Configure the PS3 controllers
Now a configuration of the controllers should be done. Therefore push the START button to open the MAIN MENU and goto CONFIGURE INPUT.
That's it you can now connect several controllers like described in step 6.
Have fun with your working controllers (hopefully).
Shanwan Usb Driver Download
Additional Information
Some controllers have a problem to show the correct controller number. I have one gasia controller (looks exactly like the other shanwan controller) which shows every time that it is number 1.
This is a little bit confusing but it is NO problem. Internally in the RetroPie system, this controller gets the correct number! This issue can be very confusing especially when you have problems during the pairing process.
If you have problems to pair Bluetooth controllers and also use a Bluetooth keyboard have a look at https://luetzels.raspiblog.com/?p=1870