Bluetooth device on gameshell

I tried to use the bluetooth on gameshell, but it seems the system cannot find it.
I used hcitool dev and rfkill list to list devices, but got no bluetooth device.

Is anyone able to use the bluetooth? Thanks!

4 Likes

Hi!

I’ve always been wondering if Bluetooth functions can be used.
I tried using Bluetooth service with apt-get, but it remains inactive.

Blockquote
cpi @ clockworkpi: ~ $ systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man: bluetoothd (8)
Blockquote

In case
Do I have to reconfigure the kernel?
I would like to use the Bluetooth controller for 2P control.

1 Like

We have updated the kernel and some necessary files for Bluetooth.

1 Like

@hal Thanks! I have control! but, buttons.

1 Like

This is great! Except… The bluetooth kernel breaks the USB-ETH. I need both!

LasVegas

1 Like

Once I turned off Wi - Fi, I could not scan. I can use USB-ETH…

Sorry, “sudo rfkill unblock wifi” I can connect Wi-Fi again.
Is the setting item of the launcher not following it?

I follow the wiki on https://github.com/clockworkpi/bluetooth, but when i use “connect xx:xx:xx:xx:xx:xx” command, i got “Failed to connect: org.bluez.Error.Failed” …
“pair xx:xx:xx:xx:xx:xx” is ok.
I donnot know why…

xx: xx: xx: xx: xx: xx is same value?
Is not it connected?

xx: xx: xx: xx: xx: xx is my wifi mac address…
After I install pulseaudio pulseaudio-module-bluetooth, now gameshell can connect my Bluetooth headset, but there is no sound.

Hello.
I am trying to connect the game pad 2 days ago, but it will not work.
Like a movie, the D-Pad moves, but the button does not work.

The game pad is 8 Bitdo Zero.

Bluetooth connection is done.

There seems to be a driver for this pad in retroarch.


I changed the setting-Driver-Joypad Driver to “udev”.

Add /etc/udev/rules.d/10-local.rules file,
SUBSYSTEM == “input”, ATTRS {name} == “8 Bitdo Zero GamePad”, MODE = “0666”, ENV {ID_INPUT_JOYSTICK} = “1”.

Add /etc/udev/rules.d/99-evdev.rules file,
KERNEL == “event *”, NAME = “input /% k”, MODE = “666”.
https://docs.libretro.com/guides/input-joypad-drivers/

User “cpi” has not been added to “input” group. Do I need it?
Please let me know if there is anything else I can do.

maybe this will be useful …

input_select_btn = "Space"
input_start_btn = "Enter" 
input_x_btn = "U"
input_y_btn = "I"
input_a_btn = "J"
input_b_btn = "K"
input_l_btn = "Home"
input_r_btn = "End"
1 Like
sudo su

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

use rc.local to auto set bluetooth everytime rebooted

add two lines in /etc/systemd/system/dbus-org.bluez.service

Restart=always
RestartSec=3

under [Service] section
after line ProtectSystem=full

to prevent bluetoothd unexpected crash

As I was told, I rewrote 8 Bitdo_Zero_BT.cfg but it did not work. I tried sudo apt-get install joystick, but it did not change. / dev has no joystick directory, is that something like that?

I did it!

But, This is recognized as 1 controller. purpose as a 2 controller.

2 Likes

Hello.
I finally decided how to use 2 con with Bluetooth, so I will write down.

* We strongly recommend RetroArch’s Bluetooth controller described here.
https://github.com/libretro/RetroArch-joypad-autoconfig/tree/master/udev
Perhaps it will not work well unless you set the pad to “Windows mode”.
(Fanny suffered by the D-pad operation of the controllers 1 and 2?)

1.Change the kernel so that Bluetooth can be used.
2. Pair the Bluetooth once. At that time refrain from recognizing names.
After refraining from the recognition name, turn off the pad power.

3.Add your user to the group “input” with the command:
sudo usermod -a -G input whoami

4.Add “etc / udev / rules.d / 10-local.rules”.
SUBSYSTEM == “input”, ATTRS {name} == “device recognition name in Bluetooth”, MODE = “0666”, ENV {ID_INPUT_JOYSTICK} = “1”
ex.SUBSYSTEM == “input”, ATTRS {name} == “8 Bitdo Zero GamePad”, MODE = “0666”, ENV {ID_INPUT_JOYSTICK} = “1”

sudo udevadm control --reload-rules

5.Start RetroArch and change options.

Settings

  • Driver
    Joypad Driver - udev

  • Inputs
    Max Users - 2

  1. End RetroArch.

  2. Pair with the pad

  3. Start RetroArch
    * At this time, if the pad recognizes it, Autoconfg should display the name of the pad with yellow letters at the bottom of the screen

Setting

  • Inputs
    Input User 2 Bind
    User 2 Bind All

Change button assignment
Set buttons one by one.

9.Let’s start the game and check the operation!
A fun game with a girl (or boy?) Friends!
I do not have her…

Thanks.

2 Likes

bluetooth in launcher alpha now

check out the newest code of launcher then you will see it

use git pull to update launcher, for now ,there is no update in launcher's UI

and make sure you enabled bluetooth by

bluetooth wiki

and also could add auto-run for bluetooth by

sudo su

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

add two lines in /etc/systemd/system/dbus-org.bluez.service to prevent blueZ unexpected crash

Restart=always
RestartSec=3

[Service] section
after this line ProtectSystem=full

Currently I only tested with my two bluetooth devices:

  • logitech k480 keyboard
  • 8bitdo game pad

so you may met bugs ,dont panic

PS:
I accepted the re-order pull-request to re-order icons, so PowerOff will be in the last position of launcher’s Menu
so you may find out double PowerOFF, Music Player ,TinyCloud Icons after git pull
just remove the duplicates

  • PowerOFF became 99_PowerOFF
  • Music Player became 97_Music Player
  • TinyCloud became 98_TinyCloud

Happy Hacking

1 Like

Good!
I hope I can turn Bluetooth on / off from the launcher.

Right now
the Airplane mode will do the trick of turning on/off bluetooth ,because airplane mode is just
rfkill block all
rfkill unblock all

But I guess It’s not perfect enough

can anyone explain how the rc-local.service content look like, i did manage to add the the rc.local but failed to get the service start with bluetooth on.