You are not logged in.

#1 2015-08-27 20:23:20

seqizz
Member
Registered: 2011-04-04
Posts: 37

0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

Hi everyone,

I can't get bluetooth working. Here is some info:

After modprobe -r ath3k && modprobe ath3k

[  350.240862] usbcore: deregistering interface driver ath3k
[  352.336845] Bluetooth: Patch file version did not match with firmware
[  352.336850] Bluetooth: Loading patch file failed
[  352.336856] ath3k: probe of 1-1.3:1.0 failed with error -22
[  352.336889] usbcore: registered new interface driver ath3k

The firmware files it's talking about:

⚡> find /lib/firmware/ar3k -maxdepth 1 -type f -exec md5sum {} \;
d0e3345bcd21df6a7ed48814fcffb077  /lib/firmware/ar3k/AthrBT_0x00000200.dfu
b2918ac938fbd0bc65b296b14e69ab94  /lib/firmware/ar3k/ramps_0x00000200_48.dfu
fc0ece7bc267f4f03e85d02cb723274e  /lib/firmware/ar3k/ramps_0x41020000_40.dfu
1526ca3e2138cbacd896cb7df5ba63dd  /lib/firmware/ar3k/ramps_0x31010000_40.dfu
cf45df3efe6e9da1d1cc446e1849e084  /lib/firmware/ar3k/ramps_0x11020000_40.dfu
5403bda6a5bf2ee23ecc7f6fb85d0f36  /lib/firmware/ar3k/ramps_0x01020201_40.dfu
5403bda6a5bf2ee23ecc7f6fb85d0f36  /lib/firmware/ar3k/ramps_0x01020201_26.dfu
a3b5571571e9b71b1b23ef8025dd9947  /lib/firmware/ar3k/ramps_0x01020200_40.dfu
723c379edbae9535587ccecda183fd9a  /lib/firmware/ar3k/ramps_0x01020200_26.dfu
705276686b4dbc1002d45bba0db6fe41  /lib/firmware/ar3k/ramps_0x01020001_26.dfu
20991c0b69759f6b80b720c5a28978a9  /lib/firmware/ar3k/AthrBT_0x41020000.dfu
0ddd087fb9b87ea4a6e2f79b2db4d663  /lib/firmware/ar3k/AthrBT_0x31010000.dfu
b31db249eea9e5d3e9dedd067153d6fb  /lib/firmware/ar3k/AthrBT_0x11020000.dfu
ed8be26d1b01ea6985f71504abbb7861  /lib/firmware/ar3k/AthrBT_0x01020201.dfu
51e735943b10d6457a3cd549bde1f346  /lib/firmware/ar3k/AthrBT_0x01020200.dfu
eb635a5d14774173d3a5761ca88d127f  /lib/firmware/ar3k/AthrBT_0x01020001.dfu

Installed packages:

linux 4.1.6-1
linux-firmware-git 20150812.38358cf-1

What could be missing?


Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#2 2015-08-29 23:35:47

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

[  352.336845] Bluetooth: Patch file version did not match with firmware

That's sure a lame error message.

I went to the code containing that error message and found that it first interrogates the device to get it's firmware version and uses that information to determine the patch file filename. If it can't find the file on your system that error message would tell you the filename it didn't find.

But in your case, it actually found the file it wanted but all I can determine is it's one of those that begins with "AthrBT_". The code then proceeds to look at some data within the file itself (rom version and build version) and compares it to the data in the firmware on the device. In your case it didn't like what it found so it threw the error message shown above.

I suspect you already knew that, because when I compare your MD5 hash values with those found on my box (linux-firmware 20150722.e10097a-1) the hash doesn't match on some of the same AthrBT_* files. I'm thinking that's the problem.

Offline

#3 2015-08-30 08:03:35

seqizz
Member
Registered: 2011-04-04
Posts: 37

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

Thanks pigiron,

I've tried different fw files, even the files from working Windows 8 installation with no luck. Is there a known good combination (which I'm not sure if anybody can actually make this hw work) or any sane way to get more info on this?


Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#4 2015-09-01 03:56:43

seqizz
Member
Registered: 2011-04-04
Posts: 37

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

And as a strange sidenote, the message changed after upgrading BIOS. There is no such file yet:

[    9.396556] Bluetooth: Configuration file not found ar3k/ramps_0x00000200_0.dfu
[    9.396557] Bluetooth: Loading sysconfig file failed
[    9.396560] ath3k: probe of 1-1.3:1.0 failed with error -2

Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#5 2015-09-02 03:15:56

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

