Bluetooth : keyboard / mouse / ps4 controler pairing

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
vords
Posts: 16
Joined: Wed Feb 10, 2021 8:41 pm

Bluetooth : keyboard / mouse / ps4 controler pairing

Post by vords »

Hello everyone.

I would like to set up all thoses bluetooth devices on my Dietpi.

I'm actualy running Dietpi's LXDE and before to even start trying to make thoses devices works, i would like to ask you what is the best way to proceed on Dietpi.

Should i go through LXDE & install Blueman (as it seems that LXDE doesn't have a build in graphical bluetooth's tool) ?
Or should i focus on command line and "bluetoothctl" ?

I've tried last week on raspberry pi OS with some.. issues..
https://www.raspberrypi.org/forums/view ... 3&t=304000
And some people reply that i should just go through graphical tools. But that was for raspberry pi OS.

So, please, tell me what is the best way on Dietpi, as i can't find answer on the Deitpi documentation and the only available things i've found in dietpi-config is to set bluetooth on/off.

Thanks =)
User avatar
Joulinar
Posts: 5688
Joined: Sat Nov 16, 2019 12:49 am

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by Joulinar »

Hi,

if you use a Raspberry Pi SBC, you are still using Raspberry OS with DietPi scripts on top. Means, the graphic tool should work exactly same way :)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
vords
Posts: 16
Joined: Wed Feb 10, 2021 8:41 pm

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by vords »

Joulinar wrote: Sat Feb 20, 2021 2:14 pm Hi,

if you use a Raspberry Pi SBC, you are still using Raspberry OS with DietPi scripts on top. Means, the graphic tool should work exactly same way :)

Hello Joulinar.

Sorry i meant : I've removed Raspberry Pi OS and reflash / made a fresh new install of Dietpi on my RPi4.

But if it is the same, then my question is :
Raspberry Pi OS use a graphical bluetooth tool in Pixel (that i dont know the name of), and witch doesn't seems available on lxde.

So :
- should i install it on lxde ? (but what is the name of that tool).
- should i install blueman ?
- should i go with bluetoothctl

;)
User avatar
MichaIng
Site Admin
Posts: 3266
Joined: Sat Nov 18, 2017 6:21 pm

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by MichaIng »

We could check which GUI tool is pre-installed with Raspberry Pi OS. However, blueman should work just fine. Assure to enable Bluetooth through dietpi-config > Advanced Options so that the device tree part/modules and hciuart (to enable the internally UART-attached RPi onboard Bluetooth adapter) services are up. bluez/bluetoothctl are installed automatically then. If you need a GUI is then a personal preference/convenience question only, AFAIK blueman is just a bluez/bluetoothctl frontend for desktops, nothing more.
vords
Posts: 16
Joined: Wed Feb 10, 2021 8:41 pm

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by vords »

MichaIng wrote: Sat Feb 20, 2021 3:19 pm We could check which GUI tool is pre-installed with Raspberry Pi OS. However, blueman should work just fine. Assure to enable Bluetooth through dietpi-config > Advanced Options so that the device tree part/modules and hciuart (to enable the internally UART-attached RPi onboard Bluetooth adapter) services are up. bluez/bluetoothctl are installed automatically then. If you need a GUI is then a personal preference/convenience question only, AFAIK blueman is just a bluez/bluetoothctl frontend for desktops, nothing more.
Hello Michalng.

Alright, thanks for your answer !
I will try with blueman and let you know if i have any issues i can't solve alone.
vords
Posts: 16
Joined: Wed Feb 10, 2021 8:41 pm

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by vords »

So, i've managed to connect the keyboard and the ps4 controler, with blueman. It works fine.

But, i do have the same issue than with the raspberry pi official OS, it doesn't work after a reboot.

After every reboot, i need to do :
systemctl daemon-reload
systemctl restart bluetooth
then devices can be connected.

I've already wrote about it here : https://www.raspberrypi.org/forums/view ... 0#p1820498

Could you tell me at witch github should i open a "issue" about it ?
Raspberry os ? BlueZ ?

Sorry, it's not that much a Dietpi issue / subject.
User avatar
Joulinar
Posts: 5688
Joined: Sat Nov 16, 2019 12:49 am

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by Joulinar »

If the issue happen on plain RPi OS, it should be fine to report back on their GitHub
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3266
Joined: Sat Nov 18, 2017 6:21 pm

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by MichaIng »

