Bluetooth wireless Dualshock 3 autostart

First of all I want to say hello to everyone because this is my first message. And, of course I have to say thanks for all the developers for making this emulator.

I have a Raspberry Pi 2 with LakkaTv and Dualshock 3 controller.

I followed the instructions here: http://www.lakka.tv/doc/Wireless-Dualshock/

and the wireless controller worked succesfuly. The problem I have is when I start again LakkaTv, because I have to reconnect it:

root @ ipadress systemctl bluetooth status is active (running) And Then I have to configure bluetoothctl again:

agent on default-agent power on discoverable on pairable on

Here the Dualshock 3 connect again!

Is there any way to do this automatically or I have to reconnect it every time I start Lakka?

Did you do the last part from the instructions?

Make changes survive a reboot If you had to type power on in bluetoothctl earlier, you will have to do this every time you reboot the system. A simple way to avoid this is to write a udev rule. Create a file: nano /etc/udev/rules.d/10-local.rules Then put

Set bluetooth power up

ACTION==“add”, KERNEL==“hci0”, RUN+="/usr/bin/hciconfig hci0 up"

It worked!!! Thanks a lot jayp76 !!!

my ds3 does not pair up with the bluetooth. here’s the log.


Lakka (unofficial) Version: devel-20150928013702-r21174-ga11c890
Lakka git: a11c890be68a58a8dde672722eae64c23e1f4ea8
Lakka:~ # systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Lakka:~ # systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Lakka:~ # systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Lakka:~ # systemctl start bluetooth
Lakka:~ # systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2015-10-09 11:33:34 UTC; 2s ago
 Main PID: 4390 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─4390 /usr/lib/bluetooth/bluetoothd

Oct 09 11:33:34 Lakka systemd[1]: Started Bluetooth service.
Oct 09 11:33:34 Lakka systemd[1]: Starting Bluetooth service...
Oct 09 11:33:34 Lakka bluetoothd[4390]: Bluetooth daemon 5.27
Oct 09 11:33:34 Lakka bluetoothd[4390]: Starting SDP server
Oct 09 11:33:34 Lakka bluetoothd[4390]: Bluetooth management interface 1.3 initialized
Oct 09 11:33:34 Lakka bluetoothd[4390]: hci0 Load Connection Parameters failed: Unknown Command (0x01)
Oct 09 11:33:35 Lakka bluetoothd[4390]: sixaxis: compatible device connected: PLAYSTATION(R)3 Controller (054C:0268)
Oct 09 11:33:35 Lakka bluetoothd[4390]: sixaxis: failed to set LEDS (0 bytes written)
Hint: Some lines were ellipsized, use -l to show in full.
Lakka:~ # systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2015-10-09 11:33:34 UTC; 50s ago
 Main PID: 4390 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─4390 /usr/lib/bluetooth/bluetoothd

Oct 09 11:33:34 Lakka systemd[1]: Started Bluetooth service.
Oct 09 11:33:34 Lakka systemd[1]: Starting Bluetooth service...
Oct 09 11:33:34 Lakka bluetoothd[4390]: Bluetooth daemon 5.27
Oct 09 11:33:34 Lakka bluetoothd[4390]: Starting SDP server
Oct 09 11:33:34 Lakka bluetoothd[4390]: Bluetooth management interface 1.3 initialized
Oct 09 11:33:34 Lakka bluetoothd[4390]: hci0 Load Connection Parameters failed: Unknown Command (0x01)
Oct 09 11:33:35 Lakka bluetoothd[4390]: sixaxis: compatible device connected: PLAYSTATION(R)3 Controller (054C:0268)
Oct 09 11:33:35 Lakka bluetoothd[4390]: sixaxis: failed to set LEDS (0 bytes written)
Oct 09 11:34:17 Lakka bluetoothd[4390]: sixaxis: compatible device connected: PLAYSTATION(R)3 Controller (054C:0268)
Hint: Some lines were ellipsized, use -l to show in full.
Lakka:~ # bluetoothctl
[NEW] Controller 00:15:83:6C:DD:9A BlueZ 5.27 [default]
[NEW] Device 00:19:C1:6F:BD:FD PLAYSTATION(R)3 Controller
[bluetooth]#
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 00:15:83:6C:DD:9A Discoverable: yes
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# connect 00:19:C1:6F:BD:FD
Attempting to connect to 00:19:C1:6F:BD:FD
Connection successful
[bluetooth]# connect 00:19:C1:6F:BD:FD
Attempting to connect to 00:19:C1:6F:BD:FD
Connection successful
[bluetooth]# trust 00:19:C1:6F:BD:FD
Changing 00:19:C1:6F:BD:FD trust succeeded
[bluetooth]# exit
Agent unregistered
[DEL] Controller 00:15:83:6C:DD:9A BlueZ 5.27 [default]
Lakka:~ # nano /etc/udev/rules.d/10-local.rules


Your log look ok, but I don’t see the step where bluetoothctl ask you if you want to pair when you disconnect the usb cable.

i think the issue is that my setting is not surviving the reboot…because when i type systemctl status bluetooth

all i get is

● bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: inactive (dead)

not sure how to fix…because already have ACTION==“add”, KERNEL==“hci0”, RUN+="/usr/bin/hciconfig hci0 up"

when i disconnect usb cable and press the PS button. it connects fine. the log above is not from my very first attempt (when i answer yes to bluetoothclt)

"[CHG] Device 00:19:C1:6F:BD:FD Connected: yes
[CHG] Device 00:19:C1:6F:BD:FD Connected: no
[CHG] Device 00:19:C1:6F:BD:FD Connected: yes

"

You didn’t forget to systemctl enable bluetooth ?

the very first time? i did not forget…everything will work if i follow guide again…but if i restart…it will have to do all over again…bluetooth service does not start byitself

The bluetooth service should be running after a reboot, if you have used the systemctl enable bluetooth command. I don’t get why it’s not working.

is there a way to execute these two at startup? in some auto config file? systemctl enable bluetooth systemctl start bluetooth

If systemctl enable doesn’t work for some obscure reasons, there is still the autostart.sh script. Google it.

had to do 4 things before ds3 wireless working:

a) plug bluetooth dongle into usb 3.0 port. b) had to add systemctl start bluetooth into autostart.sh (following instruction at http://www.lakka.tv/doc/Wireless-Dualshock/ cannot get bluetooth to start after reboots) c) once ds3 is connected. i have to to reconfigure the buttons (autoconfig did not work). same issue as https://github.com/libretro/Lakka/issues/196 d) finally, had to save settings and rename saved file to retroarch.cfg…lakka loads retroarch.cfg as default…but when u save new settings it do not overwrite retroarch.cfg (it saves as RetroArch+DateStamp.cfg

but it is working now. thanks for the help all

[QUOTE=jayp76;28974]Did you do the last part from the instructions?

Make changes survive a reboot If you had to type power on in bluetoothctl earlier, you will have to do this every time you reboot the system. A simple way to avoid this is to write a udev rule. Create a file: nano /etc/udev/rules.d/10-local.rules Then put

Set bluetooth power up

ACTION==“add”, KERNEL==“hci0”, RUN+="/usr/bin/hciconfig hci0 up"[/QUOTE]

This needs to be put on the wiki

I was in the wiki but I removed it because we added this udev rule in Lakka by default.

autostart.sh seems to be ignored since Lakka 2.0. systemctl enable retroarch-autostart.service changes the status to enabled, but the script does not run at startup. Any other suggestions to get autostart.sh to run? thanks.