<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Btfirmware-nonfree</id>
	<title>Btfirmware-nonfree - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Btfirmware-nonfree"/>
	<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=Btfirmware-nonfree&amp;action=history"/>
	<updated>2026-04-08T16:12:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://www.slackwiki.com/index.php?title=Btfirmware-nonfree&amp;diff=981&amp;oldid=prev</id>
		<title>Rworkman: Created page with &quot;I recently was presented with a Thinkpad T430s containing a Broadcom BCM20702 bluetooth chip, and bluetooth wouldn't work at all on it.  &lt;code&gt;$ lsusb Bus 003 Device 009: ID 0...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=Btfirmware-nonfree&amp;diff=981&amp;oldid=prev"/>
		<updated>2015-11-25T04:15:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;I recently was presented with a Thinkpad T430s containing a Broadcom BCM20702 bluetooth chip, and bluetooth wouldn&amp;#039;t work at all on it.  &amp;lt;code&amp;gt;$ lsusb Bus 003 Device 009: ID 0...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I recently was presented with a Thinkpad T430s containing a Broadcom BCM20702 bluetooth chip, and bluetooth wouldn't work at all on it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ lsusb&lt;br /&gt;
Bus 003 Device 009: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On boot, I saw this in /var/log/syslog: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;Nov 24 13:37:35 liberty kernel: bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-21e6.hcd failed with error -2&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
Sure enough, /lib/firmware/brcm/BCM20702A1-0a5c-21e6.hcd did not exist.&lt;br /&gt;
&lt;br /&gt;
After a bit of research, I determined that nobody had already written clear instructions on just how to obtain the needed firmware. There were a few results with links to different firmware that someone had already obtained from some mysterious source, and vague references about &amp;quot;get it from your Windows system&amp;quot; and such, but well, I don't have a Windows system.&lt;br /&gt;
&lt;br /&gt;
I went to the Lenovo support site, downloaded the bluetooth driver file (currently located at https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/g4wb12ww.exe but of course, this link will not always be valid), and poked around a bit in its contents. To do that, you'll first need to get innoextract (see http://constexpr.org/innoextract/ or search SlackBuilds.org for it).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
root@liberty:~/fw# ls &amp;lt;br /&amp;gt;&lt;br /&gt;
g4wb12ww.exe &amp;lt;br /&amp;gt;&lt;br /&gt;
root@liberty:~/fw# innoextract g4wb12ww.exe &amp;lt;br /&amp;gt;&lt;br /&gt;
...lots of output, all extracted to an &amp;quot;app/&amp;quot; directory... &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now to see if we can find the important bits in here... I notice that the firmware expected to be loaded has &amp;quot;0a5c-21e6&amp;quot; in the name, and the usb ID of the bluetooth hardware is &amp;quot;0a5c:21e6&amp;quot; so let's poke around and see if we can find anything with that name: &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;find app/ -name &amp;quot;*0a5c*&amp;quot; -o -name &amp;quot;*0A5C*&amp;quot;&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
Hmm, no output. Okay. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
root@liberty:~/fw#grep -Eir 0a5c.*21e6 . &amp;lt;br /&amp;gt;&lt;br /&gt;
Binary file ./app/Win64/BTW.msi matches &amp;lt;br /&amp;gt;&lt;br /&gt;
./app/Win64/bcbtums-win7x64-brcm.inf:%BRCM20702Thinkpad.DeviceDesc%=RAMUSB21E6,  USB\VID_0A5C&amp;amp;PID_21E6       ; 20702 non-UHE Lenovo Japan &amp;lt;br /&amp;gt;&lt;br /&gt;
Binary file ./app/Win32/BTW.msi matches &amp;lt;br /&amp;gt;&lt;br /&gt;
./app/Win32/bcbtums-win7x86-brcm.inf:%BRCM20702Thinkpad.DeviceDesc%=RAMUSB21E6,  USB\VID_0A5C&amp;amp;PID_21E6       ; 20702 non-UHE Lenovo Japan &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
Well, I don't want to poke around in binary files too much, but I know that .inf are plaintext files, so let's look in there. That &amp;quot;DeviceDesc&amp;quot; looks important, so we'll search for that in the .inf file once we get it opened. I use vi, but hopefully you know your editor well enough to do the equivalent, and you'll find something like this: &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
... &amp;lt;br /&amp;gt;&lt;br /&gt;
%BRCM20702Thinkpad.DeviceDesc%=RAMUSB21E6,  USB\VID_0A5C&amp;amp;PID_21E6       ; 20702 non-UHE Lenovo Japan &amp;lt;br /&amp;gt;&lt;br /&gt;
... &amp;lt;br /&amp;gt;&lt;br /&gt;
;;;;;;;;;;;;;RAMUSB21E6;;;;;;;;;;;;;;;;; &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[RAMUSB21E6.CopyList]&amp;lt;br /&amp;gt;&lt;br /&gt;
bcbtums.sys&amp;lt;br /&amp;gt;&lt;br /&gt;
BCM20702A1_001.002.014.0449.0462.hex&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[RAMUSB21E6.NTX86]&amp;lt;br /&amp;gt;&lt;br /&gt;
Include=bth.inf&amp;lt;br /&amp;gt;&lt;br /&gt;
Needs=BthUsb.NT&amp;lt;br /&amp;gt;&lt;br /&gt;
FeatureScore=F0&amp;lt;br /&amp;gt;&lt;br /&gt;
CopyFiles=RAMUSB21E6.CopyList&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[RAMUSB21E6.NTX86.hw]&amp;lt;br /&amp;gt;&lt;br /&gt;
AddReg=RAMUSB21E6.NTX86.hw.reg&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[RAMUSB21E6.NTX86.hw.reg]&amp;lt;br /&amp;gt;&lt;br /&gt;
HKR,,LowerFilters, 0x00010000, &amp;quot;bcbtums&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
HKR,,%RAMPatchFileName%,0x00000, &amp;quot;BCM20702A1_001.002.014.0449.0462.hex&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
HKR,,%RemoteWakeEnabled%,0x00010001,1&amp;lt;br /&amp;gt;&lt;br /&gt;
HKR,,%DeviceRemoteWakeSupported%,0x00010001,1&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[RAMUSB21E6.NTX86.Services]&amp;lt;br /&amp;gt;&lt;br /&gt;
needs=BthUsb.NT.Services&amp;lt;br /&amp;gt;&lt;br /&gt;
AddService=bcbtums,,BCBTUMS_Service_Inst, BTWSECFL_EventLog_Inst&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
... &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
I happen to know from my research that the firmware files are .hex file, so this line is awesome to see: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;HKR,,%RAMPatchFileName%,0x00000, &amp;quot;BCM20702A1_001.002.014.0449.0462.hex&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy that file out of the directory structure into a place that's easier to work with:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
root@liberty:~/fw# cp app/Win64/BCM20702A1_001.002.014.0449.0462.hex . &amp;lt;br /&amp;gt;&lt;br /&gt;
root@liberty:~/fw# ls &amp;lt;br /&amp;gt;&lt;br /&gt;
BCM20702A1_001.002.014.0449.0462.hex  app/  g4wb12ww.exe &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Now we need to put this in a form that the linux kernel expects, so that's where hex2hcd comes in: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
root@liberty:~/fw# git clone git://github.com/jessesung/hex2hcd.git &amp;lt;br /&amp;gt;&lt;br /&gt;
Cloning into 'hex2hcd'...&amp;lt;br /&amp;gt;&lt;br /&gt;
remote: Counting objects: 8, done.&amp;lt;br /&amp;gt;&lt;br /&gt;
remote: Compressing objects: 100% (7/7), done.&amp;lt;br /&amp;gt;&lt;br /&gt;
remote: Total 8 (delta 1), reused 8 (delta 1), pack-reused 0&amp;lt;br /&amp;gt;&lt;br /&gt;
Receiving objects: 100% (8/8), 8.71 KiB | 0 bytes/s, done.&amp;lt;br /&amp;gt;&lt;br /&gt;
Resolving deltas: 100% (1/1), done.&amp;lt;br /&amp;gt;&lt;br /&gt;
Checking connectivity... done.&amp;lt;br /&amp;gt;&lt;br /&gt;
root@liberty:~/fw# cd hex2hcd/&amp;lt;br /&amp;gt;&lt;br /&gt;
root@liberty:~/fw/hex2hcd# make&amp;lt;br /&amp;gt;&lt;br /&gt;
gcc -O2 -march=native    hex2hcd.c   -o hex2hcd&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use hex2hcd:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
root@liberty:~/fw/hex2hcd# ./hex2hcd ../BCM20702A1_001.002.014.0449.0462.hex ../BCM20702A1-0a5c-21e6.hcd &amp;lt;br /&amp;gt;&lt;br /&gt;
... lots of text and binary data ...&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, let's back up a directory, make sure what think is there is actually there, and copy it into place:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
root@liberty:~/fw/hex2hcd# cd ..&amp;lt;br /&amp;gt;&lt;br /&gt;
root@liberty:~/fw# ls&amp;lt;br /&amp;gt;&lt;br /&gt;
BCM20702A1-0a5c-21e6.hcd  BCM20702A1_001.002.014.0449.0462.hex  app/  g4wb12ww.exe  hex2hcd/&amp;lt;br /&amp;gt;&lt;br /&gt;
root@liberty:~/fw# cp BCM20702A1-0a5c-21e6.hcd /lib/firmware/brcm/&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first person who finds this useful is expected to clean up the formatting and such. :-) Enjoy!  -RW&lt;/div&gt;</summary>
		<author><name>Rworkman</name></author>
	</entry>
</feed>