Realtek RTL8761B

From LinuxReviews
Jump to navigationJump to search

Realtek RTL8761B is a USB Bluetooth 5.0 dongle chip made by Realtek. It is identified by lsusb as 0bda:8771 Realtek Semiconductor Corp. Most of the cheaper BT 5.0 dongles, like the C-TECH BTD-01, use this chip.

Linux Support[edit]

The RTL8791B dongle chip has been supported by the bt_rtl (CONFIG_BT_RTL) driver since Linux 5.8.

You will need to upgrade your kernel to 5.8+ if you have an older kernel and you want to use this dongle.

CONFIG_BT_RTL is not listed as its own item in menuconfig in Linux 5.11, which can be a bit confusing. You should choose Networking support ▸ Bluetooth subsystem support ▸ Bluetooth device drivers ▸ HCI USB driver and the two options both named Realtek protocol support in that same menu (BT_HCIBTUSB_RTL and BT_HCIUART_RTL). You will then find that BT_RTL is enabled if you press / and search for BT_RTL.

The driver requires firmware. The firmware package shipped with most GNU/Linux distributions tend to just provide a /lib/firmware/rtl_bt/rtl8761a_fw.bin file for the RTL8761A model.

The firmware files for the RTL8761B can be acquired from the github.com/Realtek-OpenSource/android_hardware_realtek firmware repository using these links:

These firmware files need to be copied and renamed to:

  • /usr/lib/firmware/rtl_bt/rtl8761b_fw.bin OR /lib/firmware/rtl_bt/rtl8761b_fw.bin
  • /usr/lib/firmware/rtl_bt/rtl8761b_config.bin OR /lib/firmware/rtl_bt/rtl8761b_config.bin

It does not matter which location you copy the firmware files to on most distributions. Fedora and many others have a symbolic link from /lib/ to /usr/lib (making them the same folder).

Something called "Arch" has these firmware files available as a package called rtl8761b-fw (aur: rtl8761b-fw).

Links[edit]

Robert Síbek has written a tutorial with screenshots for the C-TECH BTD-01 dongle (actually the RTL8761B chip) specific to Ubuntu 20.10.


avatar

Linuxuzer

23 months ago
Score 0++

`linux-firmware package` still doesn't contains firmware files for 8761B version. They can be compiled and added manually. Also it works on kernels before 5.8 but with kernel patch.

I made it works on 5.4 kernel as described here: https://foru...237#p1917237
avatar

Horror-vacui

19 months ago
Score 0++

I am running Xubuntu 20.04.2 LTS with kernel 5.11.6-051106-generic, but the bluetooth firmware was not included. After downloading the two linked rtl8761b_* files, it was working, without restarting anything. Unfortunately the communication quality is not great (data from blueman-manager): -signal strength 40% -link quality 10% -transmit power level 50%

The above data was obtained when I was sitting half a meter from the adapter, and they are also confirmed by experience. Walking a few meter away, the connection starts to break... Is there any trick with which the range can be improved.
avatar

Anonymous (fc92e40d1b)

13 months ago
Score 0

Avoid usb 3.0 ports as they may interfere.

Get an adapter with a better antenna, even external.
avatar

Mershl

17 months ago
Score 0++
Running Fedora 34 with latest linux-firmware also requires manually providing the rtl8761b firmware. As far as I can see rtl8761a is already available in linux-firmware. Is there a problem with rtl8761b or is it on the roadmap to be included in upstream?
avatar

Anonymous (cde9f771)

17 months ago
Score 0

When I copied over the `*_config` file, then the usb loaded with config where the driver was `btusb` rather than `bt_rtl`, and that lead to a successful demsg output but `bluetoothctl list` would still not detect anything.