We could with an effective bug report and check why it fails at boot. Could you check:

Code: Select all

journalctl -u bluetooth -u hciuart
vords
Posts: 16
Joined: Wed Feb 10, 2021 8:41 pm

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by vords »

MichaIng wrote: Sun Feb 21, 2021 12:58 pm We could with an effective bug report and check why it fails at boot. Could you check:

Code: Select all

journalctl -u bluetooth -u hciuart
Hello Michalng.

Here is the log :

févr. 21 19:00:53 DietPi systemd[1]: Starting Configure Bluetooth Modems connected by UART...
févr. 21 19:01:00 DietPi btuart[221]: bcm43xx_init
févr. 21 19:01:00 DietPi btuart[221]: Flash firmware /lib/firmware/brcm/BCM4345C0.hcd
févr. 21 19:01:00 DietPi btuart[221]: Set Controller UART speed to 3000000 bit/s
févr. 21 19:01:00 DietPi btuart[221]: Device setup complete
févr. 21 19:01:00 DietPi systemd[1]: Started Configure Bluetooth Modems connected by UART.
févr. 21 19:01:01 DietPi systemd[1]: Starting Bluetooth service...
févr. 21 19:01:01 DietPi bluetoothd[402]: Bluetooth daemon 5.50
févr. 21 19:01:01 DietPi systemd[1]: Started Bluetooth service.
févr. 21 19:01:01 DietPi bluetoothd[402]: Starting SDP server
févr. 21 19:01:01 DietPi bluetoothd[402]: Bluetooth management interface 1.18 initialized
févr. 21 19:01:01 DietPi bluetoothd[402]: Sap driver initialization failed.
févr. 21 19:01:01 DietPi bluetoothd[402]: sap-server: Operation not permitted (1)
févr. 21 19:01:02 DietPi bluetoothd[402]: Failed to set privacy: Rejected (0x0b)
févr. 21 19:04:34 DietPi bluetoothd[402]: Terminating
févr. 21 19:04:34 DietPi systemd[1]: Stopping Bluetooth service...
févr. 21 19:04:34 DietPi bluetoothd[402]: Stopping SDP server
févr. 21 19:04:34 DietPi bluetoothd[402]: Exit
févr. 21 19:04:34 DietPi systemd[1]: bluetooth.service: Succeeded.
févr. 21 19:04:34 DietPi systemd[1]: Stopped Bluetooth service.
févr. 21 19:04:34 DietPi systemd[1]: Starting Bluetooth service...
févr. 21 19:04:34 DietPi bluetoothd[1062]: Bluetooth daemon 5.50
févr. 21 19:04:34 DietPi systemd[1]: Started Bluetooth service.
févr. 21 19:04:34 DietPi bluetoothd[1062]: Starting SDP server
févr. 21 19:04:34 DietPi bluetoothd[1062]: Bluetooth management interface 1.18 initialized
févr. 21 19:04:34 DietPi bluetoothd[1062]: Sap driver initialization failed.
févr. 21 19:04:34 DietPi bluetoothd[1062]: sap-server: Operation not permitted (1)
févr. 21 19:04:41 DietPi bluetoothd[1062]: Can't get HIDP connection info
févr. 21 19:04:46 DietPi bluetoothd[1062]: connect error: Host is down (112)
févr. 21 19:04:55 DietPi bluetoothd[1062]: Can't get HIDP connection info
févr. 21 19:05:00 DietPi bluetoothd[1062]: connect error: Host is down (112)

(Four last lane are erreor because i tried to connect to the ps4 controler witch was off.)
User avatar
MichaIng
Site Admin
Posts: 3266
Joined: Sat Nov 18, 2017 6:21 pm

Re: Bluetooth : keyboard / mouse / ps4 controler pairing

Post by MichaIng »

The SAP (SIM Access Profile) plugin fails. Not sure why it is loaded when not connecting to a mobile phone, or why it does not skip gracefully on non-SIM devices. Please try the following:

Code: Select all

mkdir /etc/systemd/system/bluetooth.service.d
echo -e '[Service]\nExecStart=\nExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap' > /etc/systemd/system/bluetooth.service.d/no-sap.conf
systemctl daemon-reload
systemctl restart bluetooth
Post Reply