9

Like Bluetooth dongle problem.(probably regarding the driver) I experience the same problem that the bluetooth device won't initialize properly:

$ lsusb | grep Bluetooth
Bus 001 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

$ usb-devices | awk '/0a12/' RS=
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  6 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a12 ProdID=0001 Rev=88.91
S:  Product=USB1.1-A
C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

$ hciconfig -a hci0
hci0:   Type: Primary  Bus: USB
    BD Address: 00:1A:7D:DA:71:11  ACL MTU: 679:9  SCO MTU: 48:16
    DOWN 
    RX bytes:574 acl:0 sco:0 events:30 errors:0
    TX bytes:368 acl:0 sco:0 commands:30 errors:0
    Features: 0xff 0xff 0xc5 0xfa 0xdb 0xbf 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH HOLD SNIFF PARK 
    Link mode: SLAVE ACCEPT

$ hcidump
...
> HCI Event: Command Complete (0x0e) plen 12
    Read Local Version Information (0x04|0x0001) ncmd 1
    status 0x00
    HCI Version: 4.0 (0x6) HCI Revision: 0x810
    LMP Version: 4.0 (0x6) LMP Subversion: 0x1113
    Manufacturer: Cambridge Silicon Radio (10)
...
> HCI Event: Command Complete (0x0e) plen 6
Delete Stored Link Key (0x03|0x0012) ncmd 1
status 0x11 deleted 0
Error: Unsupported Feature or Parameter Value

You will only see the last HCI Event for Error: Unsupported Feature or Parameter Value as long as you have not applied the patch. After the patch you wont see the event/command in the output of hcidump.

It works fine in Windows 10, but not in Ubuntu 18.04 (also not with kernel 5.3). Blueman is not recognizing the Bluetooth devices.

I get this when inserting the Bluetooth USB dongle:

jan 26 21:10:38 some-computer kernel: usb 1-1.3: new full-speed USB device number 6 using ehci-pci
jan 26 21:10:38 some-computer kernel: usb 1-1.3: config 1 interface 1 altsetting 0 endpoint 0x3 has wMaxPacketSize 0, skipping
jan 26 21:10:38 some-computer kernel: usb 1-1.3: config 1 interface 1 altsetting 0 endpoint 0x83 has wMaxPacketSize 0, skipping
jan 26 21:10:38 some-computer kernel: usb 1-1.3: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
jan 26 21:10:38 some-computer kernel: usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
jan 26 21:10:38 some-computer kernel: usb 1-1.3: Product: USB1.1-A
jan 26 21:10:38 some-computer systemd[1]: Starting Load/Save RF Kill Switch Status...
jan 26 21:10:38 some-computer systemd[1]: Started Load/Save RF Kill Switch Status.
jan 26 21:10:38 some-computer systemd[1]: Reached target Bluetooth.
jan 26 21:10:38 some-computer upowerd[9037]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.1
jan 26 21:10:38 some-computer upowerd[9037]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0
jan 26 21:10:38 some-computer upowerd[9037]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3
jan 26 21:10:38 some-computer kernel: [UFW BLOCK] IN=eno1 OUT= MAC= SRC=<REMOVED from output by me!> DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=939113 PROTO=UDP SPT=8612 DPT=8612 LEN=24 

I hope someone has a hint as what to do.

I have some supplemental information.

It is about this one: https://launchstudio.bluetooth.com/listingdetails/75270 And likely relevant chip(s) are: http://en.barrot.com.cn/a/BR80XX-series/48.html and http://en.barrot.com.cn/a/BR200Xxilie/12.html

Note: I was asked by @Pilot6 to create this as a separate question to avoid that my previous comments (added as an answer in the question referred to in the start) will get deleted.

Images found on the Internet that matches specific 'BQB 75270' LMP Subversions (identified by user):

LMP Subversion (a.l): 0x1113

LMP Subversion (BXL - product 3 in image below): 0x1712

LMP Subversions currently unknown for products 1 and 2 below.

Click for larger image: Other BQB75270 dongles

karel
  • 110,292
  • 102
  • 269
  • 299
