RPI 400 Bluetooth not searching

Hello, I have problems to connect a BT-Keyboard to my RPI400. using the actual build fir Rpi4/400
I activate the Bluetooth and start search. It immediately stops searching.
No message in the gui.
Here is the log:
2021-12-12 14:04:00.212 T:521 INFO : Loading skin file: /usr/share/kodi/addons/service.osmc.settings/resources/skins/Default/1080i/settings_gui_720.xml, load type: LOAD_ON_GUI_INIT
2021-12-12 14:04:00.358 T:551 ERROR : EXCEPTION: Non-Existent Control 300
2021-12-12 14:04:04.895 T:521 INFO : Loading skin file: /usr/share/kodi/addons/script.module.osmcsetting.networking/resources/skins/Default/1080i/network_gui.xml, load type: LOAD_ON_GUI_INIT
2021-12-12 14:04:21.930 T:637 WARNING : addons must not activate DialogBusy
2021-12-12 14:05:21.958 T:521 INFO : NFS is idle. Closing the remaining connections.
2021-12-12 14:05:35.073 T:637 WARNING : addons must not activate DialogBusy
2021-12-12 14:05:35.156 T:521 INFO : Samba is idle. Closing the remaining connections
2021-12-12 14:05:40.058 T:637 WARNING : addons must not activate DialogBusy
2021-12-12 14:05:52.578 T:637 WARNING : addons must not activate DialogBusy

Using the same BT-Keyboard and the same OSMC Version on a RPI4 it works well.

I saw that there is no default BT device:

osmc@osmcWZ:~$ bluetoothctl
[bluetooth]# show
No default controller available

How to set / enable it on the RPI400 ?

Does WiFi work?

Have you checked you are on the latest version?

Wifi works and it’s OSMC 2021-11-2

It looks like the endpoint gets unregistered shortly after reboot:

osmc@osm:/boot$ cat uploadlog.txt |grep -i bluetooth
ii  armv7-bluezalsa-osmc                 3.1.0-7                             armhf        Bluetooth audio streaming for OSMC
ii  libbluetooth3:armhf                  5.50-1.2~deb10u2                    armhf        Library to use the BlueZ Linux Bluetooth stack
Dec 15 20:46:06 osmcWZ kernel: Bluetooth: Core ver 2.22
Dec 15 20:46:06 osmcWZ kernel: Bluetooth: HCI device and connection manager initialized
Dec 15 20:46:06 osmcWZ kernel: Bluetooth: HCI socket layer initialized
Dec 15 20:46:06 osmcWZ kernel: Bluetooth: L2CAP socket layer initialized
Dec 15 20:46:06 osmcWZ kernel: Bluetooth: SCO socket layer initialized
Dec 15 20:46:07 osmcWZ kernel: Bluetooth: hci0: unexpected event for opcode 0x0000
Dec 15 20:46:07 osmcWZ systemd[1]: Starting Broadcom 43xx bluetooth HCI...
Dec 15 20:46:07 osmcWZ kernel: Bluetooth: HCI UART driver ver 2.3
Dec 15 20:46:07 osmcWZ kernel: Bluetooth: HCI UART protocol H4 registered
Dec 15 20:46:07 osmcWZ kernel: Bluetooth: HCI UART protocol Three-wire (H5) registered
Dec 15 20:46:07 osmcWZ kernel: Bluetooth: HCI UART protocol Broadcom registered
Dec 15 20:46:07 osmcWZ systemd[1]: Started Broadcom 43xx bluetooth HCI.
Dec 15 20:46:07 osmcWZ systemd[1]: Starting Bluetooth service...
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Bluetooth daemon 5.43
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Starting SDP server
Dec 15 20:46:07 osmcWZ systemd[1]: Started Bluetooth service.
Dec 15 20:46:07 osmcWZ kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Dec 15 20:46:07 osmcWZ kernel: Bluetooth: BNEP filters: protocol multicast
Dec 15 20:46:07 osmcWZ kernel: Bluetooth: BNEP socket layer initialized
Dec 15 20:46:07 osmcWZ dbus-daemon[238]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.9' (uid=0 pid=407 comm="/usr/libexec/bluetooth/bluetoothd ")
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Bluetooth management interface 1.18 initialized
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Failed to obtain handles for "Service Changed" characteristic
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Endpoint registered: sender=:1.13 path=/org/bluez/hci0/A2DP/AAC/Source/1
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Endpoint registered: sender=:1.13 path=/org/bluez/hci0/A2DP/AAC/Source/2
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Endpoint registered: sender=:1.13 path=/org/bluez/hci0/A2DP/AAC/Sink/1
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Endpoint registered: sender=:1.13 path=/org/bluez/hci0/A2DP/AAC/Sink/2
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Endpoint registered: sender=:1.13 path=/org/bluez/hci0/A2DP/SBC/Source/1
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Endpoint registered: sender=:1.13 path=/org/bluez/hci0/A2DP/SBC/Source/2
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Endpoint registered: sender=:1.13 path=/org/bluez/hci0/A2DP/SBC/Sink/1
Dec 15 20:46:07 osmcWZ bluetoothd[407]: Endpoint registered: sender=:1.13 path=/org/bluez/hci0/A2DP/SBC/Sink/2
Dec 15 20:46:10 osmcWZ systemd[1]: Reached target Bluetooth.
**Dec 15 20:46:37 osmcWZ bluetoothd[407]: Endpoint unregistered: sender=:1.13 path=/org/bluez/hci0/A2DP/AAC/Source/1**
**Dec 15 20:46:37 osmcWZ bluetoothd[407]: Endpoint unregistered: sender=:1.13 path=/org/bluez/hci0/A2DP/AAC/Source/2**
**Dec 15 20:46:37 osmcWZ bluetoothd[407]: Endpoint unregistered: sender=:1.13 path=/org/bluez/hci0/A2DP/AAC/Sink/1**
**Dec 15 20:46:37 osmcWZ bluetoothd[407]: Endpoint unregistered: sender=:1.13 path=/org/bluez/hci0/A2DP/AAC/Sink/2**
**Dec 15 20:46:37 osmcWZ bluetoothd[407]: Endpoint unregistered: sender=:1.13 path=/org/bluez/hci0/A2DP/SBC/Source/1**
**Dec 15 20:46:37 osmcWZ bluetoothd[407]: Endpoint unregistered: sender=:1.13 path=/org/bluez/hci0/A2DP/SBC/Source/2**
**Dec 15 20:46:37 osmcWZ bluetoothd[407]: Endpoint unregistered: sender=:1.13 path=/org/bluez/hci0/A2DP/SBC/Sink/1**
**Dec 15 20:46:37 osmcWZ bluetoothd[407]: Endpoint unregistered: sender=:1.13 path=/org/bluez/hci0/A2DP/SBC/Sink/2**
-rw-r--r--  1 root root   424 Jun 17 17:58 bluetooth.service
-rw-r--r--  1 root root   419 Feb 14  2019 bluetooth.target
[    6.862589] Bluetooth: Core ver 2.22
[    6.862650] Bluetooth: HCI device and connection manager initialized
[    6.862665] Bluetooth: HCI socket layer initialized
[    6.862672] Bluetooth: L2CAP socket layer initialized
[    6.862686] Bluetooth: SCO socket layer initialized
[    7.002748] Bluetooth: hci0: unexpected event for opcode 0x0000
[    7.398656] Bluetooth: HCI UART driver ver 2.3
[    7.398668] Bluetooth: HCI UART protocol H4 registered
[    7.399044] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    7.400131] Bluetooth: HCI UART protocol Broadcom registered
[    7.512110] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    7.512121] Bluetooth: BNEP filters: protocol multicast
[    7.512139] Bluetooth: BNEP socket layer initialized

See Logs at: https://paste.osmc.tv/ininenusix

I have a Pi 400, so I can check when I get a chance and see if I can reproduce

