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” ?
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.
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).
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.
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:
Strange. You could try to further defer the start by e.g. 30 seconds instead of 10. When a restart solves it, at least a fresh service start at that time should work as well.
Ah one test could be:
systemctl disable bluetooth
reboot
systemctl start bluetooth
If this works, it is ruled out that one service stop or a second start is for whatever reason required to have it working.
Another thing we could try it a kernel downgrade. There were quite a few other issues reported that were solved by downgrading to Linux 5.4. Then we’d know that it’s something to report to the RPi kernel repository: https://github.com/raspberrypi/linux/issues
Could you tell me how can i downgrade the kernel on Dietpi please ? I dont know the process.
Well, DietPi is not providing any kernel. If I’m not mistaken you are on a Raspberry Pi. Therefore you would need to use Raspberry Foundation tools to perform this. It’s possible by using rpi-update.
So based on the test result it seems that the service must fail one and is then able to start. Probably on first failure it creates some environment or actives the BT hardware somehow so that the second start succeeds. systemctl daemon-reload should be obsolete since the systemd unit content does not change.
So as workaround, allowing one automated restart in case of failure via service options should work.
journalctl -u bluetooth -u hciuart
-- Logs begin at Thu 2019-02-14 11:11:58 CET, end at Mon 2021-03-01 15:37:28 CET. --
mars 01 15:31:54 DietPi systemd[1]: Starting Configure Bluetooth Modems connected by UART...
mars 01 15:32:02 DietPi btuart[221]: bcm43xx_init
mars 01 15:32:02 DietPi btuart[221]: Flash firmware /lib/firmware/brcm/BCM4345C0.hcd
mars 01 15:32:02 DietPi btuart[221]: Set Controller UART speed to 3000000 bit/s
mars 01 15:32:02 DietPi btuart[221]: Device setup complete
mars 01 15:32:02 DietPi systemd[1]: Started Configure Bluetooth Modems connected by UART.
mars 01 15:32:02 DietPi systemd[1]: Starting Bluetooth service...
mars 01 15:32:02 DietPi bluetoothd[399]: Bluetooth daemon 5.50
mars 01 15:32:02 DietPi systemd[1]: Started Bluetooth service.
mars 01 15:32:02 DietPi bluetoothd[399]: Starting SDP server
mars 01 15:32:02 DietPi bluetoothd[399]: Excluding (cli) sap
mars 01 15:32:02 DietPi bluetoothd[399]: Bluetooth management interface 1.14 initialized
mars 01 15:32:03 DietPi bluetoothd[399]: Failed to set privacy: Rejected (0x0b)
Now…
root@DietPi:~# systemctl daemon-reload
root@DietPi:~# systemctl restart bluetooth
Keyboard appear in the list of connectable device.
Wireless controler does connect after few try : Turning controler ON > Controler blink > Select connect to Human Interface Device Service in blueman > Some Data Activity indicator show up and down and controler turn off by him self.
After few try it does connect and stay stable.
Here are the logs.
journalctl -u bluetooth -u hciuart
mars 01 15:40:56 DietPi bluetoothd[399]: Terminating
mars 01 15:40:56 DietPi systemd[1]: Stopping Bluetooth service...
mars 01 15:40:56 DietPi bluetoothd[399]: Stopping SDP server
mars 01 15:40:56 DietPi bluetoothd[399]: Exit
mars 01 15:40:56 DietPi systemd[1]: bluetooth.service: Succeeded.
mars 01 15:40:56 DietPi systemd[1]: Stopped Bluetooth service.
mars 01 15:40:56 DietPi systemd[1]: Starting Bluetooth service...
mars 01 15:40:56 DietPi bluetoothd[1019]: Bluetooth daemon 5.50
mars 01 15:40:56 DietPi systemd[1]: Started Bluetooth service.
mars 01 15:40:56 DietPi bluetoothd[1019]: Starting SDP server
mars 01 15:40:56 DietPi bluetoothd[1019]: Excluding (cli) sap
mars 01 15:40:56 DietPi bluetoothd[1019]: Bluetooth management interface 1.14 initialized
mars 01 15:41:54 DietPi bluetoothd[1019]: Authentication attempt without agent
mars 01 15:41:54 DietPi bluetoothd[1019]: Access denied: org.bluez.Error.Rejected
mars 01 15:42:02 DietPi bluetoothd[1019]: Can't get HIDP connection info
mars 01 15:42:07 DietPi bluetoothd[1019]: connect error: Host is down (112)
mars 01 15:42:15 DietPi bluetoothd[1019]: Can't get HIDP connection info
mars 01 15:42:16 DietPi bluetoothd[1019]: connect error: Operation already in progress (114)
mars 01 15:42:17 DietPi bluetoothd[1019]: Authentication attempt without agent
mars 01 15:42:17 DietPi bluetoothd[1019]: Access denied: org.bluez.Error.Rejected
mars 01 15:42:42 DietPi bluetoothd[1019]: Authentication attempt without agent
mars 01 15:42:42 DietPi bluetoothd[1019]: Access denied: org.bluez.Error.Rejected
mars 01 15:42:45 DietPi bluetoothd[1019]: Can't get HIDP connection info
mars 01 15:42:50 DietPi bluetoothd[1019]: connect error: Host is down (112)
mars 01 15:42:59 DietPi bluetoothd[1019]: Can't get HIDP connection info
mars 01 15:42:59 DietPi bluetoothd[1019]: Refusing input device connect: Operation already in progress (114)
dmesg
[ 535.785363] debugfs: File 'le_min_key_size' in directory 'hci0' already present!
[ 535.785373] debugfs: File 'le_max_key_size' in directory 'hci0' already present!
[ 601.745742] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 601.745757] Bluetooth: HIDP socket layer initialized
[ 658.489213] sony 0005:054C:09CC.0001: unknown main item tag 0x0
[ 658.513258] input: Wireless Controller Touchpad as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:09CC.0001/input/input1
[ 658.513575] input: Wireless Controller Motion Sensors as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:09CC.0001/input/input2
[ 658.514246] input: Wireless Controller as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:09CC.0001/input/input0
[ 658.514493] sony 0005:054C:09CC.0001: input,hidraw0: BLUETOOTH HID v81.00 Gamepad [Wireless Controller] on b8:27:eb:d6:4d:70
So, it doesn’t connect after reboot, so i’m not sure that it is a kernel issue.