Monday, October 11, 2021

Realtek USB Bluetooth Dongle with chip rtl8761b does not work on Linux

This post it to make Realtek Dongle with rtl8761b chipset working under any Linux districution

Symptom

Symptom-1: 

Syslog has below messages

Oct 11 11:54:37 nau20 kernel: [11338.462764] Bluetooth: hci1: RTL: loading rtl_bt/rtl8761b_fw.bin
Oct 11 11:54:37 nau20 kernel: [11338.463293] bluetooth hci1: Direct firmware load for rtl_bt/rtl8761b_fw.bin failed with error -2
Oct 11 11:54:37 nau20 kernel: [11338.463298] Bluetooth: hci1: RTL: firmware file rtl_bt/rtl8761b_fw.bin not found


Symptom-1: 

Blutooth adapter show DOWN

$ hciconfig -a
hci1: Type: Primary  Bus: USB
BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
DOWN 
RX bytes:21 acl:0 sco:0 events:2 errors:0
TX bytes:6 acl:0 sco:0 commands:2 errors:0
Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DH1 HV1 
Link policy: 
Link mode: SLAVE ACCEPT 


FIX

Your linux distribution does not have firmware for this chipset. Use below command to get Open Sourvce firmware and install it


    cd /tmp
    wget https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_config
    wget https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_fw
    sudo mv rtl8761b_config /lib/firmware/rtl_bt/rtl8761b_config.bin
    sudo mv rtl8761b_fw /lib/firmware/rtl_bt/rtl8761b_fw.bin
    sudo ls -l /lib/firmware/rtl_bt/rtl8761b_config.bin /lib/firmware/rtl_bt/rtl8761b_fw.bin
    sudo modprobe btusb
    sudo systemctl start bluetooth.service
    hciconfig -a # will show that Bluetooth is up now


Usb adapter should work now!

Reference: 

https://github.com/Realtek-OpenSource/android_hardware_realtek