a.l
  • 181
  • 1
  • 1
  • 8
  • It seems that there is ongoing work to get the dongle to work re. https://bugzilla.kernel.org/show_bug.cgi?id=60824#c48 (although the patch might not be quite perfect yet according to Fabio Scaccabarozzi) It seems it is a fake CSR chip made by Barrot that only supports Bluetooth 4.0 (I am not sure although.) Initially I found the mention of this through https://www.reddit.com/r/AnnePro/comments/e76ij8/csr_40_bluetooth_dongle_on_linux/ Next step seems to be testing the patch made by Fabio Scaccabarozzi... – a.l Jan 27 '20 at 13:22
  • Working together with Fabio Scaccabarozzi re. making a patch that both works for the fake dongles and the legit CSR König dongle. The legit CSR König dongle already works today without using a patch. Link: https://www.konigelectronic.com/computer/networking/bluetooth-usb-adapter-v40-550426279 . We obviously want to make sure that existing dongles continue to work in the Linux kernel. – a.l Jan 28 '20 at 16:04
  • I'm having the same problem with this same device. Can you keep us update? – absentia Feb 02 '20 at 19:49
  • @BXL and others please test the patch mentioned in the "Please test" section above and please make sure to follow the steps mentioned in the "How to determine if you have the same dongle" section. :) Thanks If you need advice on how to compile a Ubuntu Linux kernel please just say so - I made some notes... – a.l Feb 05 '20 at 17:36
  • 1: Could not check the content of btusd.c in the section **Please test** 2-Could not reproduce all steps from section **How to determine if you have the same dongle**. After step 4 I got `Can't init device hci0: Operation not supported (95)` – absentia Feb 06 '20 at 01:43
  • Why don't you post the solution part as an answer? – Pilot6 Feb 08 '20 at 11:44
  • Thanks Pilot6 :) You are right. It makes it easier to grasp! – a.l Feb 08 '20 at 11:53
  • @BXL and others: I was not clear enough in my explanation. I am sorry about that! I have updated the 'Please test' section and steps 4. and 5. – a.l Feb 08 '20 at 11:54
  • I got `LMP Subversion: 0x1512` for the photo with text mark '1'. – LiuYan 刘研 Apr 24 '20 at 06:49

1 Answers1

7

It was possible to make a patch that makes the dongle work in Linux, but we have some work to do before we get it into the kernel. So the dongle is using a fake CSR chip made by Barrot as previously mentioned. We need to contact the linux kernel maintainers for bluetooth support, but before we do that we need more people than me to confirm that it works. And then I will post our findings here: https://bugzilla.kernel.org/show_bug.cgi?id=60824#c48 and then lastly contact the kernel maintainers (and try to comply with the 'Tips for patch submitters' https://www.kernel.org/doc/linux/MAINTAINERS )


UPDATE 28. december 2020: Since I haven't had time for months to work on a patch for the linux kernel please feel free to post your findings on the bug page mentioned right above and contact the kernel maintainers thereafter if everything goes well.


Please test

Anyone who would like kernel support please test this patch and write back with your results in the comments. I used kernel 5.3. Your kernel may vary in regards to line numbers etc. You might want to check these re. how to check out Ubuntu kernels - unless you use kernels from https://www.kernel.org/:

https://wiki.ubuntu.com/KernelTeam/GitKernelBuild and How/where to clone current 18.04 kernel (5.0.0-37-generic), specifically using Git and https://unix.stackexchange.com/questions/46077/where-to-download-linux-kernel-source-code-of-a-specific-version/46088#46088 and https://stackoverflow.com/questions/8519880/git-checkout-exclude-tags-remotes-from-possibilities-list and https://stackoverflow.com/questions/3404936/show-which-git-tag-you-are-on/3405221#3405221 (I used: git checkout Ubuntu-hwe-5.3.0-28.30_18.04.1) :

diff -Nuar btusb.c_OLD btusb.c
--- btusb.c_OLD 2020-01-29 12:32:30.383536820 +0100
+++ btusb.c 2020-01-29 12:33:49.579840488 +0100
@@ -1599,7 +1599,8 @@
 
    /* Detect controllers which aren't real CSR ones. */
    if (le16_to_cpu(rp->manufacturer) != 10 ||
-       le16_to_cpu(rp->lmp_subver) == 0x0c5c) {
+       le16_to_cpu(rp->lmp_subver) == 0x0c5c ||
+            le16_to_cpu(rp->lmp_subver) == 0x1113) {
        /* Clear the reset quirk since this is not an actual
         * early Bluetooth 1.1 device from CSR.
         */
@@ -3851,7 +3852,7 @@
            set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
 
        /* Fake CSR devices with broken commands */
-       if (bcdDevice <= 0x100 || bcdDevice == 0x134)
+       if (bcdDevice <= 0x100 || bcdDevice == 0x134 || bcdDevice == 0x8891)
            hdev->setup = btusb_setup_csr;
 
        set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);

, file is located in the kernel source: drivers/bluetooth

