Wednesday, April 29, 2015

Updated Steps for Enabling BCM43142 Bluetooth on Debian 8 "Jessie" Stable

UPDATE 2015-05-15: Add a script to reload btusb after suspend to "install-btusb-bcm43142a0". 

Debian 8 "Jessie" has been released recently. A lot of things have changed since a year ago when it was still in Testing, especially on the kernel side. The good news is the support for loading firmware for Broadcom bluetooth has been committed to the mainline kernel. The bad news is for the vendor ID and the device ID for BCM43142 bluetooth (105b:e065) is still not there. Therefore, we still need to patch and recompile btusb in order to get it to work. The difference is the patch is much smaller now.

Preparation

1. Make sure you have the correct device. We are talking about 105b:e065 here.

$ lsusb | grep 105b:e065
Bus 003 Device 003: ID 105b:e065

2. Make sure you already have deb-src lines on your "/etc/apt/sources.list".

deb-src http://kartolo.sby.datautama.net.id/debian/ jessie main contrib non-free
deb-src http://kartolo.sby.datautama.net.id/debian/ jessie-updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

3. Install "build-essential".

# apt-get install build-essential

4. Download and install "hex2hcd" from source.

$ wget "https://github.com/jessesung/hex2hcd/archive/master.zip"
$ unzip master.zip
$ cd hex2hcd-master
$ make
# cp hex2hcd /usr/local/bin

5. Get hex firmware for BC43412 from a Windows installation under "C:\Windows\System32\Drivers". The file name should be like "BCM43142A0_*.hex".

Recompiling

1. Download the bash script that I have written here and extract it.

$ tar xvf btusb-bcm43142a0-20150515.tar.gz

2. Put your hex firmware together with the script and rename it to "BCM43142A0.hex".

$ ls
BCM43142A0.hex  
btusb-bcm43142A0.patch  
install-btusb-bcm43142a0

3. Run the script. It will download the kernel source for the running kernel, patch btusb module, and install the firmware.

# ./install-btusb-bcm43142a0

IMPORTANT: Please verify the content of the script yourself first before running. I have only tested it on my installation of Debian 8 "Jessie" i386. I won't be responsible for any damage that it caused. Use at your own risk!

4. Your bluetooth should be running on the next boot. If not, try disabling and enabling it. See whether it runs.

If you have any questions, write in the comments below.