[    9.396556] Bluetooth: Configuration file not found ar3k/ramps_0x00000200_0.dfu

That actually helps lift the fog just a tiny bit.

The code in that area uses a standard Linux USB kernel function to send a ATH3K_GETVERSION command to the device to pull the rom version, build version, ram version, and ref clock info. All I can say is that operation appears to have been successful. The different section of code used in your original failure made the exact same USB call, also successfully.

But this time, the error messages let's us know that it determined that the device rom version is 0x00000200 and the ref clock is curiously 0. That clock value is the default if the returned value doesn't match any other predefined choices, so I assume that it's valid, but seems somewhat strange. The only place in the driver code I find it being used is to create a portion (the *_0.dfu part) of the filename of that file it can't find.

Peek at the ath3k_load_syscfg function in the drivers/bluetooth/ath3k.c file to see for yourself.

It sure seems like either the driver is fundamentally borked or this is a very early version of the device. Did you buy it on eBay or something?

Offline

#6 2015-09-02 03:47:25

seqizz
Member
Registered: 2011-04-04
Posts: 37

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

pigiron wrote:

It sure seems like either the driver is fundamentally borked or this is a very early version of the device. Did you buy it on eBay or something?

Weird. This is an integrated device on the MSI laptop. Also found this thread:

http://www.spinics.net/lists/linux-blue … 62703.html

I guess I need to wait for the drivers..


Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#7 2015-09-02 04:30:27

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

OK, that link lifts a bunch of fog.

Yea, you should either wait for the dust to settle or jump into the deep end of the pool and help because they're changing the blacklist so that the btusb portion of the driver loads the firmware and patch instead of the at3k portion. So a fundamental driver unbork is in progress.

Offline

#8 2015-12-31 04:11:11

sashamalo
Member
Registered: 2015-12-31
Posts: 1

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

hi  this  worked for me : https://bugzilla.kernel.org/show_bug.cgi?id=99371

--- a/drivers/bluetooth/btusb.c	2015-12-31 05:08:23.080104409 +0100
+++ b/drivers/bluetooth/btusb.c	2015-12-31 05:08:11.210104749 +0100
@@ -197,7 +197,6 @@
 	{ USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0b05, 0x17d0), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0x0036), .driver_info = BTUSB_ATH3012 },
-	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0x311e), .driver_info = BTUSB_ATH3012 },
@@ -226,6 +225,7 @@
 	{ USB_DEVICE(0x0489, 0xe03c), .driver_info = BTUSB_ATH3012 },
 
 	/* QCA ROME chipset */
+	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
 	{ USB_DEVICE(0x0cf3, 0xe007), .driver_info = BTUSB_QCA_ROME },
 	{ USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
 	{ USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },

Last edited by sashamalo (2015-12-31 04:15:34)

Offline

#9 2015-12-31 13:45:10

seqizz
Member
Registered: 2011-04-04
Posts: 37

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

sashamalo wrote:

I'm using linux-lts package now. Will try to compile if i have time. Your diff checks out, this is the exact device. But this makes me wonder about:

1 - Why this is not default?
2 - Where should I ask the Arch crew to make it default?

Thanks for the link.


Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#10 2015-12-31 16:01:38

jeremy31
Member
Registered: 2015-11-01
Posts: 149

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

seqizz wrote:
sashamalo wrote:

I'm using linux-lts package now. Will try to compile if i have time. Your diff checks out, this is the exact device. But this makes me wonder about:

1 - Why this is not default?
2 - Where should I ask the Arch crew to make it default?

Thanks for the link.

This patch would cause issues for people with the same bluetooth device ID with the AR9485 wireless/bluetooth AR5B225

This should be fixed in upstream kernels with the btqca module

It would have been easier if Qualcomm wouldn't have used the same ID on a Rome bluetooth chip and an older one

Last edited by jeremy31 (2015-12-31 16:02:06)

Offline

#11 2015-12-31 18:36:55

seqizz
Member
Registered: 2011-04-04
Posts: 37

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

jeremy31 wrote:

It would have been easier if Qualcomm wouldn't have used the same ID on a Rome bluetooth chip and an older one

Oh, now it makes sense. Brilliant decision indeed. Will wait for it then, thanks.


Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#12 2015-12-31 21:08:59

jeremy31
Member
Registered: 2015-11-01
Posts: 149

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

seqizz wrote:
jeremy31 wrote:

It would have been easier if Qualcomm wouldn't have used the same ID on a Rome bluetooth chip and an older one

Oh, now it makes sense. Brilliant decision indeed. Will wait for it then, thanks.


You can make the patched module and have bluetooth now.  I am not sure what kernel has the correct Rome bluetooth support

Offline

#13 2016-01-28 06:27:09

LoveMHz
Member
Registered: 2016-01-28
Posts: 1

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

Just wanted to say that the patch that sashamalo posted does seem to be working for myself and thanks!

System: MSI GS60 6QE Ghost Pro

Offline

#14 2016-01-28 10:48:39

seqizz
Member
Registered: 2011-04-04
Posts: 37

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

Patched linux-lts and got following message:

Bluetooth: hci0: don't support firmware rome 0x200

Could you share which firmware you used?


Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#15 2016-02-27 19:07:46

jeremy31
Member
Registered: 2015-11-01
Posts: 149

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

You also need another patch

 diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index b9f2821..c334620 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2382,6 +2382,7 @@ struct qca_device_info {
 static const struct qca_device_info qca_devices_table[] = {
 	{ 0x00000100, 20, 4, 10 }, /* Rome 1.0 */
 	{ 0x00000101, 20, 4, 10 }, /* Rome 1.1 */
+	{ 0x00000200, 28, 4, 18 }, /* Rome 2.0 */
 	{ 0x00000201, 28, 4, 18 }, /* Rome 2.1 */
 	{ 0x00000300, 28, 4, 18 }, /* Rome 3.0 */
 	{ 0x00000302, 28, 4, 18 }, /* Rome 3.2 */

You might have to find the correct spot as the patch was made against bluetooth-next.git and the line number is likely off

And to get the firmware

wget http://download.windowsupdate.com/d/msdownload/update/driver/drvs/2014/01/20623393_919a4673931aa789f0b1c3eeafb360b36097894a.cab

sudo cabextract 20623393_919a4673931aa789f0b1c3eeafb360b36097894a.cab -F *.dfu -d /lib/firmware/ar3k

Last edited by jeremy31 (2016-02-27 20:17:19)

Offline

#16 2016-02-28 09:58:27

seqizz
Member
Registered: 2011-04-04
Posts: 37

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

Thanks jeremy31, realized the bluetooth support doesn't worth it. I shouldn't have to rebuild the kernel for hardware support on a rolling-release binary distro.


Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#17 2016-02-28 17:11:10

jeremy31
Member
Registered: 2015-11-01
Posts: 149

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

I wouldn't rebuild the entire kernel for a single module that needs a small patch

Create a folder in home named bluetooth and save the following files


http://pastebin.com/VbJXq4x5 for btusb.c patched
And use the following for Makefile

obj-m += btusb.o
 
all:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
 
clean:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Copy the config file

cp /boot/config-$(uname -r) .config

  Then run

make

Then you could see if it works

sudo modprobe -r btusb
sudo insmod ./btusb.ko

Offline

#18 2016-02-29 00:01:13

jeremy31
Member
Registered: 2015-11-01
Posts: 149

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

I am also trying to help fix this issue so can you post

usb-devices | awk '/3004/' RS=

Offline

#19 2016-02-29 04:49:39

seqizz
Member
Registered: 2011-04-04
Posts: 37

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0cf3 ProdID=3004 Rev=00.01
C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)

Creeds matter very little… The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true. So I elect for neither label. - James Branch Cabell

Offline

#20 2016-03-01 23:31:41

jeremy31
Member
Registered: 2015-11-01
Posts: 149

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

Some discussion from upstream http://www.spinics.net/lists/linux-blue … 66419.html

I don't know if the Qualcomm people will answer or not.  I contacted Dmitri on an Ubuntu bug report

Offline

#21 2017-01-20 13:57:23

baastrup
Member
Registered: 2016-01-06
Posts: 9

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

Any news regarding this?

could someone make an AUR packages for a fix?

Offline

#22 2017-03-31 00:10:49

katy
Member
Registered: 2017-03-31
Posts: 2

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

I've made an AUR package that patches the kernel module, btusb-qca-0x3004 (https://aur.archlinux.org/packages/btusb-qca-0x3004/).

You should be able to install the AUR package then immediately run

bluetoothctl

and the interface will show up.

Let me know if it works (this is my first attempt at an AUR package...)

Offline

#23 2017-04-11 18:53:44

jianson
Member
From: Winthrop Harbor, IL
Registered: 2017-04-05
Posts: 1

Re: 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4.0

katy,

Thank you so much for this! I've been manually patching and recompiling my kernel every time I get a kernel update. I'm not 100% sure how to use DKMS, pacman hooks or even create an AUR package so this made my life so much easier.

Loving Arch and this community!


Felosis

Offline

Board footer

Powered by FluxBB