Bluetooth device on gameshell

bluetooth
tinkering
hardware

#21
cpi@clockworkpi:~$ systemctl status rc-local
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
  Drop-In: /lib/systemd/system/rc-local.service.d
           └─debian.conf
   Active: active (running) since Sun 2018-10-21 06:26:17 UTC; 22h ago
   CGroup: /system.slice/rc-local.service
           └─753 brcm_patchram_plus --patchram /lib/firmware/brcm/bcm43438a0.hcd --enable_hci --bd_addr B0:F1:EC:2D:07:5B --no
lines 1-7/7 (END)

#22

thx U. I am not a linux expert, but will the rc.local.service config like below:
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target


#23

I am not a linux expert,either :slight_smile:

why you look into rc.local.service, I think rc.loal.service is fine with default content

just run systemctl start rc-local will enable rc.local.service at boot so that /etc/rc.local will be invoked at boot,too,

in ssh ,just run the scripts below, maybe copy and paste all into ssh

cat <<EOF >/etc/rc.local
#!/bin/sh -e
sleep 15
brcm_patchram_plus --patchram /lib/firmware/brcm/bcm43438a0.hcd --enable_hci --bd_addr B0:F1:EC:2D:07:5B --no2bytes --tosleep 5000 /dev/ttyS1 &
EOF
chmod +x /etc/rc.local
systemctl daemon-reload
systemctl start rc-local
systemctl status rc-local

systemctl enable bluetooth
reboot

and just in case

if you did not see the launcher up but only a loading…

into ssh

cd ~/launcher <- or cd ~/apps/launcher
DISPLAY=:0 ./load.sh

see if there are other problems


#24

it seems that after running systemctl start rc-local, it doesn’t enable rc.local.service. at boot. but probably I need to figure it out. do we need to run the bluetoothctl to connect device everytime we start the clockworkpi?


#25

The launcher can connect bluetooth devices now ,but without pair code
it seems bluetooth > 2.1 can pair without code

But every time you connect to a Bluetooth device, you need to connect it again with launcher or bluetoothctl

right now I don’t know how to make a bluetooth device auto-reconnect efficiently


#26

hi sir,

“bluetooth in launcher alpha now” i cant find the code inside the 1.22 launcher update.

please help.

thanks


#27

what you mean cant find the code inside the 1.22 launcher ?

you mean the source code or bluetooth pair code?


#28

you said “check out the newest code of launcher then you will see it”. are you saying there is a bluetooth.sh able to scan bluetooth device and connect them? right now i can only use putty to scan and connect my bluetooth controllers. just want to make sure if everyone is doing to same?

thanks


#29

the code is python

In launcher under settings
there is a new item named “bluetooth” now

do the same job as cli scan and connect bluetooth


#30

yes sir, i manage to see the bluetooth folder and manage to make it work. its awesome. thanks!


#31

hi Nabee,
How do you add the joystick config in retroarch. i finally managed to get the joystick connected via bluetooth, thx to guu and your guidance. but the joystick didn;t response any input.

Regards,
Ed


#32

work it out after a few retries on tinkering…thx Nabee with all the instruction on adding joystick on Bluetooth.


#33

it works alright after having the Bluetooth UI added in launcher. would have been nice to auto connect :slight_smile:. I notice after adding the Bluetooth, the navigation within the CPI UI can freeze up occasionally. does it happen to the other as well?


#34

more detail about the freeze up occasionally ,please


#35

I might have used the wrong term on freeze, it’s slow down the UI for 5-10 sec, especially when scrolling game list or navigating the CPI OS settings. but afterwards they are ok. not really a big issue.