After deleting the `*_config` file, it worked (because it might've tried some default configuration, I guess)
avatar

Anonymous (fab07f9e)

17 months ago
Score 0
Same here, had to delete the _config file
avatar

Anonymous (063d8a83)

16 months ago
Score 0

Hi, I have issue with this device/fw on debian testing. It is working some time after restart. Do you have any solution for this ?

Bluetooth: hci0: Received unexpected HCI Event 00000000 Bluetooth: hci0: Received unexpected HCI Event 00000000 Bluetooth: hci0: Received unexpected HCI Event 00000000 Bluetooth: hci0: Received unexpected HCI Event 00000000 Bluetooth: hci0: Received unexpected HCI Event 00000000 Bluetooth: hci0: command 0x1002 tx timeout Bluetooth: hci0: No gpio to reset Realtek device, ignoring Bluetooth: hci0: Received unexpected HCI Event 00000000 Bluetooth: hci0: command 0x1002 tx timeout Bluetooth: hci0: No gpio to reset Realtek device, ignoring Bluetooth: hci0: command 0x1002 tx timeout Bluetooth: hci0: No gpio to reset Realtek device, ignoring Bluetooth: hci0: command 0x1002 tx timeout

Bluetooth: hci0: No gpio to reset Realtek device, ignoring
avatar

Anonymous (a0d4bc5b)

16 months ago
Score 0
Which firmware are you using, the one provided in the link above or the firmware-realtek in the Bullseye repository?
avatar

Anonymous (ce03da0d4b)

16 months ago
Score 0

OS: Debian 11 (Bullseye) Bluetooth dongle: orico Bluetooth 5.0 - BTA-508 Kernel: 5.10.0-6-amd64

After moving the firmware provided above to "/lib/firmware/rtl_bt/" bluetooth finally works on my system, but it is not perfect, my headphones work fine but my bluetooth keyboard constantly disconnects and reconnects. this happens very fast it disconnects for only a fraction of a second and then reconnects again, I wouldn't find this a issue if were not to happen so frequently.

I tried different ways, different config files all over the place but I still can't fix the issue, which is very weird since the same does not happen with my headphones, on windows 10 after installing the proper driver the same does not happen and the keyboard works fine, so I am inclined to believe this issue to be related to the linux firmware as oppose to have a faulty device.
avatar

Anonymous (f652be644c)

16 months ago
Score 0

Good news! RTL8761B has been added upstream to linux-firmware 3 days ago

https://git....9640a4880296
avatar

Anonymous (4918ca965b)

15 months ago
Score 0
going to buy this bluetooth dongle for kernel 5.11 ubuntu is it buggy
avatar

Anonymous (f652be954a)

15 months ago
Score 0
It has been working perfectly for me (3 BT devices connected at the same time). Good news as well: Yesterdays linux-firmware release includes the necessary firmware now. Which means it should work out-of-the-box for more and more distros down the line (Fedora 34 has it in testing now, will hit stable in the next days).
avatar

Anonymous (6b48b17efb)

14 months ago
Score 0

Confirming new entry in the linux-firmware package - rtl_bt: Add rtl8761b/rtl8761bu firmware Fedora 34, Updates repository (aka no more Testing repository)

Hooray~!
avatar

Anonymous (d18f541a81)

14 months ago
Score 0
ㅎㅎㅎ
avatar

Anonymous (d18f541a81)

14 months ago
Score 0

https://aur....rtl8761b-fw/

This link shows 404 NOT FOUND. It seems that the original post has been removed.

In my config. of Linux 16.04 LTS, Kernel 4.15, the bluetooth (based on RealTek8761B chipset) of my PC still does not work at all after following every solution including this post.
avatar

Anonymous (527ed41a81)

14 months ago
Score 0
same here above link https://aur....rtl8761b-fw/ is not working for me either. any other solution that newbie can follow?
avatar

LazyGeek

13 months ago
Score 0++

I got it working!

Thanks to Anonymous (d18f541a81) who posted the (now defunct) link to the AUR package: https://aur....rtl8761b-fw/

I was able to find an archived copy of this page, here: https://raw..../rtl8761b_fw

In the "Sources" section, there's a direct link to the driver: https://web..../rtl8761b_fw

This will give you a driver file named "rtl8761b_fw", and you only need to put this file into your /usr/lib/firmware/rtl_bt/ directory, and rename it "rtl8761b_fw.bin".

Here's the command that made it work for me (being in the same dir where I downloaded the driver file):

sudo cp rtl8761b_fw /usr/lib/firmware/rtl_bt/rtl8761b_fw.bin

Then, REBOOT... Just to make sure everything is loaded correctly. It should work! If it still doesn't, then you should follow the instructions from this wiki page: https://wiki...le/Bluetooth

Cheers!
avatar

LazyGeek

13 months ago
Score 0++

oops, isn't there any way to edit our previous post?

The archived copy of the mentioned page is HERE: https://web....rtl8761b-fw/

anyway, the other links are fine, and you can click them to directly download the driver...

)
avatar

