Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth not working for Asus Bt-400 0b05:17cb Broadcom BCM20702A0 - Controller not found #2494

Open
dcs3spp opened this issue Apr 7, 2018 · 11 comments

Comments

@dcs3spp
Copy link

@dcs3spp dcs3spp commented Apr 7, 2018

Hi,

I have bluetooth dongle (Asus Bt-400 ) that I am using on a Raspberry Pi Model B (v1). I cannot seem to get bluetooth working. I am running kernel 4.14.32-1, with Arch Linux ARM installed. I am using Bluez 5.49. The bluetooth dongle is connected to a USB hub, LOGIK - L4THUB10. The details for the bluetooth usb dongle when I run lsusb is given as:

Bus 001 Device 006: ID 0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth

When I run the following bluetoothctl commands no controller is found.

bluetoothctl
Agent registered
[bluetooth]# agent on
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# list
[bluetooth]# 

I have to shutdown the raspberry pi, power off the usb usb, power on again and hope that the controller device is recognised by bluetoothctl. Sometimes this works, sometimes it doesn't.

I have tried the following:

  1. Installed the firmware file, BCM20702A1-0b05-17cb.hcd, for the device, available from community Arch Packages. This is installed at /usr/lib/firmware/brcm.
  2. Downloaded the Asus windows driver and inspected the inf file to identify the correct hex driver file for the device. Subsequently I used hex2hcd for my device and installed the firmware file (BCM20702A1-0b05-17cb.hcd) at /usr/lib/firmware/brcm
  3. Built bluez-utils-compat 5.49-1 from Arch community repository to test with deprecated bluetooth toolset.

When I run dmesg | egrep -i 'blue|firm' I get the following dmesg output....

[    1.816784] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-03-16 16:17
[   25.250290] Bluetooth: Core ver 2.22
[   25.301799] Bluetooth: HCI device and connection manager initialized
[   25.432350] Bluetooth: HCI socket layer initialized
[   25.539945] Bluetooth: L2CAP socket layer initialized
[   25.657534] Bluetooth: SCO socket layer initialized
[   26.034466] Bluetooth: hci0: BCM: chip id 63
[   26.138468] Bluetooth: hci0: BCM: features 0x07
[   26.276530] Bluetooth: hci0: BCM20702A
[   26.291533] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000
[   28.889841] Bluetooth: hci0 command 0xfc4c tx timeout
[   36.230097] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   36.244019] Bluetooth: BNEP filters: protocol multicast
[   36.470289] Bluetooth: BNEP socket layer initialized
[   36.970529] Bluetooth: hci0: BCM: Patch command fc4c failed (-110)
[   39.209790] Bluetooth: hci0 command 0x1001 tx timeout
[   39.537967] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   39.844410] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[   47.209794] Bluetooth: hci0: BCM: Reading local version info failed (-110)

Sometimes I also get the following...

dmesg | egrep -i 'blue|firm'
[    1.816785] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-03-16 16:17
[   25.002668] Bluetooth: Core ver 2.22
[   25.066306] Bluetooth: HCI device and connection manager initialized
[   25.189457] Bluetooth: HCI socket layer initialized
[   25.289129] Bluetooth: L2CAP socket layer initialized
[   25.397880] Bluetooth: SCO socket layer initialized
[   25.793880] Bluetooth: hci0: BCM: chip id 63
[   27.908806] Bluetooth: hci0 command 0xfc6e tx timeout
[   35.353127] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   35.353140] Bluetooth: BNEP filters: protocol multicast
[   35.353177] Bluetooth: BNEP socket layer initialized
[   36.329932] Bluetooth: hci0: BCM: Read controller features failed (-110)
[   37.389283] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   37.453147] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36

When I plug the bluetooth dongle into the usb hub, many instances of the message below is logged. This only happens when I plug the bluetooth dongle into the USB hub. The hub is running other USB devices. The message is not logged when I remove the bluetooth device from the hub.

WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

I have also tried modifying the systemd bluetooth.service to be configured and run before the networking service as suggested at Arch Linux Wiki. Furthermore, if I run rfkill the device is listed as unblocked.

sudo rfkill list
[sudo] password for alarm: 
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

Modules listed by lsmod are included below:

Module                  Size  Used by
ccm                    20480  3
bnep                   20480  2
arc4                   16384  2
rt2800usb              28672  0
rt2800lib             110592  1 rt2800usb
rt2x00usb              20480  1 rt2800usb
rt2x00lib              53248  3 rt2800lib,rt2800usb,rt2x00usb
mac80211              647168  3 rt2800lib,rt2x00lib,rt2x00usb
btusb                  40960  0
btrtl                  16384  1 btusb
btbcm                  16384  1 btusb
btintel                16384  1 btusb
cfg80211              577536  2 rt2x00lib,mac80211
bluetooth             356352  12 btrtl,btintel,bnep,btbcm,btusb
crc_ccitt              16384  1 rt2800lib
ecdh_generic           28672  1 bluetooth
bcm2835_rng            16384  0
rng_core               16384  1 bcm2835_rng
uio_pdrv_genirq        16384  0
fixed                  16384  0
uio                    16384  1 uio_pdrv_genirq
sch_fq_codel           20480  5
snd_bcm2835            32768  0
snd_pcm                94208  1 snd_bcm2835
snd_timer              32768  1 snd_pcm
snd                    65536  3 snd_timer,snd_bcm2835,snd_pcm
crypto_user            16384  0
ip_tables              24576  0
x_tables               24576  1 ip_tables
ipv6                  434176  40

