Unable to Connect to Bluetooth

Hi all,
I just entered the world of Linux specifically via the Rock Pi4B. Thus far, with the help of the forum, I have got the Rock Pi4b to work properly, except for the bluetooth.

I cannot get it to detect any available bluetooth device. Neither can it be detected by the other bluetooth devices. I had even tried the commands given on wiki.radxa.com/RockpiS/Debian#Bluetooth but it still cannot detect or be detected by other bluetooth devices.

I am running the Debian stretch OS and would appreciate any help to get the bluetooth running.

Regards,
Liew

1 Like

Same problem here. Bumping up.

Workaround mentioned here for Radxa Debian Stretch:

No fix for Ubuntu for now. I’ve searched whole yesterday and tried some solutions - nothing works.

Check the bluetooth section of the Debian/Ubuntu page:

https://wiki.radxa.com/Rockpi4/Debian
https://wiki.radxa.com/Rockpi4/Ubuntu

After apt-get install broadcom-wifibt-firmware I am getting:

[0][09:33][root@rock][/] $ systemctl start bluetooth
[0][09:33][root@rock][/] $ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-02-01 09:33:53 CET; 1s ago
     Docs: man:bluetoothd(8)
 Main PID: 1146 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4564)
   CGroup: /system.slice/bluetooth.service
           └─1146 /usr/lib/bluetooth/bluetoothd

lut 01 09:33:53 rock systemd[1]: Starting Bluetooth service...
lut 01 09:33:53 rock bluetoothd[1146]: Bluetooth daemon 5.48
lut 01 09:33:53 rock systemd[1]: Started Bluetooth service.
lut 01 09:33:53 rock bluetoothd[1146]: Starting SDP server
lut 01 09:33:53 rock bluetoothd[1146]: kernel lacks bnep-protocol support
lut 01 09:33:53 rock bluetoothd[1146]: System does not support network plugin
lut 01 09:33:53 rock bluetoothd[1146]: Bluetooth management interface 1.10 initialized
[0][09:33][root@rock][/] $ hciconfig
[0][09:34][root@rock][/] $

Besides the package you might need updated firmware too.

Check this post:

Cant say for sure if the above is needed. If it works can be added to the wiki.

Seems like half way to success:

[0][10:09][root@rock][/] $ echo 1 > /sys/class/rfkill/rfkill0/state
[0][10:09][root@rock][/] $ brcm_patchram_plus1 -d --enable_hci --no2bytes\
> --use_baudrate_for_downloade --tosleep  200000 \
> --baudrate 1500000 --patchram \
> /system/etc/firmware/BCM4345C5.hcd /dev/ttyS0 \
> /dev/null 2>&1  &
> > /dev/null 2>&1  &
[1] 1674
[0][10:10][root@rock][/] $ hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
        DOWN
        RX bytes:2257 acl:0 sco:0 events:0 errors:0
        TX bytes:12 acl:0 sco:0 commands:3 errors:0
[0][10:10][root@rock][/] $ hcitool scan
Device is not available: No such device

Try restarting the bluetooth service after patching. Check if it works via command line hcitool or graphical blueman-manager.

It does not work. No device is visible with correct parameters.

I don’t have GUI, everything I am doing in shell.

Do you have Bluetooth working under Ubuntu?

Ok. I didnt test on Ubuntu, only on Debian.

It works! After today’s update and a reboot seems like Bluetooth device is now visible. So I will continue to work on it and in case sth wouldn’t work I will give info.

EDIT: Seems like I cannot configure my phone Mi 9 with Rock Pi’s bluetooth for Smart Lock (automatic unlocking when close to the Rock Pi). The connection is taking place, I can pair, trust but Mi 9 does not allow to Smart Lock with SBC (in bluetooth settings Rock Pi is visible with note that it is SBC) and seems like every reboot Rock Pi is changing bluetooth address to random one.

As an end user I will suggest you to purchase a USB bluetooth adapter + short USB extension cable.

I have found it works much more reliably.

Are you kidding? Kernel and drivers are the same, so there will be no significant difference. For what would be bluetooth on board then?

EDIT: As I said - there is no difference. I’ve just tried and both bluetooths - onboard and external connected via USB - are not fully working. I mean they connect to the phone losing connection from time to time but there is no way to use Rock Pi as Smart Lock for Mi 9 phone. Also there are general problems Rock Pi and Mi 9 finding each other.

Commands I’ve used:

apt install ap6256-firmware
apt install bluez
apt install bluez-tools
apt-get install bluetooth bluez blueman
apt-get install broadcom-wifibt-firmware
blueman-manager 
bluetoothctl
brcm_patchram_plus1 -d --enable_hci --no2bytes --use_baudrate_for_downloade --tosleep  200000 --baudrate 1500000 --patchram /system/etc/firmware/BCM4345C5.hcd /dev/ttyS0 > /dev/null 2>&1  &
bt-device -l
btmgmt
echo 1 > /sys/class/rfkill/rfkill0/state
hciconfig
hciconfig -a
hcitool
hcitool -a
hcitool dev
hcitool scan
service bluetooth restart
sudo apt-get install -y rtl8723ds-firmware bluez
systemctl reenable bluetooth
systemctl restart bluetooth
systemctl show bluetooth
systemctl start bluetooth
systemctl status bluetooth
systemctl stop bluetooth
1 Like

I guess smart lock requires BLE device?

1 Like