WORKS !!! THINX werry much !!!
PS3 Controller gets connected and i can controll KODI.
But after reboot controller cant connect without typing “sudo hciconfig hci0 pscan” in terminal.
This should solve the Problem but i dont find the right file to add this line?!
I dont have this dir (/var/init.d/)
Some other said i have to add this line in file rc.local?
Where should i add “hciconfig hci0 pscan” to solve the Problem?
Some other users might be interested in how?
Sure! Got no time left yesterday.
Problem was Bluetooth is activ after reboot but not discoverable.
“hciconfig” shows Bluetooth “UP RUNNING” but without “PSCAN”
Adding “hciconfig hci0 pscan” to file rc.local" does NOT work for me.
I think the reason is the line in rc.local (hciconfig hci0 pscan) will be executed at booting
the system before bluetooth dongle is initialized.
My Solution is to use a little script in /etc/init.d/ which waits till bluetooth is initialized.
So for installing Bluetooth PS3 Controller on OSMC use:
then go to terminal and create a file i called “btstart” in /etc/init.d/
sudo nano /etc/init.d/btstart
add the following code, save/write and exit:
make script executable
sudo chmod 755 /etc/init.d/btstart
test the script and check hciconfig
sudo /etc/init.d/btstart start
should look like:
register script to be run on start-up:
sudo update-rc.d btstart defaults
reboot and try to connect
Service sixad is already registered in first toturial but after adding this script it wont work for me, so i added “sixad -start” to script.
This whole linux stuff is absolutely new for me, i just read alot and tried…it works and thats all i need
Thanks, this helped a lot! Although, my script still wont run on start-up… Done all the steps you mentioned, including “sudo update-rc.d btstart defaults” but still it doesnt run. Note that everything works if I SSH into the pi and run the script manually. I also tried to create a service and do “systemctl enable” to run it, but this doesnt work either. Do you have any ideas?
Note: I have the raspberry pi 3, so I use the inbuilt bluetooth instead of a dongle.
I also have Pi3 and for me it did not work with inbuilt bluetooth.
I use a dongle and disabled inbuilt bt.
You could connect PS3 Controller and navigate in kodi?
Hmm okey. Yes I can connect the PS3 Controller and navigate. But only if I run the script “btstart” manually. I cannot reboot the pi and automatically connect the PS3 controller for some reason… So the problem is that “btstart” doesnt run after boot, I have written the command that you said “sudo update-rc.d btstart defaults”, but it doesnt work for me.
Does anyone have instructions for ps4 controller setup?
I got my controller working following the above steps, however the controller isn’t working every time I reboot.
Adding “sudo hciconfig hci0 pscan >>/var/log/sixad” above “$DAEMON --start &>>/var/log/sixad &” didn’t do anything.
I also tried to add “sudo hciconfig hci0 pscan >>/var/log/sixad” to rc.local that also does nothing. Then the script you showed is a picture so I can’t copy paste it and when I type it gives me a "Syntax error: Bad for loop variable"
Any help would be appreciated!
This is now 6 months later. But I’ve spent my entire weekend trying to get this working with the newer versions of OMSC.
The init.d script posted by benno no longer works properly. It only works when you manually start it. Which isn’t very handy for me since my OSMC device does not have a mouse or keyboard.
For those still having issues, here’s what I did.
Now, once the initial set up is done, we need a way to auto connect the controller when booting the machine. Since the init script methods are being deprecated and the systemd process is more standard, do this:
sudo nano /usr/bin/scripts/bts.sh
Put the following code in the script. This is essentially the same thing as bennos, but slightly modified. Credit where credit is due.
if [ "$1" != "background" ]; then
$0 background &
#Wait until BT is initialized
for ((i=0; i<=100; i++)) do
hciconfig hci0 && break
/usr/bin/hciconfig hci0 up
/usr/bin/hciconfig hci0 pscan
su osmc -c "/usr/bin/sixad -s &"
Now create a service file
sudo nano /lib/systemd/system/bts.service
and put in the following (I’m sure there are errors here, I’m not an expert. I literally learned this stuff in the past 2 hours. but it works.)
Description = SIXAD Connection Daemon
Requires = bluetooth.target
Type = forking
ExecStart = /usr/bin/scripts/bts.sh
WantedBy = multi-user.target
Now, enable the service.
sudo systemctl enable bts.service
you should see something like this:
_Created symlink from /etc/systemd/system/multi-user.target.wants/bts.service to /lib/systemd/system/bts.service._
and reboot! When the system starts again, you should be able to press the PS button and it will connect, and do what I call ‘the wave’ to you (All Leds light up sequentially).
sudo mkdir /usr/bin/scripts
Before writing a file to a non existant folder.
I get some error’s at bootup and PSCAN is not showing after rebooting.
I have to type this to make the controler work after reboot.
sudo hciconfig hci0 piscan
EDIT: It is working now! Thank you very very much!!!
I removed the previous scripts and redid every step from the beginning.
I’m still getting one of the two error’s on bootup though:
[FAILED] Failed to start SIXAD Connection Daemon.
See ‘systemctl status bts.service’ for details.
I feel your pain. Been struggling for hours to get it working.
I think you also need to make the script file executable.
sudo chmod +x /usr/bin/scripts/bts.sh
I think I’m almost there - controller is being detected but its not working in Kodi or libretro
[ 424.248154] input: Sony Computer Entertainment Wireless Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:34/0005:054C:0268.0001/input/input0
[ 424.248786] sony 0005:054C:0268.0001: input,hidraw0: BLUETOOTH HID v1.00 Joystick [Sony Computer Entertainment Wireless Controller] on 00:15:83:15:a3:10
I have a dual boot (noobs) with osmc 16.1 Jarvis + recalbox.
The problem is that in recalbox the control of ps3 sixaxis works perfectly, but in osmc I can not.
After installing sixad and pairing the ps3 control, it works perfectly on the command line. But when you start kodi and press the ps button on the remote, for some reason it does not link to the dongle. When looking at the led of the dongle it seems that it wants to bind, but it does not.
It is as if kodi rejected the bluetooth connection with the dongle. The funny thing is that the command line works perfectly.
I have already created the keymap.xml file in userdata / keymaps.
At the moment, I am blocked and I do not know how to follow.
Thanks in advance and sorry for my bad english.
All - I posted an updated guide for a complete install and getting the PS3 controller working with OSMC, Moonlight, and Kodi.
Hoepfully anyone still having issues can refer to this. As a side note - I am also Si2rp from above, so the guide is based on my previous work. Didn’t want to create an actual account as I figured it would be a 1 time post kind of thing.
I finally got it !!
In addition to what Benno posted, this is what I did:
No script to boot sixad on boot worked. Neither btstart, nor bts.service. Indicated startup error or did not work.
Finally, I solved it by adding these lines in the file /etc/rc.local just before the line “exit 0”. It would look like this:
sudo hciconfig hci0 up # these two first lines already had them
sudo hciconfig hci0 pscan # but did not link to the dongle in kodi.
sudo sixad -s # this is the new line I added.
Now it starts sixad after putting the dongle in pscan and pressing the button ps inside kodi is perfectly linked.
I hope this method will help someone. Although I think depending on the kodi version, a different method will be used.
Greetings from Spain.
How come it’s that hard to make it work? On RetroPie, I would just do like a normal PS3 controller on a PS3. I plug in the USB, press the PS button, it connects and then, I can use it wirelessly
How to start PS3 controller on boot RP3vB+OSMC+Kodi v16:
Waddup y’all. This is my first post so bare with me. After doing:
I got the controller connected through bluethooth and I can control Kodi. It’s wonky as hell but it works. By typing the ‘who -r’ command I can see that the system is in runlevel 5. So everything works fine on runlevel 5. It still won’t start on boot though. So I tried the script from Si2rp and it didn’t work for me. Then I tried to edit the rc.local file like Davidmval and rc.local.service failed to start due to “Compatibility” when any code is added to /etc/rc.local. Long story short my guess is that hciconfig and sixad are trying to start before their dependancies are up and running (bluetooth module…etc). So I made a simple script that makes simple script and sets the second simple script to be ran at the end of runlevel 5. Y’all follow me? Good. So check it:
echo ‘#! /bin/sh’ > /etc/init.d/PS3Pi.sh
echo ‘’ > /etc/init.d/PS3Pi.sh
echo ‘hciconfig hci0 up’ > /etc/init.d/PS3Pi.sh
echo ‘hciconfig hci0 pscan’ > /etc/init.d/PS3Pi.sh
echo ‘sixad -s &’ > /etc/init.d/PS3Pi.sh
chmod +x /etc/init.d/PS3Pi.sh
sudo ln -s /etc/init.d/PS3Pi.sh /etc/rc5.d/S04PS3Pi.sh
after reboot press the PS button on your controller and watch the LEDs do the “Night Rider”. You should be good to go from there.
to double check your work:
sudo systemctl | less
scroll around and look for:
red) * bluetooth.service loaded failed failed Bluetooth service
green) brcm43xx.service loaded active running Broadcom 43xx bluetooth HCI
green) PS3Pi.service loaded active running (null)
Bigups to Si2rp Davidmval Theetjuh newbiecrd.
If I F’D up anywhere in this post please call me out on it. And be brutal about it too
I hope this helped some poor bastard get some sleep. Laterz yall. Peace out. -HacKR10T:sunglasses:
Does the ps3 controller need all these steps in krypton now seeing it has joystick support. Is it a matter of plug and play?