How to determine if you have the same dongle

  1. Insert your USB bluetooth dongle into a usb port of your computer.

  2. Have two terminal windows open.

  3. In the first window please start:

     hcidump
    

Ubuntu: You can install the program via the 'bluez-hcidump' package.

  1. In the second window please start:

     sudo hciconfig hci0 down
    
     sudo hciconfig hci0 up
    

Make sure that you enable the bluetooth dongle in your bluetooth manager or you will get an error message e.g.:

Can't init device hci0: Operation not supported (95)

(for those not running with the patch (or incorrect/unsupported dongle))

Can't init device hci0: Operation not possible due to RF-kill (132)

(will likely be shown if your dongle is supported/the patch got applied)

You can install the hciconfig program and obviously need it for bluetooth support Ubuntu: 'bluez' package.

  1. Now locate in the first terminal the lines:

     \> HCI Event: Command Complete (0x0e) plen 12
         Read Local Version Information (0x04|0x0001) ncmd 1
    

Make sure you have the same output of hciconfig stated in the top of the question for this event/command.

We e.g. need to know the LMP Subversion and Manufacturer, to be sure that it is the same as the dongle I refer to.

  1. Make sure you have the same output of hciconfig stated in the top of the of the question for this event/command:

     \> HCI Event: Command Complete (0x0e) plen 6
     Delete Stored Link Key (0x03|0x0012) ncmd 1
    

, re. status and does it return "Error: Unsupported Feature or Parameter Value". As mentioned above you will only see this message as long as you have not applied the patch.

  1. Make sure you have the same output of usb-devices re. your usb bluetooth dongle stated in the top of the question for this command:

     usb-devices | awk '/0a12/' RS=
    

Ubuntu: You need to install package 'usbutils' package to get the program usb-devices.

