# Bluetooth device on gameshell

**URL:** <https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617>\
**Category:** GameShell\
**Tags:** tinkering, hardware, bluetooth\
**Created:** [July 23, 2018, 8:21pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617 "2018-07-23T20:21:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)\
**Post date:** [July 23, 2018, 8:21pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/1 "2018-07-23T20:21:37Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 10, 2018, 12:28am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/2 "2018-08-10T00:28:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hal](https://avatars.discourse-cdn.com/v4/letter/h/ee7513/32.png) [@hal](https://forum.clockworkpi.com/u/hal)\
**Post date:** [August 10, 2018, 2:07pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/3 "2018-08-10T14:07:31Z")

</div>

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

> **[clockworkpi/bluetooth](https://github.com/clockworkpi/bluetooth/wiki)**
>
> CPI Bluetooth driver, kernel and configuration. Contribute to clockworkpi/bluetooth development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 10, 2018, 7:25pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/4 "2018-08-10T19:25:02Z")

</div>

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

> <https://twitter.com/nabeejetbase/status/1027996800278388736>

---

<div class="post-metadata">

**Author:** ![lasvegas](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/lasvegas/32/769_2.png) [@lasvegas](https://forum.clockworkpi.com/u/lasvegas)\
**Post date:** [August 11, 2018, 1:41am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/5 "2018-08-11T01:41:17Z")

</div>

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

LasVegas

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 11, 2018, 12:37pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/6 "2018-08-11T12:37:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 11, 2018, 1:44pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/7 "2018-08-11T13:44:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hob286](https://avatars.discourse-cdn.com/v4/letter/h/aca169/32.png) [@hob286](https://forum.clockworkpi.com/u/hob286)\
**Post date:** [August 13, 2018, 2:05am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/8 "2018-08-13T02:05:34Z")

</div>

I follow the wiki on [https://github.com/clockworkpi/bluetooth](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…

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 13, 2018, 6:28am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/9 "2018-08-13T06:28:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hob286](https://avatars.discourse-cdn.com/v4/letter/h/aca169/32.png) [@hob286](https://forum.clockworkpi.com/u/hob286)\
**Post date:** [August 13, 2018, 8:54am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/10 "2018-08-13T08:54:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 13, 2018, 11:43pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/11 "2018-08-13T23:43:37Z")

</div>

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.

> <https://github.com/libretro/retroarch-joypad-autoconfig/blob/master/udev/8Bitdo_Zero_BT.cfg>

  
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/](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.

---

<div class="post-metadata">

**Author:** ![hal](https://avatars.discourse-cdn.com/v4/letter/h/ee7513/32.png) [@hal](https://forum.clockworkpi.com/u/hal)\
**Post date:** [August 14, 2018, 4:02am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/12 "2018-08-14T04:02:41Z")

</div>

![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex029/uploads/clockworkpi/original/1X/eec3079d5fec963e8ae2e03194b1c684affea894.png)

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"
```

---

<div class="post-metadata">

**Author:** ![guu](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@guu](https://forum.clockworkpi.com/u/guu)\
**Post date:** [August 14, 2018, 4:30am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/13 "2018-08-14T04:30:44Z")

</div>

```auto
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`

```auto
Restart=always
RestartSec=3

```

under [Service] section  
after line `ProtectSystem=full`

to prevent bluetoothd unexpected crash

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 16, 2018, 2:04am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/14 "2018-08-16T02:04:30Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 18, 2018, 8:56pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/15 "2018-08-18T20:56:40Z")

</div>

I did it!

> <https://twitter.com/nabeejetbase/status/1030920445938163712>

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

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 22, 2018, 6:21am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/16 "2018-08-22T06:21:23Z")

</div>

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](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.

> <https://twitter.com/nabeejetbase/status/1031246050827223040>

---

<div class="post-metadata">

**Author:** ![guu](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@guu](https://forum.clockworkpi.com/u/guu)\
**Post date:** [August 22, 2018, 7:29am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/17 "2018-08-22T07:29:49Z")

</div>

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](https://github.com/clockworkpi/bluetooth/wiki)

and also could add auto-run for bluetooth by

```auto
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

```auto
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

---

<div class="post-metadata">

**Author:** ![nabeejetbase](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/nabeejetbase/32/364_2.png) [@nabeejetbase](https://forum.clockworkpi.com/u/nabeejetbase)\
**Post date:** [August 27, 2018, 9:28am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/18 "2018-08-27T09:28:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![guu](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@guu](https://forum.clockworkpi.com/u/guu)\
**Post date:** [August 28, 2018, 5:26am UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/19 "2018-08-28T05:26:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ed\_Lim](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/ed_lim/32/2408_2.png) [@Ed\_Lim](https://forum.clockworkpi.com/u/Ed_Lim)\
**Post date:** [October 21, 2018, 11:11pm UTC](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617/20 "2018-10-21T23:11:51Z")

</div>

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.

[Next page](https://forum.clockworkpi.com/t/bluetooth-device-on-gameshell/617.md?page=2)