Anonymous (40786a0df6)

13 months ago
Score 0

Thanks for this. Worked perfectly for Ubuntu 20.04.2 LTS, kernel 5.11.

I downloaded both files and sudo cp to /usr/lib/firmware/rtl_bt/ and renamed both to .bin.

I rebooted and device is working.

Cheers,

Michael
avatar

Anonymous (46d5c6e716)

12 months ago
Score 0
Can you help me how step by step?
avatar

Anonymous (22d0836563)

12 months ago
Score 0
In Debian (and likely Ubuntu) the firmware is in the package "firmware-realtek", since version package version 20210818-1.
avatar

Anonymous (05b668e23e)

10 months ago
Score 0
On bullseye, it seems like firmware-realtek is older than this version (my repos have only 20210315-3). Had to install them on my own.
avatar

Anonymous (8d3bebe65b)

9 months ago
Score 0

Thank you. I tested it myself on debian 11, and after installing and rebooting it works. Only just started testing it, but so far so good. The file I downloaded was from debian.org:

https://pack...tek/download
avatar

Anonymous (8d3bedd83f)

10 months ago
Score 0

I can't get this working with any of the advice above or on the Arch Bluetooth Wiki.

I have noticed I can temporarily get it working by sending the device to a virtual machine (windows) and then bringing it back.

I notice that the HCI version drops to 5.0 instead of 5.1

Anyone have any ideas?
avatar

Imfred

10 months ago
Score 0++

I can confirm that temporarily sending the device to a virtual machine that loads the firmware can work. In my case, this was a Ubuntu 21.10 live ISO virtual machine. This is the first Ubuntu version with the appropriate rtl8761bu_fw.bin firmware file for my device.

If sending the device to a Windows virtual machine lowers the HCI version, this is probably because that virtual machine has a driver with an older firmware version. I would suggest using Ubuntu 21.10, or at least updating the Windows driver.

Remark: although the rtl8761b_fw.bin is also present in Ubuntu 21.10, the rtl8761bu_fw.bin (where the "u" seems to stand for USB) was used by the driver for my device. It seems that there are multiple firmware versions for the RTL8761B. It may be useful to try both.
avatar

Anonymous (8d3bedd83f)

10 months ago
Score 0

I managed to get it working by rebuilding the kernel on Arch.

I must say though; it isn't great. HFP does not work at all; only A2DP. When lowering the firmware version using the VM trick it works wonderfully, there doesn't appear to be any other firmwares around though.

Did you get your RTL8761BU_FW from the OpenSource link above?
avatar

Anonymous (8d3bedd83f)

10 months ago
Score 0

So yeah; back to where I was before.....Rebuild the kernel....Modify btusb.c with addition

/* Additional Realtek 8761BU Bluetooth devices */ { USB_DEVICE(0x2550, 0x8761), .driver_info = BTUSB_REALTEK | BTUSB_WIDEBAND_SPEECH },