a.l
  • 181
  • 1
  • 1
  • 8
  • My Ubuntu is 19.10 and kernel is 5.3.0. Which step should I follow ? In my point of view, since I'm running the newest Kernel's version, I should simply write the patch in the bsusb file Am I right? if it is the case, how can I write the patch to bsusb file, since it is a binary? – absentia Feb 09 '20 at 14:41
  • 1
    You will have to compile your own kernel so that you can apply the patch. E.g. follow the guide https://wiki.ubuntu.com/KernelTeam/GitKernelBuild (from 'Please test' section above that also has some tips/other links). Follow that guide until step 4. Apply the patch either by hand or by using the 'patch' command ( https://www.thegeekstuff.com/2014/12/patch-command-examples/ ). Then continue the guide step 5. and onwards. (You likely wont want to do the extra steps in the 'Using Ubuntu Kernel Configuration' simply for testing the patch.) I hope it helps. :) – a.l Feb 09 '20 at 15:01
  • I followed all the steps in the tutorial and the patch didn't worked for me. – absentia Feb 09 '20 at 21:20
  • What did the output of `usb-devices | awk '/0a12/' RS=` yield with respect to: Ver, Vendor, ProdID, Rev and Product? What did `hcidump` output right after the lines `> HCI Event: Command Complete (0x0e) plen 12 Read Local Version Information (0x04|0x0001) ncmd 1` , with respect to LMP Subversion, HCI Revision, Manufacturer? I am trying to deduce whether your device is identical to my Bluetooth dongle. Regardless we will see if there is a path to also get your device to work. :) – a.l Feb 09 '20 at 22:30
  • `usb-devices | awk '/0a12/' RS= ` T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 12 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0a12 ProdID=0001 Rev=88.91 S: Product=USB1.1-A C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#=0x1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb `hcdump ` : HCI Version: 4.0 (0x6) HCI Revision: 0x810 LMP Version: 4.0 (0x6) LMP Subversion: 0x1712 Manufacturer: Cambridge Silicon Radio (10) – absentia Feb 09 '20 at 22:47
  • 1
    Okay, and the packaging material is like on the screenshot? (I am just curious, but it seems we have different devices!) You will have to modify the patch/btusb.c source file so that it corresponds to `LMP Subversion: 0x1712`. That means that the line in the patch: `le16_to_cpu(rp->lmp_subver) == 0x1113) {` should be changed to `le16_to_cpu(rp->lmp_subver) == 0x1712) {` and thereafter you have to build the kernel again. Does it work? – a.l Feb 09 '20 at 23:02
  • I made the change you suggest and it worked. Now the problem is to pair. – absentia Feb 10 '20 at 02:42
  • Great! I use Ubuntu 18.04/Unity and the bluetooth manager of the distribution as well as blueman-manager (package: blueman). For Ubuntu 19.10 there is some help here: https://help.ubuntu.com/stable/ubuntu-help/bluetooth.html.en / https://help.ubuntu.com/stable/ubuntu-help/bluetooth-connect-device.html.en The manager people keep talking about however seems to be blueman(-manager). Does your dongle / the packaging look like the image attached in the question? If yes, we might want to make a joined patch for inclusion in the kernel (and update the answer above.) Please let me know. Thanks – a.l Feb 10 '20 at 10:29
  • This image in my package was different. However it pointed to the same URL as in yours – absentia Feb 10 '20 at 11:13
  • 1
    There is no need to compile a kernel. You can compile only `btusb.ko`. The best thing is to make a dkms package. See my PPA https://launchpad.net/~hanipouspilot/+archive/ubuntu/bluetooth as an example. There is plenty of this sort of fixes. – Pilot6 Feb 10 '20 at 12:48
  • @Pilot6: Great! I will take a look. My main aim is to make this Q&A a collection of these related dongles (BQB 75270) and then push for getting them into mainline kernel (e.g. post kernel 5.6 release and make a unified patch - at least for those dongles were we have confirmed information (like mine and BXL's)), because for the average person all what we do to get the dongles to work is kind of hard to accomplish. Thanks again for your help! :) – a.l Feb 10 '20 at 13:28
  • 1
    Meanwhile you can create a PPA that will have this fixed till the patch gets into Ubuntu. If you have troubles with that welcome to ask. Ping me... – Pilot6 Feb 10 '20 at 13:35
  • **Background info**: I have checked up on what LMP Subversion means. I found a pdf online, but I won't link to it, but someone might be interested and google it by searching for 'bluetooth specifications book' and look at page 700 and 740. The subversion parameter is controlled by the manufacturer. It would normally be used to control revisions of the hardware with respect to design and error fixing. My guess is the dongles function more or less in the same way, but that the subversion parameter simply has been changed so that the dongles are distinguishable. – a.l Feb 10 '20 at 13:45
  • @BXL I hope you have success pairing! I have updated the question so that it holds your device too with the LMP Subversion number. Please (if any) which of the dongles shown in the new image of the question (1, 2 or 3) matches your Bluetooth device? (I will then add the info to the question.) Thanks :) – a.l Feb 10 '20 at 13:47
  • @a.l The thrird figure. – absentia Feb 10 '20 at 13:49
  • @Pilot6, can you help a little with how to compile only one module `btusb.ko`. Just direct me to the right documentation. I use Debian Stretch and the kernel 5.2+ from kernel.org. – 18augst Feb 22 '20 at 09:40
  • I haven't had time yet to make the setup, but e.g. head over to https://launchpad.net/~hanipouspilot/+archive/ubuntu/bluetooth . Click 'View package details' (middle of the page a bit to the right). Filter by 'Published' - just click 'Filter' button. Then expand e.g. 'btrtl-rtl8723de-dkms - 0.2'. From the 'Package files' section download the tar.gz file. Unpack the content, exchange the source file with that of your debian kernel source, patch it, adjust the build files and build and install. You might also want to download some of the btusb-xxxx files (Pilot6's PPA repository) for comparison. – a.l Feb 23 '20 at 02:55
  • I have the dongle marked 2 in your photos above. This is the relevant output from hcidump: `HCI Event: Command Complete (0x0e) plen 12 Read Local Version Information (0x04|0x0001) ncmd 1 status 0x00 HCI Version: 4.0 (0x6) HCI Revision: 0x810 LMP Version: 4.0 (0x6) LMP Subversion: 0x1512 Manufacturer: Cambridge Silicon Radio (10)` So the dongles on photo 2 have LPM subversion 0x1512. By [candeira](https://askubuntu.com/users/1091313/candeira) – VidathD Jun 05 '20 at 10:46
  • @BXL were you able to apply the patch? I am trying to make the dongle work in Ubuntu 20.4 but in vain. – mangatinanda Dec 27 '20 at 07:34
  • @a.l I tried the steps you have mentioned but couldn't make it work. Please let me know when you have a installable patch available for Ubuntu. – mangatinanda Dec 27 '20 at 08:20
  • @mangatinanda Unfortunately I do not have time at the moment. Anyone that reads this please feel free to create a combined patch or individual patches (which you test obviously in advance) and write to https://bugzilla.kernel.org/show_bug.cgi?id=60824#c48 as mentioned above with your findings. If everything goes well you may want to contact the kernel maintainers to get the patch included. – a.l Dec 27 '20 at 23:19