Skip to content

Instantly share code, notes, and snippets.

@mohclips
Last active March 25, 2024 06:11
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save mohclips/ad951c871ad77f451159eee51763d9a8 to your computer and use it in GitHub Desktop.
Save mohclips/ad951c871ad77f451159eee51763d9a8 to your computer and use it in GitHub Desktop.
Enable - Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
# EDIT - 01 Dec 2023 - Works without the below in Ubuntnu 22.04
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 040: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 044: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
# get the pre-compiled driver
$ wget https://github.com/Realtek-OpenSource/android_hardware_realtek/raw/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_fw
$ sudo cp rtl8761b_fw /lib/firmware/rtl_bt/rtl8761b_fw.bin
# unplug and replug the device back in
# check dmesg
[Wed Jan 27 21:16:23 2021] usb 1-1: new full-speed USB device number 44 using xhci_hcd
[Wed Jan 27 21:16:23 2021] usb 1-1: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
[Wed Jan 27 21:16:23 2021] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[Wed Jan 27 21:16:23 2021] usb 1-1: Product: USB1.1-A
[Wed Jan 27 21:16:23 2021] Bluetooth: hci1: CSR: Unbranded CSR clone detected; adding workarounds...
# check config
$ hciconfig
hci1: Type: Primary Bus: USB
BD Address: 00:1A:7D:DA:71:11 ACL MTU: 679:9 SCO MTU: 48:16
DOWN
RX bytes:642 acl:0 sco:0 events:41 errors:0
TX bytes:2130 acl:0 sco:0 commands:41 errors:0
# check rfkill
$ sudo rfkill
ID TYPE DEVICE SOFT HARD
1 wlan phy0 unblocked unblocked
186 bluetooth hci0 unblocked unblocked
189 bluetooth hci1 blocked unblocked
# unblock
$ sudo rfkill unblock 189
# check
$ sudo rfkill
ID TYPE DEVICE SOFT HARD
1 wlan phy0 unblocked unblocked
186 bluetooth hci0 unblocked unblocked
189 bluetooth hci1 unblocked unblocked
# do a scan
$ sudo hcitool -i hci1 lescan
LE Scan ...
71:5F:E7:16:56:22 (unknown)
71:5F:E7:16:56:22 (unknown)
@Daniel-Mejia-Leon
Copy link

man after sudo hcitool -i hci0 lescan i got "invalid device: Network is down.

@bv7
Copy link

bv7 commented Feb 23, 2022