Arch then loads the firmware on insert....Stole the firmware from the Ubuntu Live CD..moved it over

A2DP works. HFP; no sound

Any ideas?
avatar

Anonymous (8fbe724705)

5 months ago
Score 0
Can you please confirm doing this fix HFP profile issue ?
avatar

Anonymous (8d3bedd83f)

10 months ago
Score 0

Nightmare. Got it sorted though.

So more module modifications....If anyone finds this and has the same problem, these lines need changing...

alts only works as 1 for my adapter HFP, I tried 6 and 3.

if (btusb_find_altsetting(data, 6)) new_alts = 6; else if (btusb_find_altsetting(data, 3) && hdev->sco_mtu >= 72 && test_bit(BTUSB_USE_ALT3_FOR_WBS, &data->flags)) new_alts = 1; /* MY EDIT - WAS 3 */ else new_alts = 1;

Also to note; given the same btrtl file, 5.10.79 wants to find firmware file as '/lib/firmware/rtl_bt/rtl8761b_fw.bin'

Where as 5.15.2 wants to find '/lib/firmware/rtl_bt/rtl8761bu_fw.bin'

This is due to the HCI revision appearing to change between the two
avatar

Anonymous (05b668e23e)

10 months ago
Score 0
Thanks for the firmware files! I'm running a Debian Bullseye based distro and I didn't have them, thought I just didn't have support at all.
avatar

Anonymous (b13de7761e)

8 months ago
Score 0

Yes. its working on "neon" (KDE UBUNTU). But audio level isn't normalized.

checking firmware :

  1. sudo dmesg | grep Bluetooth | grep -e [Ff]irmware

Bluetooth: hci0: RTL: assuming no firmware upload needed

if firmware wasn't loaded :

Bluetooth: hci0: RTL: firmware file ..... not found
avatar

Anonymous (b13deb488a)

8 months ago
Score 0

I'm on PopOS 21.10 (based on Ubuntu 21.10 with kernel Linux pop-os 5.15.11-76051511-generic #202112220937~1640185481~21.10~b3a2c21 SMP Wed Dec 22 15:41:49 U x86_64 x86_64 x86_64 GNU/Linux).

I have a dongle branded as MaxUni 5.1 EDR Dongle, shows as "0bda:a725 Realtek Semiconductor Corp. Bluetooth Radio". I had to replace the "rtl8761b_fw.bin" with the firmware included with the device in the drivers ("rtl8761b_mp_chip_bt40_fw_asic_rom_patch_new.dat") in order to get it to work with USB 3.0, and now it works flawlessly so maybe the firmware isn't quite as universal as it needs to be.
avatar

Anonymous (8fbe724705)

5 months ago
Score 0
Hi can you please share the process how to replace ?
avatar

Anonymous (36c3618b56)

7 months ago
Score 0

In the second line you wrote :

The RTL8791B dongle chip
avatar

Anonymous (f06c644b86)

6 months ago
Score 0

These devices have pairing issues, specially with BLE devices. The following patch is required:

https://patc...iodev.co.uk/
avatar

Anonymous (f06c644b86)

6 months ago
Score 0
Updated to add the devices listed here in the commit message: https://patc...iodev.co.uk/
avatar

Anonymous (f06c644b86)

6 months ago
Score 0
8d3bedd83f did you submit this to upstream???
avatar

Anonymous (8fbe724705)

5 months ago
Score 0

with this chipset I have stuttering issue when using HFP profile with mSBC codec. I am using pipewire 0.3.50, wireplumber master, with linux 5.17.4 (Arch Linux) If someone have the issue please send me further process. thank you.

Kind regards,

Sourav Das <souravdas142@gmail.com>
avatar

Anonymous (c7f3d749ff)

9 minutes ago
Score 0
is it correct that device`s class 1? after installing driver can`t change inqtpl via hciconfig
Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.