Upon inspecting the code for the btusb driver I notice the following at lines 156-158:

/* ASUSTek Computer - Broadcom based */
{ USB_VENDOR_AND_INTERFACE_INFO(0x0b05, 0xff, 0x01, 0x01),
.driver_info = BTUSB_BCM_PATCHRAM },

There does not appear to be an individual usb device configuration for the bluetooth dongle, e.g.
{ USB_DEVICE(0x0b05, 0x17cb) }

Is this a bluetooth driver issue or an issue with usb hub driver?

Kind Regards
dcs3spp

@pelwell
Copy link
Contributor

@pelwell pelwell commented Apr 9, 2018

The driver used to include the correct vendor:device code, but that was removed by a 2015 patch that consolidated support for a variety of Broadcom-based devices into a single entry.

Have you tried dynamically adding the ID to the driver? From http://www.techpository.com/linux-asus-bt400-bluetooth-adapter-issue/:

sudo su -
modprobe -v btusb
echo “0b05 17cb” >> /sys/bus/usb/drivers/btusb/new_id
@dcs3spp
Copy link
Author

@dcs3spp dcs3spp commented Apr 9, 2018

Hi,

Many thanks for responding. I have just tried suggestion of dynamically adding ID to the driver. Ran bluetoothctl again and the controller is still not listed.

It seems that the only way I can gain access to the controller is to power off the hub and pi completely and reboot. Alternatively, the controller appears when running bluetoothctl, if I remove the device from the USB hub and wait for about 10 secs and then plug it back in. However, if I subsequently reboot the raspberry pi the controller is not accessible again.

Could the issue be related to something not resetting bluetooth usb device state upon system reboot?

@pelwell
Copy link
Contributor

@pelwell pelwell commented Apr 9, 2018

Does attaching the dongle directly to the Pi make it more reliable? [ I understand that this may not be a viable long-term option for you. ]

@dcs3spp
Copy link
Author

@dcs3spp dcs3spp commented Apr 10, 2018

Thanks again for responding. Just gave this and go and plugged into USB on the Pi. Yes controller is accessible. So maybe this suggests an issue with usb driver or usb hub, relating to the messages WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

@pelwell
Copy link
Contributor

@pelwell pelwell commented Apr 10, 2018

Any thoughts, @P33M ?

@P33M
Copy link
Contributor

@P33M P33M commented Apr 10, 2018

The message spam occurs with other devices as well. Can you try the tests in #2408 ?

@dcs3spp
Copy link
Author

@dcs3spp dcs3spp commented Apr 10, 2018

Thanks for responding @P33M. Will have a read through and will post the results once have ran the tests.

@dcs3spp
Copy link
Author

@dcs3spp dcs3spp commented Apr 10, 2018

Hi, have issued a comment for #2408.

Using dwc_otg.fiq_fsm_mask=0x0 in cmdline.txt clears the messages, WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode.

However, issue remains with bluetooth device being unavailable. After these tests, tried again inserting the usb device into Pi usb port and this time was unavailable.

[   25.000236] Bluetooth: Core ver 2.22
[   25.060142] NET: Registered protocol family 31
[   25.073411] Bluetooth: HCI device and connection manager initialized
[   25.199965] Bluetooth: HCI socket layer initialized
[   25.260031] Bluetooth: L2CAP socket layer initialized
[   25.351568] Bluetooth: SCO socket layer initialized
[   25.570883] usbcore: registered new interface driver btusb
[   26.671208] random: crng init done
[   27.119880] usb 1-1.3.1: reset high-speed USB device number 6 using dwc_otg
[   27.271010] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[   27.322489] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[   27.471682] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   27.500641] usbcore: registered new interface driver rt2800usb
[   27.610078] Bluetooth: hci0 command 0x0c03 tx timeout
[   28.197981] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   32.970289] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   32.983712] Bluetooth: BNEP filters: protocol multicast
[   33.136518] Bluetooth: BNEP socket layer initialized
[   35.097168] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   35.230395] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[   35.689887] Bluetooth: hci0: BCM: Reset failed (-110)
[   36.451045] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
@dcs3spp
Copy link
Author

@dcs3spp dcs3spp commented Apr 12, 2018

Some further info......

Removing and reloading the btusb module makes the controller available again.

sudo modprobe -r btusb
sudo modprobe -v btusb

The question is, why is the controller unavailable after performing a soft reboot?

@JamesH65
Copy link
Contributor

@JamesH65 JamesH65 commented May 11, 2018

@P33M Any further ideas?

@JamesH65
Copy link
Contributor

@JamesH65 JamesH65 commented Jun 29, 2018

@P33M Any thoughts on progressing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.