does not work :(
sudo hcitool -i hci0 lescan i got "invalid device: Network is down.

@lacerda-j
Copy link

Friend thank you.
it worked, perfect!

@SahilLohan
Copy link

does not work :(
sudo hcitool -i hci0 lescan i got "invalid device: Network is down.

same problem with me
Screenshot from 2022-07-24 20-50-00

@Programmer-RD-AI
Copy link

Hi,
Has this issue been resolved?

@SahilLohan
Copy link

Nah ... Still same problem 😐😐

@exprodev
Copy link

exprodev commented Aug 8, 2022

Hi, Has this issue been resolved?

Nope :( Same "Invalid device: Network is down" problem at "sudo hcitool -i hci0 lescan"

@SahilLohan
Copy link

Still same ... Nothing changed

@mohclips
Copy link
Author

mohclips commented Aug 8, 2022

Folks, I don't own the rtl8761b_fw code, what you have here are my notes on how i got something working 2 years ago.
I'm not working on BLE anymore, so i don't envision i'll try and resolve this myself.

@exprodev
Copy link

exprodev commented Aug 8, 2022

Folks, I don't own the rtl8761b_fw code, what you have here are my notes on how i got something working 2 years ago. I'm not working on BLE anymore, so i don't envision i'll try and resolve this myself.

Bro ❤️

@Programmer-RD-AI
Copy link

Is there any other dongle to use Bluetooth in Ubuntu?
Any other version of the dongle.

@tlkmcorp
Copy link

tlkmcorp commented Jul 8, 2023

does not work :( sudo hcitool -i hci0 lescan i got "invalid device: Network is down.

with "sudo hciconfig hci1 up" fixed for me

@mohclips
Copy link
Author

mohclips commented Jul 8, 2023

yup, that probably means you have more than one Bluetooth device in your system

@SahilLohan
Copy link

yup, that probably means you have more than one Bluetooth device in your system

No, I only have one device

@erayerdin
Copy link

does not work :( sudo hcitool -i hci0 lescan i got "invalid device: Network is down.

with "sudo hciconfig hci1 up" fixed for me

this causes Can't init device hci0: Broken pipe (32) for me

@kakababu01
Copy link

does not work :( sudo hcitool -i hci0 lescan i got "invalid device: Network is down.

with "sudo hciconfig hci1 up" fixed for me

this causes Can't init device hci0: Broken pipe (32) for me

me too

@kakababu01
Copy link

hciconfig
hci0: Type: Primary Bus: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN
RX bytes:14 acl:0 sco:0 events:1 errors:0
TX bytes:3 acl:0 sco:0 commands:2 errors:1

and this

sudo hciconfig hci0 up
Can't init device hci0: Broken pipe (32)

@usmanghanni
Copy link

same is here

image

@mohclips
Copy link
Author

mohclips commented Dec 1, 2023

Folks,
This works out of the box in Ubuntu 22.04 so the above is not needed anymore.

os

$ head -n1 /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"

lsusb

$ lsusb | grep Blue
Bus 003 Device 005: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module
Bus 003 Device 026: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) <------- this one!

dmesg

[Fri Dec 1 20:01:22 2023] usb 3-1: new full-speed USB device number 26 using xhci_hcd
[Fri Dec 1 20:01:22 2023] usb 3-1: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
[Fri Dec 1 20:01:22 2023] usb 3-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[Fri Dec 1 20:01:22 2023] usb 3-1: Product: USB1.1-A
[Fri Dec 1 20:01:22 2023] Bluetooth: hci1: CSR: Setting up dongle with HCI ver=9 rev=0810
[Fri Dec 1 20:01:22 2023] Bluetooth: hci1: LMP ver=9 subver=2312; manufacturer=10
[Fri Dec 1 20:01:22 2023] Bluetooth: hci1: CSR: Unbranded CSR clone detected; adding workarounds and force-suspending once...
[Fri Dec 1 20:01:23 2023] Bluetooth: hci1: HCI Delete Stored Link Key command is advertised, but not supported.
[Fri Dec 1 20:01:23 2023] Bluetooth: hci1: HCI Read Default Erroneous Data Reporting command is advertised, but not supported.
[Fri Dec 1 20:01:23 2023] Bluetooth: hci1: HCI Set Event Filter command not supported.
[Fri Dec 1 20:01:23 2023] Bluetooth: MGMT ver 1.22
[Fri Dec 1 20:01:23 2023] NET: Registered PF_ALG protocol family
[Fri Dec 1 20:01:23 2023] Bluetooth: RFCOMM TTY layer initialized
[Fri Dec 1 20:01:23 2023] Bluetooth: RFCOMM socket layer initialized
[Fri Dec 1 20:01:23 2023] Bluetooth: RFCOMM ver 1.11

hcitool

$ hciconfig
hci1: Type: Primary Bus: USB
BD Address: 00:1A:7D:DA:71:11 ACL MTU: 679:9 SCO MTU: 48:16
UP RUNNING
RX bytes:684 acl:0 sco:0 events:48 errors:0
TX bytes:3126 acl:0 sco:0 commands:48 errors:0

hci0: Type: Primary Bus: USB
BD Address: F8:2F:A8:FD:01:DC ACL MTU: 0:0 SCO MTU: 0:0
DOWN
RX bytes:342 acl:0 sco:0 events:9 errors:0
TX bytes:27 acl:0 sco:0 commands:9 errors:0

check rfkill

$ sudo rfkill | grep blue
1 bluetooth ideapad_bluetooth unblocked unblocked
3 bluetooth hci0 unblocked unblocked
8 bluetooth hci1 unblocked unblocked

run a scan

$ sudo hcitool -i hci1 lescan
LE Scan ...
D9:00:00:0B:77:7C (unknown)
D9:00:00:06:F4:D6 (unknown)
D9:00:00:06:F4:D6 (unknown)
D9:00:00:0B:77:7C (unknown)
D9:00:00:05:45:7E (unknown)

@mklf7
Copy link

mklf7 commented Mar 25, 2024

Moi je suis sur Ubuntu 22.04.4 LTS, je viens d'acheter un dongle bluetooth 5.0
Quand je tape lsusb, le dongle est reconnu 'Bus 002 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)', j'ai déjà installé blueman mais quand j'active via le paramètre, il reste désactivé. Puis j'ai essayé avec le terminal et ça m'a répondu
=> "power on
No default controller available"
j'ai déjà redémarré et tout mais ça ne marche toujours pas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment