You are not logged in.

#1 2014-07-05 03:56:01

Zenther
Member
Registered: 2012-07-22
Posts: 7

[Solved] Failing to get bluetooth device loaded and seen

Hello I am attempting to get the bluetooth working that is on my Asus Maximus VI Extreme motherboard going. It is a mPCIE card but regesters as a usb. Here is the hardware info:

usb-devices output:

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=04 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0b05 ProdID=17cf Rev=01.12
S:  Manufacturer=Broadcom Corp
S:  Product=BCM20702A0
S:  SerialNumber=240A64072544
C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)

lspci output of WIFI card it is part of

08:00.0 Network controller: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)

I was following this thread to recreate what was already accomplished for a BCM20702A0 bluetooth

I downloaded the windows driver from the asus website, looked up 0b05:17cf and found it used BCM20702A1_001.002.014.1315.1350.hex firmware. I then extracted this file and used  hex2hcd to convert it to an hcd file.

 sudo hec2hcd BCM20702A1_001.002.014.1315.1350.hex /usr/lib/firmware/fw-0b05_17cf.hcd

I copied in my device id into /sys/bus/usb/drivers/btusb/new_id as instructed early in the thread:

sudo echo "0b05 17cf" > /sys/bus/usb/drivers/btusb/new_id

I wasn't even sure if that was needed as lsusb already listed the device under that vendor id and product id and am not really sure what this accomplishes but I did it anyway.

I created a system unit file to load the firmware using a script.

[brian@prometheus ~]$ cat /etc/systemd/system/loadfw.service 
[Unit]                                                                                                                            
Description=Load firmware into BCM20702A0 bluetooth USB adapter                                                                   
After=basic.target                                                                                                                
After=suspend.target                                                                                                              
After=hibernate.target                                                                                                            
                                                                                                                                  
[Service]                                                                                                                         
Type=oneshot                                                                                                                      
ExecStart=/usr/bin/start_BCM20702A0.sh                                                                     
                                                                                                                                  
[Install]                                                                                                                         
WantedBy=basic.target                                                                                                             
WantedBy=suspend.target                                                                                                           
WantedBy=hibernate.target

I also copied the following into the script file and made it executable:

[brian@prometheus ~]$ cat /usr/bin/start_BCM20702A0.sh 
#!/bin/bash

#
# BCM20702A0 BT Adapter upload rampatch

# env Variables
logfile=/var/log/rampatch.log

# logfile check
if ! test -f ${logfile} ; then
    # logfile does not exist, so create it
    touch $logfile
fi

echo "-------------------------------------------------------" >> $logfile
entrytime=$(date +"%Y-%m-%d %H:%M:%S")
echo $entrytime " applying rampatch to BCM20702A0 bluetooth adapter" >> $logfile

# wait for hci0 to become available and usable
sleep 1
/usr/bin/brcm_patchram_plus_usb --patchram /lib/firmware/fw-0b05_17cf.hcd hci0 >> $logfile

entrytime=$(date +"%Y-%m-%d %H:%M:%S")                                                                                            
echo $entrytime " ..done" >> $logfile                                                                                             
echo "-------------------------------------------------------" >> $logfile

Running sudo systemctl start loadfw.service acts like it completes successfully however device hci0 could not be found and this is the output of systemctl status loadfw:
[brian@prometheus ~]$ systemctl status loadfw

 loadfw.service - Load firmware into BCM20702A0 bluetooth USB adapter
   Loaded: loaded (/etc/systemd/system/loadfw.service; enabled)
   Active: inactive (dead) since Fri 2014-07-04 19:05:50 CDT; 3h 20min ago
  Process: 5269 ExecStart=/usr/bin/start_BCM20702A0.sh (code=exited, status=0/SUCCESS)
 Main PID: 5269 (code=exited, status=0/SUCCESS)

Jul 04 19:05:50 prometheus start_BCM20702A0.sh[5269]: device hci0 could not be found

hcitool dev output is empty:

[brian@prometheus ~]$ hcitool dev
Devices:

rfkill only lists my wifi part of this mPCIE card:

[brian@prometheus ~]$ rfkill list all
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
[brian@prometheus ~]$ 

modules loaded:

[brian@prometheus ~]$ lsmod
Module                  Size  Used by
btusb                  19976  0 
tda18271               36928  2 
s5h1411                 9300  2 
bnep                   13277  2 
bluetooth             381422  6 bnep,btusb
6lowpan_iphc           11556  1 bluetooth
snd_usb_audio         131640  1 
snd_usbmidi_lib        21428  1 snd_usb_audio
snd_rawmidi            20278  1 snd_usbmidi_lib
snd_seq_device          5244  1 snd_rawmidi
gspca_zc3xx            44580  0 
gspca_main             24524  1 gspca_zc3xx
snd_hda_codec_hdmi     40396  1 
joydev                 10367  0 
mousedev               10912  0 
fuse                   84337  5 
snd_hda_codec_realtek    54803  1 
snd_hda_codec_generic    56366  1 snd_hda_codec_realtek
hid_logitech_dj        10430  0 
nls_iso8859_1           4485  2 
nvidia              10361512  40 
coretemp                6388  0 
x86_pkg_temp_thermal     7311  0 
nls_cp437               6017  2 
intel_powerclamp        9442  0 
vfat                   10631  2 
fat                    53688  1 vfat
kvm                   408583  0 
lib80211_crypt_tkip     8954  0 
crct10dif_pclmul        4714  0 
crc32_pclmul            2955  0 
crc32c_intel           14217  0 
ghash_clmulni_intel     4362  0 
aesni_intel           144871  0 
aes_x86_64              7463  1 aesni_intel
lrw                     3821  1 aesni_intel
gf128mul                6018  1 lrw
glue_helper             4737  1 aesni_intel
ablk_helper             2100  1 aesni_intel
wl                   4140810  0 
saa7164               116371  0 
cryptd                  8537  3 ghash_clmulni_intel,aesni_intel,ablk_helper
snd_hda_intel          22270  5 
eeepc_wmi               4712  0 
asus_wmi               16605  1 eeepc_wmi
tveeprom               14545  1 saa7164
snd_hda_controller     22911  1 snd_hda_intel
dvb_core               99819  1 saa7164
sparse_keymap           3242  1 asus_wmi
led_class               3611  1 asus_wmi
iTCO_wdt                5663  0 
hwmon                   3346  2 coretemp,asus_wmi
iTCO_vendor_support     1929  1 iTCO_wdt
v4l2_common             4891  1 saa7164
snd_hda_codec         104665  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
videodev              123032  4 saa7164,gspca_main,v4l2_common,gspca_zc3xx
evdev                  11784  8 
mxm_wmi                 1595  0 
lib80211                3757  2 wl,lib80211_crypt_tkip
microcode              17157  0 
mac_hid                 3273  0 
snd_hwdep               6652  2 snd_usb_audio,snd_hda_codec
psmouse                94790  0 
media                  12611  1 videodev
cfg80211              437959  1 wl
e1000e                232674  0 
snd_pcm                83207  5 snd_usb_audio,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
drm                   244782  3 nvidia
snd_timer              19294  1 snd_pcm
i2c_i801               11364  0 
snd                    61276  24 snd_hda_codec_realtek,snd_usb_audio,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_rawmidi,snd_hda_codec_generic,snd_usbmidi_lib,snd_hda_codec,snd_hda_intel,snd_seq_device
rfkill                 15971  5 cfg80211,bluetooth,asus_wmi
pcspkr                  2059  0 
i2c_core               41648  9 drm,i2c_i801,saa7164,s5h1411,nvidia,v4l2_common,tveeprom,tda18271,videodev
serio_raw               5073  0 
ptp                    11196  1 e1000e
soundcore               5551  2 snd,snd_hda_codec
pps_core                8993  1 ptp
lpc_ich                14008  0 
fan                     2913  0 
thermal                 9103  0 
mei_me                 10096  0 
mei                    66784  1 mei_me
shpchp                 25706  0 
battery                 7885  0 
video                  12057  1 asus_wmi
wmi                     8539  2 mxm_wmi,asus_wmi
processor              25153  0 
button                  4765  0 
nfs                   199891  0 
lockd                  78926  1 nfs
sunrpc                241674  2 nfs,lockd
fscache                48725  1 nfs
ext4                  494292  3 
crc16                   1359  2 ext4,bluetooth
mbcache                 9155  1 ext4
jbd2                   82948  1 ext4
hid_generic             1217  0 
usbhid                 41250  0 
hid                    93052  5 hid_generic,usbhid,hid_logitech_dj
sd_mod                 37426  11 
sr_mod                 15026  0 
crc_t10dif              1135  1 sd_mod
cdrom                  35191  1 sr_mod
crct10dif_common        1436  2 crct10dif_pclmul,crc_t10dif
atkbd                  17006  0 
libps2                  4571  2 atkbd,psmouse
ahci                   24299  7 
libahci                21772  1 ahci
libata                174089  2 ahci,libahci
ehci_pci                4152  0 
xhci_hcd              149286  0 
ehci_hcd               64619  1 ehci_pci
scsi_mod              138333  3 libata,sd_mod,sr_mod
usbcore               188381  9 btusb,snd_usb_audio,snd_usbmidi_lib,ehci_hcd,ehci_pci,gspca_main,usbhid,gspca_zc3xx,xhci_hcd
usb_common              1712  1 usbcore
i8042                  13666  1 libps2
serio                  11018  6 serio_raw,atkbd,i8042,psmouse

I am unsure what I have done wrong or missed, I think I have accomplished all the steps in the other thread with this device but I cannot end up with a working bluetooth. Any help is greatly appreciated.

Last edited by Zenther (2014-07-06 01:16:22)

Offline

#2 2014-07-06 01:15:32

Zenther
Member
Registered: 2012-07-22
Posts: 7

Re: [Solved] Failing to get bluetooth device loaded and seen

After further messing around I decided to su to root and ran this command:

[brian@prometheus ~]$ su
Password: 
[root@prometheus brian]# sudo echo "0b05 17cf" > /sys/bus/usb/drivers/btusb/new_id
[root@prometheus brian]# bluetoothctl
[NEW] Controller 24:0A:64:07:25:44 prometheus [default]
[bluetooth]# 

So this command needs to be actually ran as root and not just sudo.

I then changed my script file to include it and it now works. I also added a modprobe btusb to the systemd file as it wasn't getting automatically loaded each boot. I am now happy that I have a working bluetooth device.

Here are my updated systemd file and script

/etc/systemd/system/loadfw.service file:

[Unit]                                                                                                                            
Description=Load firmware into BCM20702A0 bluetooth USB adapter                                                                   
After=basic.target                                                                                                                
After=suspend.target                                                                                                              
After=hibernate.target                                                                                                            
                                                                                                                                  
[Service]                                                                                                                         
Type=oneshot                                                                                                                                                                                      
ExecStart=/usr/bin/modprobe btusb
ExecStart=/usr/bin/start_BCM20702A0.sh
                                                                                                                                  
[Install]                                                                                                                         
WantedBy=basic.target                                                                                                             
WantedBy=suspend.target                                                                                                           
WantedBy=hibernate.target

And here is my updated script file:

# cat /usr/bin/start_BCM20702A0.sh 
#!/bin/bash

#
# BCM20702A0 BT Adapter upload rampatch

# env Variables
logfile=/var/log/rampatch.log

# logfile check
if ! test -f ${logfile} ; then
    # logfile does not exist, so create it
    touch $logfile
fi

echo "-------------------------------------------------------" >> $logfile
entrytime=$(date +"%Y-%m-%d %H:%M:%S")
echo $entrytime " applying rampatch to BCM20702A0 bluetooth adapter" >> $logfile

#Create the device
/usr/bin/echo "0b05 17cf" >> /sys/bus/usb/drivers/btusb/new_id

# wait for hci0 to become available and usable
sleep 1
/usr/bin/brcm_patchram_plus_usb --patchram /lib/firmware/fw-0b05_17cf.hcd hci0 >> $logfile

entrytime=$(date +"%Y-%m-%d %H:%M:%S")                                                                                            
echo $entrytime " ..done" >> $logfile                                                                                             
echo "-------------------------------------------------------" >> $logfile

For me this issue is now solved.

Offline

#3 2014-09-12 12:43:04

GutenYe
Member
From: China
Registered: 2011-11-27
Posts: 44
Website

Re: [Solved] Failing to get bluetooth device loaded and seen

@Zenther

I have a ASUS Z97 Pro motherboard, it also uses Broadcom BCM20702A0 bluetooth chip, and I've followed your instructions in every step, no luck, the `hcitool scan` still can't find anything. Where do you download the `BCM20702A1_001.002.014.1315.1350.hex` file?, can you send one copy to me? thanks.

For me,

$ echo "0b05 17cf"  | sudo tee /sys/bus/usb/drivers/btusb/new_id

will make `hcitool dev` works, it shows a hci0 device.

I downloaded the windows driver by searching `Z97-Pro` in ASUS's website. And after load a firmware,

$ sudo brcm_patchram_plus_usb --patchram BT_Win7-8-8-1_VER6514800_VER12009350/Bluetooth/Win7/Win64/BCM20702A1_001.002.014.1315.1350.hcd hci0
# the kernel has this error
kernel: Bluetooth: hci0 command 0x0c03 tx timeout

# hciconfig -a
Can't read local name on hci0: Connection timed out (110)

# hcitool scan
kernel: Bluetooth: hci0 command 0x0c03 tx timeout

without a firmware, `hcitool scan` has an empty result and `hciconfig -a` has no error.

Last edited by GutenYe (2014-09-12 12:55:34)


Linux, Vim, Ruby, Javascript and Go.

Offline

Board footer

Powered by FluxBB