1 Like

Some more information:

First I had installed OSMC_TGT_rbp4_20211129.img.gz but it had no HDMI signal on both of the RPI400 outputs after booting.

Then I have formatted the Card and installed OSMC_TGT_rbp4_20210808.img.gz.
The output was fine after booting. The I have updated the system using the OSMC Gui to the latest version. Now everything seems to work except the Bluetooth search for the BT Keyboard.

Any findings on this issue?

Unfortunately I have not had a change to look at this yet.

Can you confirm if the Bluetooth is working as expected on your Pi 400 under Raspberry Pi OS?

Thanks

Sam

I, too, had some problems to get a working bluetooth connection on my raspberry pi 3. But I had the (wrong) assumtion that OSMC would do an automatic bluetooth connection during first installation.

My solution was to follow the instructions from Bluetooth-Konfiguration im Terminal mit bluetoothctl | kofler.info, and now bluetooth is working fine for me.

Maybe the link (but in German) is of some help,
Michael

The user is reporting issues with a Pi 400.

Bluetooth on Pi 3 is definitely working.

I can confirm that Bluetooth works with the RPI 400 using RPI OS.
But still not with the latest Version of OSMC.

Can you grab dmesg from RPI-OS?

In dmesg it looks exactly like on my RPI 4 (scanning works on RPI 4 but not on RPI 400):

osmc@osmcWZ:~$ dmesg |grep -i bluet
[   13.726661] Bluetooth: Core ver 2.22
[   13.726754] Bluetooth: HCI device and connection manager initialized
[   13.726769] Bluetooth: HCI socket layer initialized
[   13.726777] Bluetooth: L2CAP socket layer initialized
[   13.726789] Bluetooth: SCO socket layer initialized
[   13.742264] Bluetooth: HCI UART driver ver 2.3
[   13.742275] Bluetooth: HCI UART protocol H4 registered
[   13.742336] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   13.742485] Bluetooth: HCI UART protocol Broadcom registered
[   13.886559] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   13.886569] Bluetooth: BNEP filters: protocol multicast
[   13.886581] Bluetooth: BNEP socket layer initialized

But I found out that a Link was missing on the RPI 400:

sudo ln -s /lib/firmware /etc/firmware

Now it can scan and pair (without PIN) to my Logi K810 keyboard.

It works fine. But after a reboot or a power cycle of the keyboard the connection does not come up again.
It needs to be paired again.
I have tried also on the RPI 4 and it also needs to be re-paired after a reboot on the RPI 4.
I have used the LOGI K810 with OSMC on a RPI 3 in the past without any problems.

Any clue on how to make the pairing trusted?

Here’s some more information:

osmc@osmcSZ:~$ sudo bluetoothctl
[NEW] Controller B8:27:EB:08:56:0D osmcSZ [default]
[NEW] Device 00:1F:20:91:99:37 Logitech K810
[Logitech K810]# info 00:1F:20:91:99:37
Device 00:1F:20:91:99:37
        Name: Logitech K810
        Alias: Logitech K810
        Class: 0x002540
        Icon: input-keyboard
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: yes
        UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
        UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v046DpB319d1202

trust <ID>

I did did trust 00:1F:20:91:99:37, but still won’t reconnect after a reboot. See my last post above.

Btw: a pair with pin didn’t work.

Not sure if it comes from you running bluetoothctl with sudo. Maybe remove all configs with sudo and then do again only sudo

I assume you used the same SD card on both Pi 4 and Pi 400 using the same version of OSMC?

This isn’t an ideal solution and full dmesg output would be appreciated.

Sam

OK. It works now.

I used bluetoothctl (without sudo) to pair the KB.
Pairing in the GUI with MyOSMC / Network did not pair (with Pin).

However sudo ln -s /lib/firmware /etc/firmware was needed to get the RPI400’s BT adapter to be seen by bluetoothctl.

Thanks

Markus

I would appreciate if you posted dmesg output before and after the symlink so I can fix this properly.