1

I have pre-compiled kernel 3.16.7 which has btusb v0.6 module; The current btusb v0.6 I'd like to replace with btusb v0.7 which is located in kernel 4.0; So my question is how to :

  • remove the current btusb 0.6 from kernel 3.16.7
  • extract btusb 0.7 from kernel 4.0 (compile it)
  • insert the compiled btusb 7.0 to kernel 3.16.7

EDIT :

lsusb outputs :

Bus 001 Device 004: ID 04ca:2006 Lite-On Technology Corp.

the broadcom device 04ca is quite new so maybe that's the major problem;

As I could get it, it needs btusb module version>=0.7; So I do need some kind of module replacement cause my current pre-compiled kernel has btusb 0.6; I really want not to deal with the whole kernel sources compilation but to figure out btusb local integration into my already pre-compiled kernel v3.16.7

EDIT :

I have $usb-devices output as :

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 11 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=04ca ProdID=2006 Rev=01.12
S:  Manufacturer=Broadcom Corp
S:  Product=BCM43142A0
S:  SerialNumber=*******
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)

after the input :

sudo modprobe btusb

and...

sudo echo "04ca 2006" | sudo tee /sys/bus/usb/drivers/btusb/new_id

I can see btusb driver activated as $usb-devices:

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=04ca ProdID=2006 Rev=01.12
S:  Manufacturer=Broadcom Corp
S:  Product=BCM43142A0
S:  SerialNumber=******
C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
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)

...

EDIT

I try to download an install linux-headers as :

sudo pacman -S linux-headers
[sudo] password for ...: 
:: There are 8 providers available for linux-headers:
:: Repository core
   1) linux310-headers  2) linux312-headers  3) linux313-headers
   4) linux314-headers  5) linux316-headers  6) linux318-headers
   7) linux319-headers  8) linux40-headers

...but as I can get it the linux316-headers do install headers for 3.16.7.11-1-Arch; I can see it pretty clear cause after installation I have /lib/modules/3.16.7.11-1-Arch folder created :( Currently I have running kernel as 3.16.7.3-1 so the repo headers are not compatible or similar demanding me to upgrade; So is there a way to install headers which compatible with my kernel build version?

p.s. I am quite new to linux so please link some related tutorials links and give detailed steps

Thanks

p.p.s. OS : Linux Arch x64

  • What are you attempting to accomplish with this? Do you have a device that is not working? – Jeremy31 May 3 '15 at 11:47
  • @Jeremy31 you are right; I have not working usb bluetooth which supposed to be supported by module version 0.7 – user390525 May 3 '15 at 12:39
  • Can you download the source code for the kernel? Post results from lsusb as you can add your device to the current source and build the module – Jeremy31 May 3 '15 at 12:47
  • @Jeremy31 I cannot (don't know how) add my bluetooth device to the current btusb 0.6 module of pre-compiled kernel 3.16.7; and if to mention kernel 3.16.x sources and how to integrate (replace) its modules manually please guide me :) – user390525 May 4 '15 at 21:54
  • can you get linux-image with the same version as the headers you have? – Jeremy31 May 30 '15 at 19:14
2

You should be able to download the source code with

wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.7.tar.xz

Then you need to extract it

tar xpvf linux-3.16.7.tar.xz

Then cd into the correct directory

cd linux-3.16.7/drivers/bluetooth

When you post the result of lsusb I should be able to finish this answer

gedit btusb

Go to the end of line 116 which should be { USB_VENDOR_AND_INTERFACE_INFO(0x0489, 0xff, 0x01, 0x01) }, Press Enter key twice, then Tab once and paste this in

/* Lite-On Technology - Broadcom based */
    { USB_VENDOR_AND_INTERFACE_INFO(0x04ca, 0xff, 0x01, 0x01),
      .driver_info = BTUSB_BCM_PATCHRAM },

Check the spacing and format to see if it matches the other entries, then save and exit gedit.

Then we can copy some configuration files into the directory

zcat /proc/config.gz > .config

Now we can build the bluetooth modules with

make -C /lib/modules/$(uname -r)/build M=$PWD modules

When they are compiled we can copy the btusb.ko to the kernel directory

sudo cp btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/
cd /usr/lib/modules/$(uname -r)/kernel/drivers/bluetooth/
gzip btusb.ko

This bluetooth device needs firmware

cd ~
wget https://www.dropbox.com/s/xbmm9vfg2fby2zn/fw-04ca_2006.hcd
sudo cp fw-04ca_2006.hcd /lib/firmware/

Then we can unload btusb and load it so that the new version is loaded

sudo modprobe -r btusb
sudo modprobe btusb
  • The the current kernel I have (3.16.7) lsusb shows exactly unsupported bluetooth device see my question edit – user390525 May 5 '15 at 4:15
  • This will just build the bluetooth modules for the kernel, not the entire kernel. I updated the USB ID list 3 days ago for your device, so the desciption in lsusb should change after sudo update-usbids – Jeremy31 May 5 '15 at 10:18
  • Thanks but I have linux Arch OS running; So I am not sure concerning to apt-get and the linux-headers-generic; And please id all steps cause it's pretty hard to ask details :) – user390525 May 7 '15 at 8:38
  • Skip the apt-get as it seems the equivalent of build-essential is usually installed and you likely installed kernel headers with the kernel image – Jeremy31 May 7 '15 at 9:35
  • But before integration of "bluetooth" kernel's folder and its btusb 0.7 into my pre-compiled kernel 3.16.7 I want to ask will the btusb 0.7 be compatible with kernel 3.16.7 cause, as I can see it, btusb version 0.7 only kernel 4.0 has? I couldn't find the info so please give me a tip – user390525 May 8 '15 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.