Autostart bluetooth 8bitdo

Well I have a problem that when restarting lakka, the 8bitdo control does not reconnect. I have created an autostart file not working and added rules. In short someone who can give with the precise codes so that when restarting does not disconnect from the bluetooth

the V4 8bitdo firmware resolved this for me, so far.

I already have it updated to that version

Try this:

Check that the autostart is enabled. systemctl status retroarch-autostart.service if disabled systemctl enable retroarch-autostart.service then

in the autostart.sh

echo “connect macaddress1” | bluetoothctl

i was never able to autopair my 8bitdo nes30 pro with lakka after a reboot, from the day i bought the controller (firmware 1.73 lakka v1.0) until last time i used it (firmware 4.0 lakka 2.1 rc1)… i will try this solution but i fear it will not work like all solution i tried so far…

i tried it finally and as i supposed it doesn’t work the line in autostart.sh lock Lakka on the flower screen… too bad

ok i have a positive update here, i tested some shutdown and reboots and it apparently work! :smiley: however this is the content of my autostart.sh to make autopair of 8bitdo nes30 working:

systemctl enable bluetooth

systemctl start bluetooth

echo “agent on” | bluetoothctl

echo “default-agent” | bluetoothctl

echo “power on” | bluetoothctl

echo “discoverable on” | bluetoothctl

echo “pairable on” | bluetoothctl

echo “scan on” | bluetoothctl

echo “connect E4:17:D8:D2:66:69” | bluetoothctl

(E4:17:D8:D2:66:69 is the mac address of my controller) however i have to quick-power up my controller as soon as the lakka logo appear on screen after a power cycle, not need to do anything after reboot)

1 Like

I work, restarting has to be right at the moment, but it happens that it does not always connect and I have to reboot until I detect them.

The other problem is that if I disconnect the controls I have to connect them via command, and this for a common user is somewhat complex. The idea is that when I press the search button of the control this automatically detects the control and in my case this does not work for me, it only works via command.

You can make an option in the menu of lakka with a runcomand “connect adress mac” to detect and connect the control?

i made some test, i added the line

echo “trust E4:17:D8:D2:66:69” | bluetoothctl

at the end of autostart.sh this should trust the device for the session until reboot. i tested and on Odroid XU4 Lakka 2.1RC6 do not work. it appear that as soon as you turn off the controller, the bluetooth service is stopped, and has to be restarted manually. is there a way to leave agent on, service on, discoverable on, pairable on for unlimited time?

I did some testing and found an alternative solution. It seems that the connection has to be delayed during booting.

Here my autostart.sh:

systemctl enable bluetooth

systemctl start bluetooth

echo “agent on” | bluetoothctl

echo “default-agent” | bluetoothctl

echo “power on” | bluetoothctl

echo “discoverable on” | bluetoothctl

echo “pairable on” | bluetoothctl

echo “scan on” | bluetoothctl

sleep 5

echo “connect MAC:ADDRESS” | bluetoothctl

sleep 5

echo “connect MAC:ADDRESS” | bluetoothctl

I use two 8bitdo bluetooth controllers therefore the last lines are each for one controller.

I’m trying to set this up but I’m getting:

Lakka sh[490]: /bin/sh: can’t open ‘/storage/.config/autostart.sh’

I’ve set permissions to chmod +x autostart.sh - is there a different permissions setting?