All of lore.kernel.org
 help / color / mirror / Atom feed
* ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
@ 2015-05-26 14:44 Sumit's Mailing Lists
  2015-06-06  6:16 ` Marcel Holtmann
  0 siblings, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-05-26 14:44 UTC (permalink / raw)
  To: linux-bluetooth

I'm currently using an MSI WS60 laptop which contains the following
Bluetooth controller (from lsusb):

Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
Bluetooth 4.0

and the more detailed version:

Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
Bluetooth 4.0
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x0cf3 Atheros Communications, Inc.
  idProduct          0x3004 AR3012 Bluetooth 4.0
  bcdDevice            0.01
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:


In my kernel logs I see the following:

$dmesg | grep -i bluetooth

[    0.334727] Bluetooth: Core ver 2.20
[    0.334734] Bluetooth: HCI device and connection manager initialized
[    0.334736] Bluetooth: HCI socket layer initialized
[    0.334738] Bluetooth: L2CAP socket layer initialized
[    0.334740] Bluetooth: SCO socket layer initialized
[    0.604281] Bluetooth: HCI UART driver ver 2.2
[    0.604283] Bluetooth: HCI H4 protocol initialized
[    0.604285] Bluetooth: HCI BCSP protocol initialized
[    0.604286] Bluetooth: HCILL protocol initialized
[    0.604288] Bluetooth: HCIATH3K protocol initialized
[    0.615125] Bluetooth: RFCOMM TTY layer initialized
[    0.615129] Bluetooth: RFCOMM socket layer initialized
[    0.615132] Bluetooth: RFCOMM ver 1.11
[    0.615136] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    0.615138] Bluetooth: BNEP filters: protocol multicast
[    0.615141] Bluetooth: BNEP socket layer initialized
[    0.615144] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    0.615146] Bluetooth: HIDP socket layer initialized
[    1.358547] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
[    1.358548] Bluetooth: Loading patch file failed

I did a search for this issue and only found other bugs indicating that
this should be reported upstream:

  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1451689

A mailing list message:

  http://www.spinics.net/lists/linux-wireless/msg135868.html

And a possible duplicate:

  http://www.spinics.net/lists/linux-wireless/msg135869.html

My /proc/version:

  Linux version 4.0.0-wl-ath+ (root@catelyn) (gcc version 4.8.4 (Gentoo
4.8.4 p1.5, pie-0.6.1) ) #14 SMP Thu May 7 18:26:16 AEST 2015

I am running the ath+ branch because my Wi-Fi will not work on the
current kernel (attempted linux-4.0.4-gentoo and Wi-Fi failed to load
firmware, bluetooth had exact same message in kernel logs as reported
above). I'm running commit 4b9abafd of the kvalo/ath fork with the
atk10k firmware files from my own sumdog/ath10k-firmware fork.

Is there an official bug in for this issue yet that I can watch? Are
there any dfu files I can try out there for my specific device? I can
build any kernels you need if you want more specific debugging information.

Sumit


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-05-26 14:44 ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0 Sumit's Mailing Lists
@ 2015-06-06  6:16 ` Marcel Holtmann
  2015-06-15 12:05   ` Sumit's Mailing Lists
  0 siblings, 1 reply; 29+ messages in thread
From: Marcel Holtmann @ 2015-06-06  6:16 UTC (permalink / raw)
  To: Sumit's Mailing Lists; +Cc: linux-bluetooth

Hi Sumit,

> I'm currently using an MSI WS60 laptop which contains the following
> Bluetooth controller (from lsusb):
> 
> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
> Bluetooth 4.0

assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.

> and the more detailed version:
> 
> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
> Bluetooth 4.0
> Device Descriptor:
>  bLength                18
>  bDescriptorType         1
>  bcdUSB               1.10
>  bDeviceClass          224 Wireless
>  bDeviceSubClass         1 Radio Frequency
>  bDeviceProtocol         1 Bluetooth
>  bMaxPacketSize0        64
>  idVendor           0x0cf3 Atheros Communications, Inc.
>  idProduct          0x3004 AR3012 Bluetooth 4.0
>  bcdDevice            0.01
>  iManufacturer           0
>  iProduct                0
>  iSerial                 0
>  bNumConfigurations      1
>  Configuration Descriptor:

I actually prefer /sys/kernel/debug/usb/devices output for the devices.

Regards

Marcel


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-06  6:16 ` Marcel Holtmann
@ 2015-06-15 12:05   ` Sumit's Mailing Lists
  2015-06-15 13:55     ` Marcel Holtmann
  0 siblings, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-15 12:05 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

On 06/06/15 14:16, Marcel Holtmann wrote:
> Hi Sumit,
>
>> I'm currently using an MSI WS60 laptop which contains the following
>> Bluetooth controller (from lsusb):
>>
>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>> Bluetooth 4.0
> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>
>> and the more detailed version:
>>
>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>> Bluetooth 4.0
>> Device Descriptor:
>>  bLength                18
>>  bDescriptorType         1
>>  bcdUSB               1.10
>>  bDeviceClass          224 Wireless
>>  bDeviceSubClass         1 Radio Frequency
>>  bDeviceProtocol         1 Bluetooth
>>  bMaxPacketSize0        64
>>  idVendor           0x0cf3 Atheros Communications, Inc.
>>  idProduct          0x3004 AR3012 Bluetooth 4.0
>>  bcdDevice            0.01
>>  iManufacturer           0
>>  iProduct                0
>>  iSerial                 0
>>  bNumConfigurations      1
>>  Configuration Descriptor:
> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>
> Regards
>
> Marcel
>

Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
added it to the kernel bugzilla):

T:  Bus=03 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= 0.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)
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms

and the firmware the kernel is trying to load:

[  762.729370] usb 3-1.3: Direct firmware load for
ar3k/AthrBT_0x00000200.dfu failed with error -2
[  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
[  762.729374] Bluetooth: Loading patch file failed
[  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
[  762.729411] usbcore: registered new interface driver ath3k

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-15 12:05   ` Sumit's Mailing Lists
@ 2015-06-15 13:55     ` Marcel Holtmann
  2015-06-15 14:16       ` Sumit's Mailing Lists
  0 siblings, 1 reply; 29+ messages in thread
From: Marcel Holtmann @ 2015-06-15 13:55 UTC (permalink / raw)
  To: Sumit's Mailing Lists; +Cc: linux-bluetooth

Hi Smuit,

>>> I'm currently using an MSI WS60 laptop which contains the following
>>> Bluetooth controller (from lsusb):
>>> 
>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>> Bluetooth 4.0
>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>> 
>>> and the more detailed version:
>>> 
>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>> Bluetooth 4.0
>>> Device Descriptor:
>>> bLength                18
>>> bDescriptorType         1
>>> bcdUSB               1.10
>>> bDeviceClass          224 Wireless
>>> bDeviceSubClass         1 Radio Frequency
>>> bDeviceProtocol         1 Bluetooth
>>> bMaxPacketSize0        64
>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>> bcdDevice            0.01
>>> iManufacturer           0
>>> iProduct                0
>>> iSerial                 0
>>> bNumConfigurations      1
>>> Configuration Descriptor:
>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>> 
>> Regards
>> 
>> Marcel
>> 
> 
> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
> added it to the kernel bugzilla):
> 
> T:  Bus=03 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= 0.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)
> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
> 
> and the firmware the kernel is trying to load:
> 
> [  762.729370] usb 3-1.3: Direct firmware load for
> ar3k/AthrBT_0x00000200.dfu failed with error -2
> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
> [  762.729374] Bluetooth: Loading patch file failed
> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
> [  762.729411] usbcore: registered new interface driver ath3k

I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.

Regards

Marcel


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-15 13:55     ` Marcel Holtmann
@ 2015-06-15 14:16       ` Sumit's Mailing Lists
  2015-06-15 16:57         ` Ben Young Tae Kim
  0 siblings, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-15 14:16 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

On 15/06/15 21:55, Marcel Holtmann wrote:
> Hi Smuit,
>
>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>> Bluetooth controller (from lsusb):
>>>>
>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>> Bluetooth 4.0
>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>
>>>> and the more detailed version:
>>>>
>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>> Bluetooth 4.0
>>>> Device Descriptor:
>>>> bLength                18
>>>> bDescriptorType         1
>>>> bcdUSB               1.10
>>>> bDeviceClass          224 Wireless
>>>> bDeviceSubClass         1 Radio Frequency
>>>> bDeviceProtocol         1 Bluetooth
>>>> bMaxPacketSize0        64
>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>> bcdDevice            0.01
>>>> iManufacturer           0
>>>> iProduct                0
>>>> iSerial                 0
>>>> bNumConfigurations      1
>>>> Configuration Descriptor:
>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>
>>> Regards
>>>
>>> Marcel
>>>
>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>> added it to the kernel bugzilla):
>>
>> T:  Bus=03 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= 0.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)
>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>
>> and the firmware the kernel is trying to load:
>>
>> [  762.729370] usb 3-1.3: Direct firmware load for
>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>> [  762.729374] Bluetooth: Loading patch file failed
>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>> [  762.729411] usbcore: registered new interface driver ath3k
> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>
> Regards
>
> Marcel
>
Marcel,

So it's pulling the right firmware file for my device, but It just
hasn't been released yet?

I know with the Wi-Fi firmware, the ath10k devs had python scripts to
extract the firmware binaries from the Windows drivers (mentioned in
here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
anyone done that before with the bluetooth firmware, or do you typically
just wait for atheros/qualcom to release official ones?

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-15 14:16       ` Sumit's Mailing Lists
@ 2015-06-15 16:57         ` Ben Young Tae Kim
  2015-06-15 17:48           ` Sumit's Mailing Lists
  0 siblings, 1 reply; 29+ messages in thread
From: Ben Young Tae Kim @ 2015-06-15 16:57 UTC (permalink / raw)
  To: Sumit's Mailing Lists, Marcel Holtmann, Huang, Rick; +Cc: linux-bluetooth

Hi Sumit,


On 06/15/15 07:16, Sumit's Mailing Lists wrote:
> On 15/06/15 21:55, Marcel Holtmann wrote:
>> Hi Smuit,
>>
>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>> Bluetooth controller (from lsusb):
>>>>>
>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>> Bluetooth 4.0
>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>
>>>>> and the more detailed version:
>>>>>
>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>> Bluetooth 4.0
>>>>> Device Descriptor:
>>>>> bLength                18
>>>>> bDescriptorType         1
>>>>> bcdUSB               1.10
>>>>> bDeviceClass          224 Wireless
>>>>> bDeviceSubClass         1 Radio Frequency
>>>>> bDeviceProtocol         1 Bluetooth
>>>>> bMaxPacketSize0        64
>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>> bcdDevice            0.01
>>>>> iManufacturer           0
>>>>> iProduct                0
>>>>> iSerial                 0
>>>>> bNumConfigurations      1
>>>>> Configuration Descriptor:
>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>
>>>> Regards
>>>>
>>>> Marcel
>>>>
>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>> added it to the kernel bugzilla):
>>>
>>> T:  Bus=03 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= 0.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)
>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>
>>> and the firmware the kernel is trying to load:
>>>
>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>> [  762.729374] Bluetooth: Loading patch file failed
>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>> [  762.729411] usbcore: registered new interface driver ath3k
>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>
>> Regards
>>
>> Marcel
>>
> Marcel,
>
> So it's pulling the right firmware file for my device, but It just
> hasn't been released yet?
>
> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
> extract the firmware binaries from the Windows drivers (mentioned in
> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
> anyone done that before with the bluetooth firmware, or do you typically
> just wait for atheros/qualcom to release official ones?
Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.

I'm adding my friend - Rick Huang here. He may help you out

Hi Rick,

Have you seen rom_version as 0x00000200?

>
> Sumit
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks
-- Ben Kim

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-15 16:57         ` Ben Young Tae Kim
@ 2015-06-15 17:48           ` Sumit's Mailing Lists
  2015-06-16 20:52             ` Ben Young Tae Kim
  0 siblings, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-15 17:48 UTC (permalink / raw)
  To: Ben Young Tae Kim, Marcel Holtmann, Huang, Rick; +Cc: linux-bluetooth

On 16/06/15 00:57, Ben Young Tae Kim wrote:
> Hi Sumit,
>
>
> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>> Hi Smuit,
>>>
>>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>>> Bluetooth controller (from lsusb):
>>>>>>
>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>> Bluetooth 4.0
>>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>>
>>>>>> and the more detailed version:
>>>>>>
>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>> Bluetooth 4.0
>>>>>> Device Descriptor:
>>>>>> bLength                18
>>>>>> bDescriptorType         1
>>>>>> bcdUSB               1.10
>>>>>> bDeviceClass          224 Wireless
>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>> bMaxPacketSize0        64
>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>> bcdDevice            0.01
>>>>>> iManufacturer           0
>>>>>> iProduct                0
>>>>>> iSerial                 0
>>>>>> bNumConfigurations      1
>>>>>> Configuration Descriptor:
>>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>>
>>>>> Regards
>>>>>
>>>>> Marcel
>>>>>
>>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>>> added it to the kernel bugzilla):
>>>>
>>>> T:  Bus=03 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= 0.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)
>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>
>>>> and the firmware the kernel is trying to load:
>>>>
>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>>
>>> Regards
>>>
>>> Marcel
>>>
>> Marcel,
>>
>> So it's pulling the right firmware file for my device, but It just
>> hasn't been released yet?
>>
>> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
>> extract the firmware binaries from the Windows drivers (mentioned in
>> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>> anyone done that before with the bluetooth firmware, or do you typically
>> just wait for atheros/qualcom to release official ones?
> Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.
>
> I'm adding my friend - Rick Huang here. He may help you out
>
> Hi Rick,
>
> Have you seen rom_version as 0x00000200?
>
>> Sumit
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Thanks
> -- Ben Kim
>

Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
there any other debugging information I need to pull for you?

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-15 17:48           ` Sumit's Mailing Lists
@ 2015-06-16 20:52             ` Ben Young Tae Kim
  2015-06-17  9:36               ` Marcel Holtmann
  2015-06-17 12:46               ` Sumit's Mailing Lists
  0 siblings, 2 replies; 29+ messages in thread
From: Ben Young Tae Kim @ 2015-06-16 20:52 UTC (permalink / raw)
  To: Sumit's Mailing Lists, Marcel Holtmann, Huang, Rick; +Cc: linux-bluetooth

Hi Sumit,

On 06/15/15 10:48, Sumit's Mailing Lists wrote:
> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>> Hi Sumit,
>>
>>
>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>> Hi Smuit,
>>>>
>>>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>
>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>> Bluetooth 4.0
>>>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>>>
>>>>>>> and the more detailed version:
>>>>>>>
>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>> Bluetooth 4.0
>>>>>>> Device Descriptor:
>>>>>>> bLength                18
>>>>>>> bDescriptorType         1
>>>>>>> bcdUSB               1.10
>>>>>>> bDeviceClass          224 Wireless
>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>> bMaxPacketSize0        64
>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>> bcdDevice            0.01
>>>>>>> iManufacturer           0
>>>>>>> iProduct                0
>>>>>>> iSerial                 0
>>>>>>> bNumConfigurations      1
>>>>>>> Configuration Descriptor:
>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Marcel
>>>>>>
>>>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>>>> added it to the kernel bugzilla):
>>>>>
>>>>> T:  Bus=03 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= 0.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)
>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>
>>>>> and the firmware the kernel is trying to load:
>>>>>
>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>>>
>>>> Regards
>>>>
>>>> Marcel
>>>>
>>> Marcel,
>>>
>>> So it's pulling the right firmware file for my device, but It just
>>> hasn't been released yet?
>>>
>>> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
>>> extract the firmware binaries from the Windows drivers (mentioned in
>>> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>> anyone done that before with the bluetooth firmware, or do you typically
>>> just wait for atheros/qualcom to release official ones?
>> Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.
>>
>> I'm adding my friend - Rick Huang here. He may help you out
>>
>> Hi Rick,
>>
>> Have you seen rom_version as 0x00000200?
>>
>>> Sumit
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Thanks
>> -- Ben Kim
>>
> Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
> there any other debugging information I need to pull for you?
>
> Sumit
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

According to my colleague, it is not AR chip but QCA ROME core inside even though they're sharing same VID/PID with AR/QCA ROME(version 2). That's why you cannot bring up your card with ath3k driver. I knew it was not a good idea as it was early stage to develop the card so that next version of ROME USB card(v3.0 or v3.2) will use different PID/VID as you can see below.

Can you follow up these instructions to see whether or not it can be addressed on your setup?

--
1. put this code in drivers/bluetooth/btusb.c

static const struct usb_device_id blacklist_table[] = {
...
    /* QCA ROME chipset */
    { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
    { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
    { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME }, // <-- add new VID/PID here
...

2. Copy firmware files into /lib/firmware/qca
 - nvm_usb_00000200.bin
 - rampatch_usb_00000200.bin
Those FW files won't be available on linux-firmware.git til today but it it will be available soon I believe.
--

Thanks
-- Ben Kim

 

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-16 20:52             ` Ben Young Tae Kim
@ 2015-06-17  9:36               ` Marcel Holtmann
  2015-06-17 18:34                 ` Ben Young Tae Kim
  2015-06-17 12:46               ` Sumit's Mailing Lists
  1 sibling, 1 reply; 29+ messages in thread
From: Marcel Holtmann @ 2015-06-17  9:36 UTC (permalink / raw)
  To: Ben Young Tae Kim; +Cc: Sumit's Mailing Lists, Huang, Rick, linux-bluetooth

Hi Ben,

>>>>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>> 
>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>> Bluetooth 4.0
>>>>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>>>> 
>>>>>>>> and the more detailed version:
>>>>>>>> 
>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>> Bluetooth 4.0
>>>>>>>> Device Descriptor:
>>>>>>>> bLength                18
>>>>>>>> bDescriptorType         1
>>>>>>>> bcdUSB               1.10
>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>> bMaxPacketSize0        64
>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>> bcdDevice            0.01
>>>>>>>> iManufacturer           0
>>>>>>>> iProduct                0
>>>>>>>> iSerial                 0
>>>>>>>> bNumConfigurations      1
>>>>>>>> Configuration Descriptor:
>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>>>> 
>>>>>>> Regards
>>>>>>> 
>>>>>>> Marcel
>>>>>>> 
>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>>>>> added it to the kernel bugzilla):
>>>>>> 
>>>>>> T:  Bus=03 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= 0.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)
>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>> 
>>>>>> and the firmware the kernel is trying to load:
>>>>>> 
>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>>>> 
>>>>> Regards
>>>>> 
>>>>> Marcel
>>>>> 
>>>> Marcel,
>>>> 
>>>> So it's pulling the right firmware file for my device, but It just
>>>> hasn't been released yet?
>>>> 
>>>> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
>>>> extract the firmware binaries from the Windows drivers (mentioned in
>>>> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>> anyone done that before with the bluetooth firmware, or do you typically
>>>> just wait for atheros/qualcom to release official ones?
>>> Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.
>>> 
>>> I'm adding my friend - Rick Huang here. He may help you out
>>> 
>>> Hi Rick,
>>> 
>>> Have you seen rom_version as 0x00000200?
>>> 
>>>> Sumit
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> Thanks
>>> -- Ben Kim
>>> 
>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
>> there any other debugging information I need to pull for you?
>> 
>> Sumit
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> According to my colleague, it is not AR chip but QCA ROME core inside even though they're sharing same VID/PID with AR/QCA ROME(version 2). That's why you cannot bring up your card with ath3k driver. I knew it was not a good idea as it was early stage to develop the card so that next version of ROME USB card(v3.0 or v3.2) will use different PID/VID as you can see below.

I would really prefer if companies pay more attention when releasing hardware that the USB product ID is unique. Is there any other identifying detail in the USB descriptors that could be used to check which version it is?

So you can not just walk away and say bad luck here. You released this mishap and now have to figure out on how we can make both hardware versions work. Otherwise I will take the other working one out as well and level the playing field here.

Regards

Marcel


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-16 20:52             ` Ben Young Tae Kim
  2015-06-17  9:36               ` Marcel Holtmann
@ 2015-06-17 12:46               ` Sumit's Mailing Lists
  2015-06-17 13:00                 ` Sumit Khanna
  1 sibling, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-17 12:46 UTC (permalink / raw)
  To: Ben Young Tae Kim, Marcel Holtmann, Huang, Rick; +Cc: linux-bluetooth

On 17/06/15 04:52, Ben Young Tae Kim wrote:
> Hi Sumit,
>
> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>> Hi Sumit,
>>>
>>>
>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>> Hi Smuit,
>>>>>
>>>>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>
>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>> Bluetooth 4.0
>>>>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>>>>
>>>>>>>> and the more detailed version:
>>>>>>>>
>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>> Bluetooth 4.0
>>>>>>>> Device Descriptor:
>>>>>>>> bLength                18
>>>>>>>> bDescriptorType         1
>>>>>>>> bcdUSB               1.10
>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>> bMaxPacketSize0        64
>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>> bcdDevice            0.01
>>>>>>>> iManufacturer           0
>>>>>>>> iProduct                0
>>>>>>>> iSerial                 0
>>>>>>>> bNumConfigurations      1
>>>>>>>> Configuration Descriptor:
>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Marcel
>>>>>>>
>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>>>>> added it to the kernel bugzilla):
>>>>>>
>>>>>> T:  Bus=03 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= 0.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)
>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>
>>>>>> and the firmware the kernel is trying to load:
>>>>>>
>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>>>>
>>>>> Regards
>>>>>
>>>>> Marcel
>>>>>
>>>> Marcel,
>>>>
>>>> So it's pulling the right firmware file for my device, but It just
>>>> hasn't been released yet?
>>>>
>>>> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
>>>> extract the firmware binaries from the Windows drivers (mentioned in
>>>> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>> anyone done that before with the bluetooth firmware, or do you typically
>>>> just wait for atheros/qualcom to release official ones?
>>> Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.
>>>
>>> I'm adding my friend - Rick Huang here. He may help you out
>>>
>>> Hi Rick,
>>>
>>> Have you seen rom_version as 0x00000200?
>>>
>>>> Sumit
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> Thanks
>>> -- Ben Kim
>>>
>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
>> there any other debugging information I need to pull for you?
>>
>> Sumit
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> According to my colleague, it is not AR chip but QCA ROME core inside even though they're sharing same VID/PID with AR/QCA ROME(version 2). That's why you cannot bring up your card with ath3k driver. I knew it was not a good idea as it was early stage to develop the card so that next version of ROME USB card(v3.0 or v3.2) will use different PID/VID as you can see below.
>
> Can you follow up these instructions to see whether or not it can be addressed on your setup?
>
> --
> 1. put this code in drivers/bluetooth/btusb.c
>
> static const struct usb_device_id blacklist_table[] = {
> ...
>     /* QCA ROME chipset */
>     { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>     { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>     { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME }, // <-- add new VID/PID here
> ...
>
> 2. Copy firmware files into /lib/firmware/qca
>  - nvm_usb_00000200.bin
>  - rampatch_usb_00000200.bin
> Those FW files won't be available on linux-firmware.git til today but it it will be available soon I believe.
> --
>
> Thanks
> -- Ben Kim
>
>  
>
Hi Ben,

I added that line to my btusb.c; did a mrpropery, copied my .config back
into the source tree, disabled ATH3K in menucofnig, made the bzImage and
rebooted. The firmware you attached is in /lib/firmware/qca.

I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
could get some more info, and discovered I also have to delete this line
or it will match the ath first:

{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }

So then I saw

[    1.263991] usb 3-1.3: new full-speed USB device number 3 using ehci-pci
[    1.277022] usb 4-1.8: new full-speed USB device number 3 using ehci-pci
[    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
idProduct=3004
[    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
SerialNumber=0
[    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
[    1.350462] BT Device Info 0
[    1.350463] BT Device Info (after matching) 32768
[    1.350466] In Rome Block
[    1.350546] input: ETPS/2 Elantech Touchpad as
/devices/platform/i8042/serio1/input/input10
[    1.350671] hci0
[    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
[    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
idProduct=ff00
[    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
SerialNumber=1
[    1.364798] usb 4-1.8: Product: MSI EPF USB
[    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
[    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB

So those BT Device Info statements I added in the probe function. "In
Rome Block" I added right after "if (id->driver_info & BTUSB_QCA_ROME) "
and you can see where that error comes from.

And that comes from...oh it checks another table...okay so I added the
following to qca_device_info

        { 0x00000200, 28, 4, 18 },

and now I get;

[    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
[    1.357943] BT Device Info 0
[    1.357944] BT Device Info (after matching) 32768
[    1.357946] In Rome Block
[    1.358113] hci0
[    1.358516] bluetooth hci0: Direct firmware load for
qca/rampatch_usb_00000200.bin failed with error -2
[    1.358517] Bluetooth: hci0: failed to request rampatch file:
qca/rampatch_usb_00000200.bin (-2)

So progress. It's attempting to load the firmware and failing. Are those
the right numbers for the device_info block?

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-17 12:46               ` Sumit's Mailing Lists
@ 2015-06-17 13:00                 ` Sumit Khanna
  2015-06-17 18:54                   ` Ben Young Tae Kim
  0 siblings, 1 reply; 29+ messages in thread
From: Sumit Khanna @ 2015-06-17 13:00 UTC (permalink / raw)
  To: Ben Young Tae Kim, Marcel Holtmann, Huang, Rick; +Cc: linux-bluetooth

On 17/06/15 20:46, Sumit's Mailing Lists wrote:
> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>> Hi Sumit,
>>
>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>> Hi Sumit,
>>>>
>>>>
>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>> Hi Smuit,
>>>>>>
>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>
>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>>> Bluetooth 4.0
>>>>>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>>>>>
>>>>>>>>> and the more detailed version:
>>>>>>>>>
>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>>> Bluetooth 4.0
>>>>>>>>> Device Descriptor:
>>>>>>>>> bLength                18
>>>>>>>>> bDescriptorType         1
>>>>>>>>> bcdUSB               1.10
>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>> bcdDevice            0.01
>>>>>>>>> iManufacturer           0
>>>>>>>>> iProduct                0
>>>>>>>>> iSerial                 0
>>>>>>>>> bNumConfigurations      1
>>>>>>>>> Configuration Descriptor:
>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Marcel
>>>>>>>>
>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>>>>>> added it to the kernel bugzilla):
>>>>>>>
>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>
>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>
>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Marcel
>>>>>>
>>>>> Marcel,
>>>>>
>>>>> So it's pulling the right firmware file for my device, but It just
>>>>> hasn't been released yet?
>>>>>
>>>>> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
>>>>> extract the firmware binaries from the Windows drivers (mentioned in
>>>>> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>> anyone done that before with the bluetooth firmware, or do you typically
>>>>> just wait for atheros/qualcom to release official ones?
>>>> Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.
>>>>
>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>
>>>> Hi Rick,
>>>>
>>>> Have you seen rom_version as 0x00000200?
>>>>
>>>>> Sumit
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> Thanks
>>>> -- Ben Kim
>>>>
>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
>>> there any other debugging information I need to pull for you?
>>>
>>> Sumit
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> According to my colleague, it is not AR chip but QCA ROME core inside even though they're sharing same VID/PID with AR/QCA ROME(version 2). That's why you cannot bring up your card with ath3k driver. I knew it was not a good idea as it was early stage to develop the card so that next version of ROME USB card(v3.0 or v3.2) will use different PID/VID as you can see below.
>>
>> Can you follow up these instructions to see whether or not it can be addressed on your setup?
>>
>> --
>> 1. put this code in drivers/bluetooth/btusb.c
>>
>> static const struct usb_device_id blacklist_table[] = {
>> ...
>>     /* QCA ROME chipset */
>>     { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>     { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>     { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME }, // <-- add new VID/PID here
>> ...
>>
>> 2. Copy firmware files into /lib/firmware/qca
>>  - nvm_usb_00000200.bin
>>  - rampatch_usb_00000200.bin
>> Those FW files won't be available on linux-firmware.git til today but it it will be available soon I believe.
>> --
>>
>> Thanks
>> -- Ben Kim
>>
>>  
>>
> Hi Ben,
>
> I added that line to my btusb.c; did a mrpropery, copied my .config back
> into the source tree, disabled ATH3K in menucofnig, made the bzImage and
> rebooted. The firmware you attached is in /lib/firmware/qca.
>
> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
> could get some more info, and discovered I also have to delete this line
> or it will match the ath first:
>
> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>
> So then I saw
>
> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using ehci-pci
> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using ehci-pci
> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
> idProduct=3004
> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
> SerialNumber=0
> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
> [    1.350462] BT Device Info 0
> [    1.350463] BT Device Info (after matching) 32768
> [    1.350466] In Rome Block
> [    1.350546] input: ETPS/2 Elantech Touchpad as
> /devices/platform/i8042/serio1/input/input10
> [    1.350671] hci0
> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
> idProduct=ff00
> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
> SerialNumber=1
> [    1.364798] usb 4-1.8: Product: MSI EPF USB
> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>
> So those BT Device Info statements I added in the probe function. "In
> Rome Block" I added right after "if (id->driver_info & BTUSB_QCA_ROME) "
> and you can see where that error comes from.
>
> And that comes from...oh it checks another table...okay so I added the
> following to qca_device_info
>
>         { 0x00000200, 28, 4, 18 },
>
> and now I get;
>
> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
> [    1.357943] BT Device Info 0
> [    1.357944] BT Device Info (after matching) 32768
> [    1.357946] In Rome Block
> [    1.358113] hci0
> [    1.358516] bluetooth hci0: Direct firmware load for
> qca/rampatch_usb_00000200.bin failed with error -2
> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
> qca/rampatch_usb_00000200.bin (-2)
>
> So progress. It's attempting to load the firmware and failing. Are those
> the right numbers for the device_info block?
>
> Sumit
Just remembered -2 is when it can't even find the firmware. But I think
I have it installed right. Is this correct:

catelyn linux # ls /lib/firmware/qca/ -l
total 60
-rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
-rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin

catelyn linux # sha256sum /lib/firmware/qca/*
50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087 
/lib/firmware/qca/nvm_usb_00000200.bin
7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5 
/lib/firmware/qca/rampatch_usb_00000200.bin

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-17  9:36               ` Marcel Holtmann
@ 2015-06-17 18:34                 ` Ben Young Tae Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Ben Young Tae Kim @ 2015-06-17 18:34 UTC (permalink / raw)
  To: Marcel Holtmann, Huang, Rick; +Cc: Sumit's Mailing Lists, linux-bluetooth

Hi Marcel,

On 06/17/15 02:36, Marcel Holtmann wrote:
> Hi Ben,
>
>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>
>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>>> Bluetooth 4.0
>>>>>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>>>>>
>>>>>>>>> and the more detailed version:
>>>>>>>>>
>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>>> Bluetooth 4.0
>>>>>>>>> Device Descriptor:
>>>>>>>>> bLength                18
>>>>>>>>> bDescriptorType         1
>>>>>>>>> bcdUSB               1.10
>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>> bcdDevice            0.01
>>>>>>>>> iManufacturer           0
>>>>>>>>> iProduct                0
>>>>>>>>> iSerial                 0
>>>>>>>>> bNumConfigurations      1
>>>>>>>>> Configuration Descriptor:
>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Marcel
>>>>>>>>
>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>>>>>> added it to the kernel bugzilla):
>>>>>>>
>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>
>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>
>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Marcel
>>>>>>
>>>>> Marcel,
>>>>>
>>>>> So it's pulling the right firmware file for my device, but It just
>>>>> hasn't been released yet?
>>>>>
>>>>> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
>>>>> extract the firmware binaries from the Windows drivers (mentioned in
>>>>> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>> anyone done that before with the bluetooth firmware, or do you typically
>>>>> just wait for atheros/qualcom to release official ones?
>>>> Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.
>>>>
>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>
>>>> Hi Rick,
>>>>
>>>> Have you seen rom_version as 0x00000200?
>>>>
>>>>> Sumit
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> Thanks
>>>> -- Ben Kim
>>>>
>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
>>> there any other debugging information I need to pull for you?
>>>
>>> Sumit
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> According to my colleague, it is not AR chip but QCA ROME core inside even though they're sharing same VID/PID with AR/QCA ROME(version 2). That's why you cannot bring up your card with ath3k driver. I knew it was not a good idea as it was early stage to develop the card so that next version of ROME USB card(v3.0 or v3.2) will use different PID/VID as you can see below.
> I would really prefer if companies pay more attention when releasing hardware that the USB product ID is unique. Is there any other identifying detail in the USB descriptors that could be used to check which version it is?
>
> So you can not just walk away and say bad luck here. You released this mishap and now have to figure out on how we can make both hardware versions work. Otherwise I will take the other working one out as well and level the playing field here.
>
> Regards
>
> Marcel
>

Yes, I agree with you. I would say upcoming other product which has built a version of ROME including v2.0/v2.1/v3.0/v3.2 is going to use different PID but I hadn't recognized MSI has a QCA ROME of same PID with AR3012 until I got reported.

Hi Rick,

Is there any other way to detect AR/ROME chips sharing with same VID/PID except sending command to controller even though they're reporting same PID?

Thanks
-- Ben Kim

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-17 13:00                 ` Sumit Khanna
@ 2015-06-17 18:54                   ` Ben Young Tae Kim
  2015-06-18  2:36                     ` Sumit's Mailing Lists
  0 siblings, 1 reply; 29+ messages in thread
From: Ben Young Tae Kim @ 2015-06-17 18:54 UTC (permalink / raw)
  To: Sumit Khanna, Marcel Holtmann, Huang, Rick; +Cc: linux-bluetooth

Hi Sumit,

On 06/17/15 06:00, Sumit Khanna wrote:
> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>> Hi Sumit,
>>>
>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>> Hi Sumit,
>>>>>
>>>>>
>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>> Hi Smuit,
>>>>>>>
>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>
>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>>>> Bluetooth 4.0
>>>>>>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>>>>>>
>>>>>>>>>> and the more detailed version:
>>>>>>>>>>
>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>> Device Descriptor:
>>>>>>>>>> bLength                18
>>>>>>>>>> bDescriptorType         1
>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>> iManufacturer           0
>>>>>>>>>> iProduct                0
>>>>>>>>>> iSerial                 0
>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>> Configuration Descriptor:
>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>>
>>>>>>>>> Marcel
>>>>>>>>>
>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>
>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>
>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>
>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Marcel
>>>>>>>
>>>>>> Marcel,
>>>>>>
>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>> hasn't been released yet?
>>>>>>
>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
>>>>>> extract the firmware binaries from the Windows drivers (mentioned in
>>>>>> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>> anyone done that before with the bluetooth firmware, or do you typically
>>>>>> just wait for atheros/qualcom to release official ones?
>>>>> Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.
>>>>>
>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>
>>>>> Hi Rick,
>>>>>
>>>>> Have you seen rom_version as 0x00000200?
>>>>>
>>>>>> Sumit
>>>>>> --
>>>>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>> Thanks
>>>>> -- Ben Kim
>>>>>
>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
>>>> there any other debugging information I need to pull for you?
>>>>
>>>> Sumit
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> According to my colleague, it is not AR chip but QCA ROME core inside even though they're sharing same VID/PID with AR/QCA ROME(version 2). That's why you cannot bring up your card with ath3k driver. I knew it was not a good idea as it was early stage to develop the card so that next version of ROME USB card(v3.0 or v3.2) will use different PID/VID as you can see below.
>>>
>>> Can you follow up these instructions to see whether or not it can be addressed on your setup?
>>>
>>> --
>>> 1. put this code in drivers/bluetooth/btusb.c
>>>
>>> static const struct usb_device_id blacklist_table[] = {
>>> ...
>>>     /* QCA ROME chipset */
>>>     { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>     { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>     { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME }, // <-- add new VID/PID here
>>> ...
>>>
>>> 2. Copy firmware files into /lib/firmware/qca
>>>  - nvm_usb_00000200.bin
>>>  - rampatch_usb_00000200.bin
>>> Those FW files won't be available on linux-firmware.git til today but it it will be available soon I believe.
>>> --
>>>
>>> Thanks
>>> -- Ben Kim
>>>
>>>  
>>>
>> Hi Ben,
>>
>> I added that line to my btusb.c; did a mrpropery, copied my .config back
>> into the source tree, disabled ATH3K in menucofnig, made the bzImage and
>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>
>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>> could get some more info, and discovered I also have to delete this line
>> or it will match the ath first:
>>
>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>
>> So then I saw
>>
>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using ehci-pci
>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using ehci-pci
>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>> idProduct=3004
>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>> SerialNumber=0
>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>> [    1.350462] BT Device Info 0
>> [    1.350463] BT Device Info (after matching) 32768
>> [    1.350466] In Rome Block
>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>> /devices/platform/i8042/serio1/input/input10
>> [    1.350671] hci0
>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>> idProduct=ff00
>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>> SerialNumber=1
>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>
>> So those BT Device Info statements I added in the probe function. "In
>> Rome Block" I added right after "if (id->driver_info & BTUSB_QCA_ROME) "
>> and you can see where that error comes from.
>>
>> And that comes from...oh it checks another table...okay so I added the
>> following to qca_device_info
>>
>>         { 0x00000200, 28, 4, 18 },
>>
>> and now I get;
>>
>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>> [    1.357943] BT Device Info 0
>> [    1.357944] BT Device Info (after matching) 32768
>> [    1.357946] In Rome Block
>> [    1.358113] hci0
>> [    1.358516] bluetooth hci0: Direct firmware load for
>> qca/rampatch_usb_00000200.bin failed with error -2
>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>> qca/rampatch_usb_00000200.bin (-2)
>>
>> So progress. It's attempting to load the firmware and failing. Are those
>> the right numbers for the device_info block?
>>
>> Sumit
> Just remembered -2 is when it can't even find the firmware. But I think
> I have it installed right. Is this correct:
>
> catelyn linux # ls /lib/firmware/qca/ -l
> total 60
> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>
> catelyn linux # sha256sum /lib/firmware/qca/*
> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087 
> /lib/firmware/qca/nvm_usb_00000200.bin
> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5 
> /lib/firmware/qca/rampatch_usb_00000200.bin
>

You did right thing. I cannot understand why driver couldn't access firmware file which is in /lib/firmware/qca. Did you check each folder has right permission to access?

Thanks
-- Ben Kim

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-17 18:54                   ` Ben Young Tae Kim
@ 2015-06-18  2:36                     ` Sumit's Mailing Lists
  2015-06-18  2:53                       ` Kim, Ben Young Tae
  0 siblings, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-18  2:36 UTC (permalink / raw)
  To: Ben Young Tae Kim, Marcel Holtmann, Huang, Rick; +Cc: linux-bluetooth

On 18/06/15 02:54, Ben Young Tae Kim wrote:
> Hi Sumit,
>
> On 06/17/15 06:00, Sumit Khanna wrote:
>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>> Hi Sumit,
>>>>
>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>> Hi Sumit,
>>>>>>
>>>>>>
>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>> Hi Smuit,
>>>>>>>>
>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the following
>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>
>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>> assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.
>>>>>>>>>>
>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>
>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>> bLength                18
>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>> iProduct                0
>>>>>>>>>>> iSerial                 0
>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for the devices.
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>>
>>>>>>>>>> Marcel
>>>>>>>>>>
>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>
>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>
>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>
>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>> [  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>> I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Marcel
>>>>>>>>
>>>>>>> Marcel,
>>>>>>>
>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>> hasn't been released yet?
>>>>>>>
>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python scripts to
>>>>>>> extract the firmware binaries from the Windows drivers (mentioned in
>>>>>>> here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>> anyone done that before with the bluetooth firmware, or do you typically
>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>> Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.
>>>>>>
>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>
>>>>>> Hi Rick,
>>>>>>
>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>
>>>>>>> Sumit
>>>>>>> --
>>>>>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>> Thanks
>>>>>> -- Ben Kim
>>>>>>
>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
>>>>> there any other debugging information I need to pull for you?
>>>>>
>>>>> Sumit
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> According to my colleague, it is not AR chip but QCA ROME core inside even though they're sharing same VID/PID with AR/QCA ROME(version 2). That's why you cannot bring up your card with ath3k driver. I knew it was not a good idea as it was early stage to develop the card so that next version of ROME USB card(v3.0 or v3.2) will use different PID/VID as you can see below.
>>>>
>>>> Can you follow up these instructions to see whether or not it can be addressed on your setup?
>>>>
>>>> --
>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>
>>>> static const struct usb_device_id blacklist_table[] = {
>>>> ...
>>>>     /* QCA ROME chipset */
>>>>     { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>     { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>     { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME }, // <-- add new VID/PID here
>>>> ...
>>>>
>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>  - nvm_usb_00000200.bin
>>>>  - rampatch_usb_00000200.bin
>>>> Those FW files won't be available on linux-firmware.git til today but it it will be available soon I believe.
>>>> --
>>>>
>>>> Thanks
>>>> -- Ben Kim
>>>>
>>>>  
>>>>
>>> Hi Ben,
>>>
>>> I added that line to my btusb.c; did a mrpropery, copied my .config back
>>> into the source tree, disabled ATH3K in menucofnig, made the bzImage and
>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>
>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>> could get some more info, and discovered I also have to delete this line
>>> or it will match the ath first:
>>>
>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>
>>> So then I saw
>>>
>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using ehci-pci
>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using ehci-pci
>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>> idProduct=3004
>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>> SerialNumber=0
>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>> [    1.350462] BT Device Info 0
>>> [    1.350463] BT Device Info (after matching) 32768
>>> [    1.350466] In Rome Block
>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>> /devices/platform/i8042/serio1/input/input10
>>> [    1.350671] hci0
>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>> idProduct=ff00
>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>> SerialNumber=1
>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>
>>> So those BT Device Info statements I added in the probe function. "In
>>> Rome Block" I added right after "if (id->driver_info & BTUSB_QCA_ROME) "
>>> and you can see where that error comes from.
>>>
>>> And that comes from...oh it checks another table...okay so I added the
>>> following to qca_device_info
>>>
>>>         { 0x00000200, 28, 4, 18 },
>>>
>>> and now I get;
>>>
>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>> [    1.357943] BT Device Info 0
>>> [    1.357944] BT Device Info (after matching) 32768
>>> [    1.357946] In Rome Block
>>> [    1.358113] hci0
>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>> qca/rampatch_usb_00000200.bin failed with error -2
>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>> qca/rampatch_usb_00000200.bin (-2)
>>>
>>> So progress. It's attempting to load the firmware and failing. Are those
>>> the right numbers for the device_info block?
>>>
>>> Sumit
>> Just remembered -2 is when it can't even find the firmware. But I think
>> I have it installed right. Is this correct:
>>
>> catelyn linux # ls /lib/firmware/qca/ -l
>> total 60
>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>
>> catelyn linux # sha256sum /lib/firmware/qca/*
>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087 
>> /lib/firmware/qca/nvm_usb_00000200.bin
>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5 
>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>
> You did right thing. I cannot understand why driver couldn't access firmware file which is in /lib/firmware/qca. Did you check each folder has right permission to access?
>
> Thanks
> -- Ben Kim
>

Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
module and it loads the firmware! :)

[  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
[  108.599733] usbcore: registered new interface driver btusb
[  108.599769] hci0
[  108.602907] Bluetooth: hci0: using rampatch file:
qca/rampatch_usb_00000200.bin
[  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
firmware rome 0x200 build 0x111
[  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin

and I checked rfkill to make sure I wasn't soft/hard blocked:

sudo rfkill list
0: msi-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: msi-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
3: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

Sumit



However, upon attempting to turn on bluetooth, either via the blueman
applet or the bluetoothctl command line like so:

bluetoothctl
[NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
[bluetooth]# select 2C:33:7A:00:05:DA
[bluetooth]# power on
Failed to set power on: org.bluez.Error.Failed
[bluetooth]#

I get the following kernel error:

[ 1172.484075] hci0
[ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18  2:36                     ` Sumit's Mailing Lists
@ 2015-06-18  2:53                       ` Kim, Ben Young Tae
  2015-06-18  3:01                         ` Sumit's Mailing Lists
  2015-06-18  3:02                         ` Sumit's Mailing Lists
  0 siblings, 2 replies; 29+ messages in thread
From: Kim, Ben Young Tae @ 2015-06-18  2:53 UTC (permalink / raw)
  To: Sumit's Mailing Lists; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 11420 bytes --]

Hi Sumit,

On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists <lists@battlepenguin.com<mailto:lists@battlepenguin.com>> wrote:

On 18/06/15 02:54, Ben Young Tae Kim wrote:
Hi Sumit,

On 06/17/15 06:00, Sumit Khanna wrote:
On 17/06/15 20:46, Sumit's Mailing Lists wrote:
On 17/06/15 04:52, Ben Young Tae Kim wrote:
Hi Sumit,

On 06/15/15 10:48, Sumit's Mailing Lists wrote:
On 16/06/15 00:57, Ben Young Tae Kim wrote:
Hi Sumit,


On 06/15/15 07:16, Sumit's Mailing Lists wrote:
On 15/06/15 21:55, Marcel Holtmann wrote:
Hi Smuit,

I'm currently using an MSI WS60 laptop which contains the following
Bluetooth controller (from lsusb):

Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
Bluetooth 4.0
assuming that the firmware is present, this is most likely just missing the right VID/PID additions in the drivers. Please prepare a patch for that.

and the more detailed version:

Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
Bluetooth 4.0
Device Descriptor:
bLength                18
bDescriptorType         1
bcdUSB               1.10
bDeviceClass          224 Wireless
bDeviceSubClass         1 Radio Frequency
bDeviceProtocol         1 Bluetooth
bMaxPacketSize0        64
idVendor           0x0cf3 Atheros Communications, Inc.
idProduct          0x3004 AR3012 Bluetooth 4.0
bcdDevice            0.01
iManufacturer           0
iProduct                0
iSerial                 0
bNumConfigurations      1
Configuration Descriptor:
I actually prefer /sys/kernel/debug/usb/devices output for the devices.

Regards

Marcel

Here is the output from /sys/kernel/debug/usb/devices for my ath3k (also
added it to the kernel bugzilla):

T:  Bus=03 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= 0.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)
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms

and the firmware the kernel is trying to load:

[  762.729370] usb 3-1.3: Direct firmware load for
ar3k/AthrBT_0x00000200.dfu failed with error -2
[  762.729373] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
[  762.729374] Bluetooth: Loading patch file failed
[  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
[  762.729411] usbcore: registered new interface driver ath3k
I fail to see that firmware in linux-firmware tree. However this up to Atheros / Qualcomm to submit there. I can not do much about this.

Regards

Marcel

Marcel,

So it's pulling the right firmware file for my device, but It just
hasn't been released yet?

I know with the Wi-Fi firmware, the ath10k devs had python scripts to
extract the firmware binaries from the Windows drivers (mentioned in
here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
anyone done that before with the bluetooth firmware, or do you typically
just wait for atheros/qualcom to release official ones?
Where did you get your atheros board/card since I couldn't find that board here. Is it a laptop? The BT firmware driver was trying to load AthrBT_0x00000200.dfu file and it got failed because no firmware file was present. But 0x00000200 means fw_version.rom_version which coming from controller chip, however, I haven't seen this version on Atheros chipset.

I'm adding my friend - Rick Huang here. He may help you out

Hi Rick,

Have you seen rom_version as 0x00000200?

Sumit
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org<mailto:majordomo@vger.kernel.org>
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thanks
-- Ben Kim

Yes, It's an MSI WS-60 Laptop, purchased two months ago in Australia. Is
there any other debugging information I need to pull for you?

Sumit
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org<mailto:majordomo@vger.kernel.org>
More majordomo info at  http://vger.kernel.org/majordomo-info.html
According to my colleague, it is not AR chip but QCA ROME core inside even though they're sharing same VID/PID with AR/QCA ROME(version 2). That's why you cannot bring up your card with ath3k driver. I knew it was not a good idea as it was early stage to develop the card so that next version of ROME USB card(v3.0 or v3.2) will use different PID/VID as you can see below.

Can you follow up these instructions to see whether or not it can be addressed on your setup?

--
1. put this code in drivers/bluetooth/btusb.c

static const struct usb_device_id blacklist_table[] = {
...
   /* QCA ROME chipset */
   { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
   { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
   { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME }, // <-- add new VID/PID here
...

2. Copy firmware files into /lib/firmware/qca
- nvm_usb_00000200.bin
- rampatch_usb_00000200.bin
Those FW files won't be available on linux-firmware.git til today but it it will be available soon I believe.
--

Thanks
-- Ben Kim



Hi Ben,

I added that line to my btusb.c; did a mrpropery, copied my .config back
into the source tree, disabled ATH3K in menucofnig, made the bzImage and
rebooted. The firmware you attached is in /lib/firmware/qca.

I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
could get some more info, and discovered I also have to delete this line
or it will match the ath first:

{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }

So then I saw

[    1.263991] usb 3-1.3: new full-speed USB device number 3 using ehci-pci
[    1.277022] usb 4-1.8: new full-speed USB device number 3 using ehci-pci
[    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
idProduct=3004
[    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
SerialNumber=0
[    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
[    1.350462] BT Device Info 0
[    1.350463] BT Device Info (after matching) 32768
[    1.350466] In Rome Block
[    1.350546] input: ETPS/2 Elantech Touchpad as
/devices/platform/i8042/serio1/input/input10
[    1.350671] hci0
[    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
[    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
idProduct=ff00
[    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
SerialNumber=1
[    1.364798] usb 4-1.8: Product: MSI EPF USB
[    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
[    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB

So those BT Device Info statements I added in the probe function. "In
Rome Block" I added right after "if (id->driver_info & BTUSB_QCA_ROME) "
and you can see where that error comes from.

And that comes from...oh it checks another table...okay so I added the
following to qca_device_info

       { 0x00000200, 28, 4, 18 },

and now I get;

[    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
[    1.357943] BT Device Info 0
[    1.357944] BT Device Info (after matching) 32768
[    1.357946] In Rome Block
[    1.358113] hci0
[    1.358516] bluetooth hci0: Direct firmware load for
qca/rampatch_usb_00000200.bin failed with error -2
[    1.358517] Bluetooth: hci0: failed to request rampatch file:
qca/rampatch_usb_00000200.bin (-2)

So progress. It's attempting to load the firmware and failing. Are those
the right numbers for the device_info block?

Sumit
Just remembered -2 is when it can't even find the firmware. But I think
I have it installed right. Is this correct:

catelyn linux # ls /lib/firmware/qca/ -l
total 60
-rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
-rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin

catelyn linux # sha256sum /lib/firmware/qca/*
50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
/lib/firmware/qca/nvm_usb_00000200.bin
7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
/lib/firmware/qca/rampatch_usb_00000200.bin

You did right thing. I cannot understand why driver couldn't access firmware file which is in /lib/firmware/qca. Did you check each folder has right permission to access?

Thanks
-- Ben Kim


Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
module and it loads the firmware! :)

[  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
[  108.599733] usbcore: registered new interface driver btusb
[  108.599769] hci0
[  108.602907] Bluetooth: hci0: using rampatch file:
qca/rampatch_usb_00000200.bin
[  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
firmware rome 0x200 build 0x111
[  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin

and I checked rfkill to make sure I wasn't soft/hard blocked:

sudo rfkill list
0: msi-bluetooth: Bluetooth
   Soft blocked: no
   Hard blocked: no
1: msi-wlan: Wireless LAN
   Soft blocked: no
   Hard blocked: no
2: hci0: Bluetooth
   Soft blocked: no
   Hard blocked: no
3: phy0: Wireless LAN
   Soft blocked: no
   Hard blocked: no

Sumit



However, upon attempting to turn on bluetooth, either via the blueman
applet or the bluetoothctl command line like so:

bluetoothctl
[NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
[bluetooth]# select 2C:33:7A:00:05:DA
[bluetooth]# power on
Failed to set power on: org.bluez.Error.Failed
[bluetooth]#

I get the following kernel error:

[ 1172.484075] hci0
[ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)


Why does it try to load firmware again since it is already done on previous logs. I haven't used bluetoothctrl command. Can you follow up this step?

1. Make sure to load firmware files on the kernel message
Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
firmware rome 0x200 build 0x111

2. # hciattach hci0 up
3. # hcitool inq


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org<mailto:majordomo@vger.kernel.org>
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks
--Ben Kim

[-- Attachment #2: Type: text/html, Size: 73631 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18  2:53                       ` Kim, Ben Young Tae
@ 2015-06-18  3:01                         ` Sumit's Mailing Lists
  2015-06-18 16:00                           ` Ben Young Tae Kim
  2015-06-18  3:02                         ` Sumit's Mailing Lists
  1 sibling, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-18  3:01 UTC (permalink / raw)
  To: Kim, Ben Young Tae; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 14232 bytes --]

On 18/06/15 10:53, Kim, Ben Young Tae wrote:
> Hi Sumit,
>
> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>
>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>> Hi Sumit,
>>>
>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>> Hi Sumit,
>>>>>>
>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>> Hi Sumit,
>>>>>>>>
>>>>>>>>
>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>> Hi Smuit,
>>>>>>>>>>
>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>> following
>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>
>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>
>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>> the devices.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards
>>>>>>>>>>>>
>>>>>>>>>>>> Marcel
>>>>>>>>>>>>
>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>> ath3k (also
>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>
>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>
>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>
>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>> much about this.
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>>
>>>>>>>>>> Marcel
>>>>>>>>>>
>>>>>>>>> Marcel,
>>>>>>>>>
>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>> hasn't been released yet?
>>>>>>>>>
>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>> scripts to
>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>> (mentioned in
>>>>>>>>> here
>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>> typically
>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>
>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>
>>>>>>>> Hi Rick,
>>>>>>>>
>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>
>>>>>>>>> Sumit
>>>>>>>>> --
>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>> linux-bluetooth" in
>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>> Thanks
>>>>>>>> -- Ben Kim
>>>>>>>>
>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>> Australia. Is
>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>
>>>>>>> Sumit
>>>>>>> --
>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>> linux-bluetooth" in
>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>
>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>> be addressed on your setup?
>>>>>>
>>>>>> --
>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>
>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>> ...
>>>>>>    /* QCA ROME chipset */
>>>>>>    { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>    { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>    { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>> // <-- add new VID/PID here
>>>>>> ...
>>>>>>
>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>> - nvm_usb_00000200.bin
>>>>>> - rampatch_usb_00000200.bin
>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>> but it it will be available soon I believe.
>>>>>> --
>>>>>>
>>>>>> Thanks
>>>>>> -- Ben Kim
>>>>>>
>>>>>>
>>>>>>
>>>>> Hi Ben,
>>>>>
>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>> .config back
>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>> bzImage and
>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>
>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>> could get some more info, and discovered I also have to delete
>>>>> this line
>>>>> or it will match the ath first:
>>>>>
>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>
>>>>> So then I saw
>>>>>
>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>> ehci-pci
>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>> ehci-pci
>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>> idProduct=3004
>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>> SerialNumber=0
>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>> [    1.350462] BT Device Info 0
>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>> [    1.350466] In Rome Block
>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>> /devices/platform/i8042/serio1/input/input10
>>>>> [    1.350671] hci0
>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>> idProduct=ff00
>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>> SerialNumber=1
>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>
>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>> BTUSB_QCA_ROME) "
>>>>> and you can see where that error comes from.
>>>>>
>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>> following to qca_device_info
>>>>>
>>>>>        { 0x00000200, 28, 4, 18 },
>>>>>
>>>>> and now I get;
>>>>>
>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>> [    1.357943] BT Device Info 0
>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>> [    1.357946] In Rome Block
>>>>> [    1.358113] hci0
>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>
>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>> those
>>>>> the right numbers for the device_info block?
>>>>>
>>>>> Sumit
>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>> I have it installed right. Is this correct:
>>>>
>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>> total 60
>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>
>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>
>>> You did right thing. I cannot understand why driver couldn't access
>>> firmware file which is in /lib/firmware/qca. Did you check each
>>> folder has right permission to access?
>>>
>>> Thanks
>>> -- Ben Kim
>>>
>>
>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>> module and it loads the firmware! :)
>>
>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>> [  108.599733] usbcore: registered new interface driver btusb
>> [  108.599769] hci0
>> [  108.602907] Bluetooth: hci0: using rampatch file:
>> qca/rampatch_usb_00000200.bin
>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>> firmware rome 0x200 build 0x111
>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>
>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>
>> sudo rfkill list
>> 0: msi-bluetooth: Bluetooth
>>    Soft blocked: no
>>    Hard blocked: no
>> 1: msi-wlan: Wireless LAN
>>    Soft blocked: no
>>    Hard blocked: no
>> 2: hci0: Bluetooth
>>    Soft blocked: no
>>    Hard blocked: no
>> 3: phy0: Wireless LAN
>>    Soft blocked: no
>>    Hard blocked: no
>>
>> Sumit
>>
>>
>>
>> However, upon attempting to turn on bluetooth, either via the blueman
>> applet or the bluetoothctl command line like so:
>>
>> bluetoothctl
>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>> [bluetooth]# select 2C:33:7A:00:05:DA
>> [bluetooth]# power on
>> Failed to set power on: org.bluez.Error.Failed
>> [bluetooth]#
>>
>> I get the following kernel error:
>>
>> [ 1172.484075] hci0
>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>
>
> Why does it try to load firmware again since it is already done on
> previous logs. I haven't used bluetoothctrl command. Can you follow up
> this step?
>
> 1. Make sure to load firmware files on the kernel message
>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>> firmware rome 0x200 build 0x111
>
> 2. # hciattach hci0 up
> 3. # hcitool inq
>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> <mailto:majordomo@vger.kernel.org>
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> Thanks
> --Ben Kim

Oh I rebooted; so this is a fresh log. As far as I can tell, it only
tries to load the firmware once.

Huh, odd. When I try to use hcitool, it can't find hci0:

# hciattach hci0 up
Unknown device type or id
# hcitool inq
Inquiring ...
Inquiry failed.: No such device
# hcitool dev
Devices:

Here's a pastbin or my current dmesg:
https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
modprobe btusb)

Sumit


[-- Attachment #2: Type: text/html, Size: 123587 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18  2:53                       ` Kim, Ben Young Tae
  2015-06-18  3:01                         ` Sumit's Mailing Lists
@ 2015-06-18  3:02                         ` Sumit's Mailing Lists
  2015-06-18  5:53                           ` Kim, Ben Young Tae
  1 sibling, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-18  3:02 UTC (permalink / raw)
  To: Kim, Ben Young Tae; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

On 18/06/15 10:53, Kim, Ben Young Tae wrote:
> Hi Sumit,
>
> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>
>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>> Hi Sumit,
>>>
>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>> Hi Sumit,
>>>>>>
>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>> Hi Sumit,
>>>>>>>>
>>>>>>>>
>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>> Hi Smuit,
>>>>>>>>>>
>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>> following
>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>
>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>
>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>> the devices.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards
>>>>>>>>>>>>
>>>>>>>>>>>> Marcel
>>>>>>>>>>>>
>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>> ath3k (also
>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>
>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>> Driver=(none)
>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>
>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>
>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>> much about this.
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>>
>>>>>>>>>> Marcel
>>>>>>>>>>
>>>>>>>>> Marcel,
>>>>>>>>>
>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>> hasn't been released yet?
>>>>>>>>>
>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>> scripts to
>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>> (mentioned in
>>>>>>>>> here
>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>> typically
>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>
>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>
>>>>>>>> Hi Rick,
>>>>>>>>
>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>
>>>>>>>>> Sumit
>>>>>>>>> --
>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>> linux-bluetooth" in
>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>> Thanks
>>>>>>>> -- Ben Kim
>>>>>>>>
>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>> Australia. Is
>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>
>>>>>>> Sumit
>>>>>>> --
>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>> linux-bluetooth" in
>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>
>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>> be addressed on your setup?
>>>>>>
>>>>>> --
>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>
>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>> ...
>>>>>>    /* QCA ROME chipset */
>>>>>>    { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>    { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>    { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>> // <-- add new VID/PID here
>>>>>> ...
>>>>>>
>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>> - nvm_usb_00000200.bin
>>>>>> - rampatch_usb_00000200.bin
>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>> but it it will be available soon I believe.
>>>>>> --
>>>>>>
>>>>>> Thanks
>>>>>> -- Ben Kim
>>>>>>
>>>>>>
>>>>>>
>>>>> Hi Ben,
>>>>>
>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>> .config back
>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>> bzImage and
>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>
>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>> could get some more info, and discovered I also have to delete
>>>>> this line
>>>>> or it will match the ath first:
>>>>>
>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>
>>>>> So then I saw
>>>>>
>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>> ehci-pci
>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>> ehci-pci
>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>> idProduct=3004
>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>> SerialNumber=0
>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>> [    1.350462] BT Device Info 0
>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>> [    1.350466] In Rome Block
>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>> /devices/platform/i8042/serio1/input/input10
>>>>> [    1.350671] hci0
>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>> idProduct=ff00
>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>> SerialNumber=1
>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>
>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>> BTUSB_QCA_ROME) "
>>>>> and you can see where that error comes from.
>>>>>
>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>> following to qca_device_info
>>>>>
>>>>>        { 0x00000200, 28, 4, 18 },
>>>>>
>>>>> and now I get;
>>>>>
>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>> [    1.357943] BT Device Info 0
>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>> [    1.357946] In Rome Block
>>>>> [    1.358113] hci0
>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>
>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>> those
>>>>> the right numbers for the device_info block?
>>>>>
>>>>> Sumit
>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>> I have it installed right. Is this correct:
>>>>
>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>> total 60
>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>
>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>
>>> You did right thing. I cannot understand why driver couldn't access
>>> firmware file which is in /lib/firmware/qca. Did you check each
>>> folder has right permission to access?
>>>
>>> Thanks
>>> -- Ben Kim
>>>
>>
>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>> module and it loads the firmware! :)
>>
>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>> [  108.599733] usbcore: registered new interface driver btusb
>> [  108.599769] hci0
>> [  108.602907] Bluetooth: hci0: using rampatch file:
>> qca/rampatch_usb_00000200.bin
>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>> firmware rome 0x200 build 0x111
>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>
>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>
>> sudo rfkill list
>> 0: msi-bluetooth: Bluetooth
>>    Soft blocked: no
>>    Hard blocked: no
>> 1: msi-wlan: Wireless LAN
>>    Soft blocked: no
>>    Hard blocked: no
>> 2: hci0: Bluetooth
>>    Soft blocked: no
>>    Hard blocked: no
>> 3: phy0: Wireless LAN
>>    Soft blocked: no
>>    Hard blocked: no
>>
>> Sumit
>>
>>
>>
>> However, upon attempting to turn on bluetooth, either via the blueman
>> applet or the bluetoothctl command line like so:
>>
>> bluetoothctl
>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>> [bluetooth]# select 2C:33:7A:00:05:DA
>> [bluetooth]# power on
>> Failed to set power on: org.bluez.Error.Failed
>> [bluetooth]#
>>
>> I get the following kernel error:
>>
>> [ 1172.484075] hci0
>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>
>
> Why does it try to load firmware again since it is already done on
> previous logs. I haven't used bluetoothctrl command. Can you follow up
> this step?
>
> 1. Make sure to load firmware files on the kernel message
>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>> firmware rome 0x200 build 0x111
>
> 2. # hciattach hci0 up
> 3. # hcitool inq
>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> <mailto:majordomo@vger.kernel.org>
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> Thanks
> --Ben Kim

Oh I rebooted; so this is a fresh log. As far as I can tell, it only
tries to load the firmware once.

Huh, odd. When I try to use hcitool, it can't find hci0:

# hciattach hci0 up
Unknown device type or id
# hcitool inq
Inquiring ...
Inquiry failed.: No such device
# hcitool dev
Devices:

Here's a pastbin or my current dmesg:
https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
modprobe btusb)

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18  3:02                         ` Sumit's Mailing Lists
@ 2015-06-18  5:53                           ` Kim, Ben Young Tae
  2015-06-18  8:45                             ` Sumit's Mailing Lists
  0 siblings, 1 reply; 29+ messages in thread
From: Kim, Ben Young Tae @ 2015-06-18  5:53 UTC (permalink / raw)
  To: Sumit's Mailing Lists; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

Hi Sumit,

> On Jun 17, 2015, at 8:03 PM, Sumit's Mailing Lists <lists@battlepenguin.com> wrote:
> 
>> On 18/06/15 10:53, Kim, Ben Young Tae wrote:
>> Hi Sumit,
>> 
>> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
>> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>> 
>>>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>>> Hi Sumit,
>>>> 
>>>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>>> Hi Sumit,
>>>>>>> 
>>>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>>> Hi Sumit,
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>>> Hi Smuit,
>>>>>>>>>>> 
>>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>>> following
>>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>>> the devices.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Regards
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Marcel
>>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>>> ath3k (also
>>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>> 
>>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>> 
>>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>> 
>>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>>> much about this.
>>>>>>>>>>> 
>>>>>>>>>>> Regards
>>>>>>>>>>> 
>>>>>>>>>>> Marcel
>>>>>>>>>> Marcel,
>>>>>>>>>> 
>>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>>> hasn't been released yet?
>>>>>>>>>> 
>>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>>> scripts to
>>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>>> (mentioned in
>>>>>>>>>> here
>>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>>> typically
>>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>> 
>>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>> 
>>>>>>>>> Hi Rick,
>>>>>>>>> 
>>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>> 
>>>>>>>>>> Sumit
>>>>>>>>>> --
>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>> Thanks
>>>>>>>>> -- Ben Kim
>>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>>> Australia. Is
>>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>> 
>>>>>>>> Sumit
>>>>>>>> --
>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>> linux-bluetooth" in
>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>> 
>>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>>> be addressed on your setup?
>>>>>>> 
>>>>>>> --
>>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>> 
>>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>>> ...
>>>>>>>   /* QCA ROME chipset */
>>>>>>>   { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>>   { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>>   { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>>> // <-- add new VID/PID here
>>>>>>> ...
>>>>>>> 
>>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>>> - nvm_usb_00000200.bin
>>>>>>> - rampatch_usb_00000200.bin
>>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>>> but it it will be available soon I believe.
>>>>>>> --
>>>>>>> 
>>>>>>> Thanks
>>>>>>> -- Ben Kim
>>>>>> Hi Ben,
>>>>>> 
>>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>>> .config back
>>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>>> bzImage and
>>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>> 
>>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>>> could get some more info, and discovered I also have to delete
>>>>>> this line
>>>>>> or it will match the ath first:
>>>>>> 
>>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>> 
>>>>>> So then I saw
>>>>>> 
>>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>>> ehci-pci
>>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>>> ehci-pci
>>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>>> idProduct=3004
>>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>>> SerialNumber=0
>>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>>> [    1.350462] BT Device Info 0
>>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>>> [    1.350466] In Rome Block
>>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>>> /devices/platform/i8042/serio1/input/input10
>>>>>> [    1.350671] hci0
>>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>>> idProduct=ff00
>>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>>> SerialNumber=1
>>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>> 
>>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>>> BTUSB_QCA_ROME) "
>>>>>> and you can see where that error comes from.
>>>>>> 
>>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>>> following to qca_device_info
>>>>>> 
>>>>>>       { 0x00000200, 28, 4, 18 },
>>>>>> 
>>>>>> and now I get;
>>>>>> 
>>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>>> [    1.357943] BT Device Info 0
>>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>>> [    1.357946] In Rome Block
>>>>>> [    1.358113] hci0
>>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>> 
>>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>>> those
>>>>>> the right numbers for the device_info block?
>>>>>> 
>>>>>> Sumit
>>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>>> I have it installed right. Is this correct:
>>>>> 
>>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>>> total 60
>>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>> 
>>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>> You did right thing. I cannot understand why driver couldn't access
>>>> firmware file which is in /lib/firmware/qca. Did you check each
>>>> folder has right permission to access?
>>>> 
>>>> Thanks
>>>> -- Ben Kim
>>> 
>>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>>> module and it loads the firmware! :)
>>> 
>>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>>> [  108.599733] usbcore: registered new interface driver btusb
>>> [  108.599769] hci0
>>> [  108.602907] Bluetooth: hci0: using rampatch file:
>>> qca/rampatch_usb_00000200.bin
>>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>> firmware rome 0x200 build 0x111
>>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>> 
>>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>> 
>>> sudo rfkill list
>>> 0: msi-bluetooth: Bluetooth
>>>   Soft blocked: no
>>>   Hard blocked: no
>>> 1: msi-wlan: Wireless LAN
>>>   Soft blocked: no
>>>   Hard blocked: no
>>> 2: hci0: Bluetooth
>>>   Soft blocked: no
>>>   Hard blocked: no
>>> 3: phy0: Wireless LAN
>>>   Soft blocked: no
>>>   Hard blocked: no
>>> 
>>> Sumit
>>> 
>>> 
>>> 
>>> However, upon attempting to turn on bluetooth, either via the blueman
>>> applet or the bluetoothctl command line like so:
>>> 
>>> bluetoothctl
>>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>>> [bluetooth]# select 2C:33:7A:00:05:DA
>>> [bluetooth]# power on
>>> Failed to set power on: org.bluez.Error.Failed
>>> [bluetooth]#
>>> 
>>> I get the following kernel error:
>>> 
>>> [ 1172.484075] hci0
>>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>> 
>> Why does it try to load firmware again since it is already done on
>> previous logs. I haven't used bluetoothctrl command. Can you follow up
>> this step?
>> 
>> 1. Make sure to load firmware files on the kernel message
>>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>> firmware rome 0x200 build 0x111
>> 
>> 2. # hciattach hci0 up
>> 3. # hcitool inq
>> 
>>> 
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe
>>> linux-bluetooth" in
>>> the body of a message to majordomo@vger.kernel.org
>>> <mailto:majordomo@vger.kernel.org>
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
>> Thanks
>> --Ben Kim
> 
> Oh I rebooted; so this is a fresh log. As far as I can tell, it only
> tries to load the firmware once.
> 
> Huh, odd. When I try to use hcitool, it can't find hci0:
> 
> # hciattach hci0 up
> Unknown device type or id
> # hcitool inq
> Inquiring ...
> Inquiry failed.: No such device
> # hcitool dev
> Devices:
> 
> Here's a pastbin or my current dmesg:
> https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
> modprobe btusb)
> 
> Sumit

Did you load btusb module on manual? Looks like kernel was going to detect the card and loaded on boot step and you did to load driver again then it failed.

Can you just reboot the PC and see fw is downloaded on the boot and run my sequences on root permission?

Thanks
-- Ben Kim

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18  5:53                           ` Kim, Ben Young Tae
@ 2015-06-18  8:45                             ` Sumit's Mailing Lists
  2015-06-18 10:09                               ` Huang, Rick
  0 siblings, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-18  8:45 UTC (permalink / raw)
  To: Kim, Ben Young Tae; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

On 18/06/15 13:53, Kim, Ben Young Tae wrote:
> Hi Sumit,
>
>> On Jun 17, 2015, at 8:03 PM, Sumit's Mailing Lists <lists@battlepenguin.com> wrote:
>>
>>> On 18/06/15 10:53, Kim, Ben Young Tae wrote:
>>> Hi Sumit,
>>>
>>> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
>>> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>>>
>>>>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>>>> Hi Sumit,
>>>>>
>>>>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>>>> Hi Sumit,
>>>>>>>>
>>>>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>>>> Hi Sumit,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>>>> Hi Smuit,
>>>>>>>>>>>>
>>>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>>>> following
>>>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>>>> the devices.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>>>> ath3k (also
>>>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>>>
>>>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>
>>>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>>>
>>>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>>>> much about this.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards
>>>>>>>>>>>>
>>>>>>>>>>>> Marcel
>>>>>>>>>>> Marcel,
>>>>>>>>>>>
>>>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>>>> hasn't been released yet?
>>>>>>>>>>>
>>>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>>>> scripts to
>>>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>>>> (mentioned in
>>>>>>>>>>> here
>>>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>>>> typically
>>>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>>>
>>>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>>>
>>>>>>>>>> Hi Rick,
>>>>>>>>>>
>>>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>>>
>>>>>>>>>>> Sumit
>>>>>>>>>>> --
>>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>>> Thanks
>>>>>>>>>> -- Ben Kim
>>>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>>>> Australia. Is
>>>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>>>
>>>>>>>>> Sumit
>>>>>>>>> --
>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>> linux-bluetooth" in
>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>>>
>>>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>>>> be addressed on your setup?
>>>>>>>>
>>>>>>>> --
>>>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>>>
>>>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>>>> ...
>>>>>>>>   /* QCA ROME chipset */
>>>>>>>>   { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>   { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>   { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>>>> // <-- add new VID/PID here
>>>>>>>> ...
>>>>>>>>
>>>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>>>> - nvm_usb_00000200.bin
>>>>>>>> - rampatch_usb_00000200.bin
>>>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>>>> but it it will be available soon I believe.
>>>>>>>> --
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> -- Ben Kim
>>>>>>> Hi Ben,
>>>>>>>
>>>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>>>> .config back
>>>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>>>> bzImage and
>>>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>>>
>>>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>>>> could get some more info, and discovered I also have to delete
>>>>>>> this line
>>>>>>> or it will match the ath first:
>>>>>>>
>>>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>>>
>>>>>>> So then I saw
>>>>>>>
>>>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>>>> ehci-pci
>>>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>>>> ehci-pci
>>>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>>>> idProduct=3004
>>>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>>>> SerialNumber=0
>>>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>>>> [    1.350462] BT Device Info 0
>>>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>>>> [    1.350466] In Rome Block
>>>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>>>> /devices/platform/i8042/serio1/input/input10
>>>>>>> [    1.350671] hci0
>>>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>>>> idProduct=ff00
>>>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>>>> SerialNumber=1
>>>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>>>
>>>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>>>> BTUSB_QCA_ROME) "
>>>>>>> and you can see where that error comes from.
>>>>>>>
>>>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>>>> following to qca_device_info
>>>>>>>
>>>>>>>       { 0x00000200, 28, 4, 18 },
>>>>>>>
>>>>>>> and now I get;
>>>>>>>
>>>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>>>> [    1.357943] BT Device Info 0
>>>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>>>> [    1.357946] In Rome Block
>>>>>>> [    1.358113] hci0
>>>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>>>
>>>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>>>> those
>>>>>>> the right numbers for the device_info block?
>>>>>>>
>>>>>>> Sumit
>>>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>>>> I have it installed right. Is this correct:
>>>>>>
>>>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>>>> total 60
>>>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>>>
>>>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>> You did right thing. I cannot understand why driver couldn't access
>>>>> firmware file which is in /lib/firmware/qca. Did you check each
>>>>> folder has right permission to access?
>>>>>
>>>>> Thanks
>>>>> -- Ben Kim
>>>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>>>> module and it loads the firmware! :)
>>>>
>>>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>>>> [  108.599733] usbcore: registered new interface driver btusb
>>>> [  108.599769] hci0
>>>> [  108.602907] Bluetooth: hci0: using rampatch file:
>>>> qca/rampatch_usb_00000200.bin
>>>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>> firmware rome 0x200 build 0x111
>>>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>>>
>>>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>>>
>>>> sudo rfkill list
>>>> 0: msi-bluetooth: Bluetooth
>>>>   Soft blocked: no
>>>>   Hard blocked: no
>>>> 1: msi-wlan: Wireless LAN
>>>>   Soft blocked: no
>>>>   Hard blocked: no
>>>> 2: hci0: Bluetooth
>>>>   Soft blocked: no
>>>>   Hard blocked: no
>>>> 3: phy0: Wireless LAN
>>>>   Soft blocked: no
>>>>   Hard blocked: no
>>>>
>>>> Sumit
>>>>
>>>>
>>>>
>>>> However, upon attempting to turn on bluetooth, either via the blueman
>>>> applet or the bluetoothctl command line like so:
>>>>
>>>> bluetoothctl
>>>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>>>> [bluetooth]# select 2C:33:7A:00:05:DA
>>>> [bluetooth]# power on
>>>> Failed to set power on: org.bluez.Error.Failed
>>>> [bluetooth]#
>>>>
>>>> I get the following kernel error:
>>>>
>>>> [ 1172.484075] hci0
>>>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>> Why does it try to load firmware again since it is already done on
>>> previous logs. I haven't used bluetoothctrl command. Can you follow up
>>> this step?
>>>
>>> 1. Make sure to load firmware files on the kernel message
>>>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>> firmware rome 0x200 build 0x111
>>> 2. # hciattach hci0 up
>>> 3. # hcitool inq
>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe
>>>> linux-bluetooth" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> <mailto:majordomo@vger.kernel.org>
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> Thanks
>>> --Ben Kim
>> Oh I rebooted; so this is a fresh log. As far as I can tell, it only
>> tries to load the firmware once.
>>
>> Huh, odd. When I try to use hcitool, it can't find hci0:
>>
>> # hciattach hci0 up
>> Unknown device type or id
>> # hcitool inq
>> Inquiring ...
>> Inquiry failed.: No such device
>> # hcitool dev
>> Devices:
>>
>> Here's a pastbin or my current dmesg:
>> https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
>> modprobe btusb)
>>
>> Sumit
> Did you load btusb module on manual? Looks like kernel was going to detect the card and loaded on boot step and you did to load driver again then it failed.
>
> Can you just reboot the PC and see fw is downloaded on the boot and run my sequences on root permission?
>
> Thanks
> -- Ben Kim

Ah yes; not sure what happened last time. On a fresh reboot it autoloads
btusb. But I still get this:

[root] # hciattach hci0 up
Unknown device type or id
[root] # hcitool inq
Inquiring ...
Inquiry failed.: No such device
[root] #

Nothing in my dmesg when I run those commands either. But once again, if
I try using "power on" in bluetoothctl, I see the following:

[  244.655087] hci0
[  244.655096] Bluetooth: hci0: Failed to access otp area (-108)

Latest dmesg: https://bpaste.net/show/8204c1f5e384

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* RE: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18  8:45                             ` Sumit's Mailing Lists
@ 2015-06-18 10:09                               ` Huang, Rick
  0 siblings, 0 replies; 29+ messages in thread
From: Huang, Rick @ 2015-06-18 10:09 UTC (permalink / raw)
  To: Sumit's Mailing Lists, Kim, Ben Young Tae
  Cc: Marcel Holtmann, linux-bluetooth

Hi Ben,

>>Is there any other way to detect AR/ROME chips sharing with same VID/PID except sending command to controller even though they're reporting same PID?

I compared the AR and ROME chip's USB descriptions but no difference between them. 
So, I think if they use the same VID/PIV, we have to send VSC command to know the chip is AR or ROME chip.

Thanks
Rick

-----Original Message-----
From: Sumit's Mailing Lists [mailto:lists@battlepenguin.com] 
Sent: Thursday, June 18, 2015 4:46 PM
To: Kim, Ben Young Tae
Cc: Marcel Holtmann; Huang, Rick; linux-bluetooth@vger.kernel.org
Subject: Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0

On 18/06/15 13:53, Kim, Ben Young Tae wrote:
> Hi Sumit,
>
>> On Jun 17, 2015, at 8:03 PM, Sumit's Mailing Lists <lists@battlepenguin.com> wrote:
>>
>>> On 18/06/15 10:53, Kim, Ben Young Tae wrote:
>>> Hi Sumit,
>>>
>>> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists 
>>> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>>>
>>>>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>>>> Hi Sumit,
>>>>>
>>>>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>>>> Hi Sumit,
>>>>>>>>
>>>>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>>>> Hi Sumit,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>>>> Hi Smuit,
>>>>>>>>>>>>
>>>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains 
>>>>>>>>>>>>>>> the following Bluetooth controller (from lsusb):
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, 
>>>>>>>>>>>>>>> Inc. AR3012 Bluetooth 4.0
>>>>>>>>>>>>>> assuming that the firmware is present, this is most 
>>>>>>>>>>>>>> likely just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, 
>>>>>>>>>>>>>>> Inc. AR3012 Bluetooth 4.0 Device Descriptor:
>>>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output 
>>>>>>>>>>>>>> for the devices.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for 
>>>>>>>>>>>>> my ath3k (also added it to the kernel bugzilla):
>>>>>>>>>>>>>
>>>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>
>>>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>>>
>>>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for 
>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2 [  
>>>>>>>>>>>>> 762.729373] Bluetooth: Patch file not found 
>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu [  762.729374] Bluetooth: 
>>>>>>>>>>>>> Loading patch file failed [  762.729381] ath3k: probe of 
>>>>>>>>>>>>> 3-1.3:1.0 failed with error -2 [  762.729411] usbcore: 
>>>>>>>>>>>>> registered new interface driver ath3k
>>>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However 
>>>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do 
>>>>>>>>>>>> much about this.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards
>>>>>>>>>>>>
>>>>>>>>>>>> Marcel
>>>>>>>>>>> Marcel,
>>>>>>>>>>>
>>>>>>>>>>> So it's pulling the right firmware file for my device, but 
>>>>>>>>>>> It just hasn't been released yet?
>>>>>>>>>>>
>>>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python 
>>>>>>>>>>> scripts to extract the firmware binaries from the Windows 
>>>>>>>>>>> drivers (mentioned in here 
>>>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184
>>>>>>>>>>> ). Has anyone done that before with the bluetooth firmware, 
>>>>>>>>>>> or do you typically just wait for atheros/qualcom to release 
>>>>>>>>>>> official ones?
>>>>>>>>>> Where did you get your atheros board/card since I couldn't 
>>>>>>>>>> find that board here. Is it a laptop? The BT firmware driver 
>>>>>>>>>> was trying to load AthrBT_0x00000200.dfu file and it got 
>>>>>>>>>> failed because no firmware file was present. But 0x00000200 
>>>>>>>>>> means fw_version.rom_version which coming from controller 
>>>>>>>>>> chip, however, I haven't seen this version on Atheros chipset.
>>>>>>>>>>
>>>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>>>
>>>>>>>>>> Hi Rick,
>>>>>>>>>>
>>>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>>>
>>>>>>>>>>> Sumit
>>>>>>>>>>> --
>>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe 
>>>>>>>>>>> linux-bluetooth" in the body of a message to 
>>>>>>>>>>> majordomo@vger.kernel.org <mailto:majordomo@vger.kernel.org>
>>>>>>>>>>> More majordomo info at  
>>>>>>>>>>> http://vger.kernel.org/majordomo-info.html
>>>>>>>>>> Thanks
>>>>>>>>>> -- Ben Kim
>>>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in 
>>>>>>>>> Australia. Is there any other debugging information I need to 
>>>>>>>>> pull for you?
>>>>>>>>>
>>>>>>>>> Sumit
>>>>>>>>> --
>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe 
>>>>>>>>> linux-bluetooth" in the body of a message to 
>>>>>>>>> majordomo@vger.kernel.org <mailto:majordomo@vger.kernel.org>
>>>>>>>>> More majordomo info at  
>>>>>>>>> http://vger.kernel.org/majordomo-info.html
>>>>>>>> According to my colleague, it is not AR chip but QCA ROME core 
>>>>>>>> inside even though they're sharing same VID/PID with AR/QCA 
>>>>>>>> ROME(version 2). That's why you cannot bring up your card with 
>>>>>>>> ath3k driver. I knew it was not a good idea as it was early 
>>>>>>>> stage to develop the card so that next version of ROME USB 
>>>>>>>> card(v3.0 or
>>>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>>>
>>>>>>>> Can you follow up these instructions to see whether or not it 
>>>>>>>> can be addressed on your setup?
>>>>>>>>
>>>>>>>> --
>>>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>>>
>>>>>>>> static const struct usb_device_id blacklist_table[] = { ...
>>>>>>>>   /* QCA ROME chipset */
>>>>>>>>   { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>   { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>   { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME 
>>>>>>>> }, // <-- add new VID/PID here ...
>>>>>>>>
>>>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>>>> - nvm_usb_00000200.bin
>>>>>>>> - rampatch_usb_00000200.bin
>>>>>>>> Those FW files won't be available on linux-firmware.git til 
>>>>>>>> today but it it will be available soon I believe.
>>>>>>>> --
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> -- Ben Kim
>>>>>>> Hi Ben,
>>>>>>>
>>>>>>> I added that line to my btusb.c; did a mrpropery, copied my 
>>>>>>> .config back into the source tree, disabled ATH3K in menucofnig, 
>>>>>>> made the bzImage and rebooted. The firmware you attached is in 
>>>>>>> /lib/firmware/qca.
>>>>>>>
>>>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) 
>>>>>>> so I could get some more info, and discovered I also have to 
>>>>>>> delete this line or it will match the ath first:
>>>>>>>
>>>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>>>
>>>>>>> So then I saw
>>>>>>>
>>>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>>>> ehci-pci
>>>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>>>> ehci-pci
>>>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>>>> idProduct=3004
>>>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>>>> SerialNumber=0
>>>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>>>> [    1.350462] BT Device Info 0
>>>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>>>> [    1.350466] In Rome Block
>>>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>>>> /devices/platform/i8042/serio1/input/input10
>>>>>>> [    1.350671] hci0
>>>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>>>> idProduct=ff00
>>>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>>>> SerialNumber=1
>>>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>>>
>>>>>>> So those BT Device Info statements I added in the probe 
>>>>>>> function. "In Rome Block" I added right after "if 
>>>>>>> (id->driver_info &
>>>>>>> BTUSB_QCA_ROME) "
>>>>>>> and you can see where that error comes from.
>>>>>>>
>>>>>>> And that comes from...oh it checks another table...okay so I 
>>>>>>> added the following to qca_device_info
>>>>>>>
>>>>>>>       { 0x00000200, 28, 4, 18 },
>>>>>>>
>>>>>>> and now I get;
>>>>>>>
>>>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>>>> [    1.357943] BT Device Info 0
>>>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>>>> [    1.357946] In Rome Block
>>>>>>> [    1.358113] hci0
>>>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>>>
>>>>>>> So progress. It's attempting to load the firmware and failing. 
>>>>>>> Are those the right numbers for the device_info block?
>>>>>>>
>>>>>>> Sumit
>>>>>> Just remembered -2 is when it can't even find the firmware. But I 
>>>>>> think I have it installed right. Is this correct:
>>>>>>
>>>>>> catelyn linux # ls /lib/firmware/qca/ -l total 60
>>>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 
>>>>>> rampatch_usb_00000200.bin
>>>>>>
>>>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>> You did right thing. I cannot understand why driver couldn't 
>>>>> access firmware file which is in /lib/firmware/qca. Did you check 
>>>>> each folder has right permission to access?
>>>>>
>>>>> Thanks
>>>>> -- Ben Kim
>>>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a 
>>>> module and it loads the firmware! :)
>>>>
>>>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50 [  
>>>> 108.599733] usbcore: registered new interface driver btusb [  
>>>> 108.599769] hci0 [  108.602907] Bluetooth: hci0: using rampatch 
>>>> file:
>>>> qca/rampatch_usb_00000200.bin
>>>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299, 
>>>> firmware rome 0x200 build 0x111 [  108.658716] Bluetooth: hci0: 
>>>> using NVM file: qca/nvm_usb_00000200.bin
>>>>
>>>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>>>
>>>> sudo rfkill list
>>>> 0: msi-bluetooth: Bluetooth
>>>>   Soft blocked: no
>>>>   Hard blocked: no
>>>> 1: msi-wlan: Wireless LAN
>>>>   Soft blocked: no
>>>>   Hard blocked: no
>>>> 2: hci0: Bluetooth
>>>>   Soft blocked: no
>>>>   Hard blocked: no
>>>> 3: phy0: Wireless LAN
>>>>   Soft blocked: no
>>>>   Hard blocked: no
>>>>
>>>> Sumit
>>>>
>>>>
>>>>
>>>> However, upon attempting to turn on bluetooth, either via the 
>>>> blueman applet or the bluetoothctl command line like so:
>>>>
>>>> bluetoothctl
>>>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default] 
>>>> [bluetooth]# select 2C:33:7A:00:05:DA [bluetooth]# power on Failed 
>>>> to set power on: org.bluez.Error.Failed [bluetooth]#
>>>>
>>>> I get the following kernel error:
>>>>
>>>> [ 1172.484075] hci0
>>>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>> Why does it try to load firmware again since it is already done on 
>>> previous logs. I haven't used bluetoothctrl command. Can you follow 
>>> up this step?
>>>
>>> 1. Make sure to load firmware files on the kernel message
>>>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299, firmware rome 
>>>> 0x200 build 0x111
>>> 2. # hciattach hci0 up
>>> 3. # hcitool inq
>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe 
>>>> linux-bluetooth" in the body of a message to 
>>>> majordomo@vger.kernel.org <mailto:majordomo@vger.kernel.org>
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> Thanks
>>> --Ben Kim
>> Oh I rebooted; so this is a fresh log. As far as I can tell, it only 
>> tries to load the firmware once.
>>
>> Huh, odd. When I try to use hcitool, it can't find hci0:
>>
>> # hciattach hci0 up
>> Unknown device type or id
>> # hcitool inq
>> Inquiring ...
>> Inquiry failed.: No such device
>> # hcitool dev
>> Devices:
>>
>> Here's a pastbin or my current dmesg:
>> https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I 
>> modprobe btusb)
>>
>> Sumit
> Did you load btusb module on manual? Looks like kernel was going to detect the card and loaded on boot step and you did to load driver again then it failed.
>
> Can you just reboot the PC and see fw is downloaded on the boot and run my sequences on root permission?
>
> Thanks
> -- Ben Kim

Ah yes; not sure what happened last time. On a fresh reboot it autoloads btusb. But I still get this:

[root] # hciattach hci0 up
Unknown device type or id
[root] # hcitool inq
Inquiring ...
Inquiry failed.: No such device
[root] #

Nothing in my dmesg when I run those commands either. But once again, if I try using "power on" in bluetoothctl, I see the following:

[  244.655087] hci0
[  244.655096] Bluetooth: hci0: Failed to access otp area (-108)

Latest dmesg: https://bpaste.net/show/8204c1f5e384

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18  3:01                         ` Sumit's Mailing Lists
@ 2015-06-18 16:00                           ` Ben Young Tae Kim
  2015-06-18 16:33                             ` Sumit's Mailing Lists
  0 siblings, 1 reply; 29+ messages in thread
From: Ben Young Tae Kim @ 2015-06-18 16:00 UTC (permalink / raw)
  To: Sumit's Mailing Lists; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

Hi Sumit,

On 06/17/15 20:01, Sumit's Mailing Lists wrote:
> On 18/06/15 10:53, Kim, Ben Young Tae wrote:
>> Hi Sumit,
>>
>> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
>> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>>
>>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>>> Hi Sumit,
>>>>
>>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>>> Hi Sumit,
>>>>>>>
>>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>>> Hi Sumit,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>>> Hi Smuit,
>>>>>>>>>>>
>>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>>> following
>>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>>
>>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>>> the devices.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>
>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>>
>>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>>> ath3k (also
>>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>>
>>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>
>>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>>
>>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>>> much about this.
>>>>>>>>>>>
>>>>>>>>>>> Regards
>>>>>>>>>>>
>>>>>>>>>>> Marcel
>>>>>>>>>>>
>>>>>>>>>> Marcel,
>>>>>>>>>>
>>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>>> hasn't been released yet?
>>>>>>>>>>
>>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>>> scripts to
>>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>>> (mentioned in
>>>>>>>>>> here
>>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>>> typically
>>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>>
>>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>>
>>>>>>>>> Hi Rick,
>>>>>>>>>
>>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>>
>>>>>>>>>> Sumit
>>>>>>>>>> --
>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>> Thanks
>>>>>>>>> -- Ben Kim
>>>>>>>>>
>>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>>> Australia. Is
>>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>>
>>>>>>>> Sumit
>>>>>>>> --
>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>> linux-bluetooth" in
>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>>
>>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>>> be addressed on your setup?
>>>>>>>
>>>>>>> --
>>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>>
>>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>>> ...
>>>>>>>    /* QCA ROME chipset */
>>>>>>>    { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>>    { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>>    { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>>> // <-- add new VID/PID here
>>>>>>> ...
>>>>>>>
>>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>>> - nvm_usb_00000200.bin
>>>>>>> - rampatch_usb_00000200.bin
>>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>>> but it it will be available soon I believe.
>>>>>>> --
>>>>>>>
>>>>>>> Thanks
>>>>>>> -- Ben Kim
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Hi Ben,
>>>>>>
>>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>>> .config back
>>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>>> bzImage and
>>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>>
>>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>>> could get some more info, and discovered I also have to delete
>>>>>> this line
>>>>>> or it will match the ath first:
>>>>>>
>>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>>
>>>>>> So then I saw
>>>>>>
>>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>>> ehci-pci
>>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>>> ehci-pci
>>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>>> idProduct=3004
>>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>>> SerialNumber=0
>>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>>> [    1.350462] BT Device Info 0
>>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>>> [    1.350466] In Rome Block
>>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>>> /devices/platform/i8042/serio1/input/input10
>>>>>> [    1.350671] hci0
>>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>>> idProduct=ff00
>>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>>> SerialNumber=1
>>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>>
>>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>>> BTUSB_QCA_ROME) "
>>>>>> and you can see where that error comes from.
>>>>>>
>>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>>> following to qca_device_info
>>>>>>
>>>>>>        { 0x00000200, 28, 4, 18 },
>>>>>>
>>>>>> and now I get;
>>>>>>
>>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>>> [    1.357943] BT Device Info 0
>>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>>> [    1.357946] In Rome Block
>>>>>> [    1.358113] hci0
>>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>>
>>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>>> those
>>>>>> the right numbers for the device_info block?
>>>>>>
>>>>>> Sumit
>>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>>> I have it installed right. Is this correct:
>>>>>
>>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>>> total 60
>>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>>
>>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>>
>>>> You did right thing. I cannot understand why driver couldn't access
>>>> firmware file which is in /lib/firmware/qca. Did you check each
>>>> folder has right permission to access?
>>>>
>>>> Thanks
>>>> -- Ben Kim
>>>>
>>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>>> module and it loads the firmware! :)
>>>
>>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>>> [  108.599733] usbcore: registered new interface driver btusb
>>> [  108.599769] hci0
>>> [  108.602907] Bluetooth: hci0: using rampatch file:
>>> qca/rampatch_usb_00000200.bin
>>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>> firmware rome 0x200 build 0x111
>>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>>
>>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>>
>>> sudo rfkill list
>>> 0: msi-bluetooth: Bluetooth
>>>    Soft blocked: no
>>>    Hard blocked: no
>>> 1: msi-wlan: Wireless LAN
>>>    Soft blocked: no
>>>    Hard blocked: no
>>> 2: hci0: Bluetooth
>>>    Soft blocked: no
>>>    Hard blocked: no
>>> 3: phy0: Wireless LAN
>>>    Soft blocked: no
>>>    Hard blocked: no
>>>
>>> Sumit
>>>
>>>
>>>
>>> However, upon attempting to turn on bluetooth, either via the blueman
>>> applet or the bluetoothctl command line like so:
>>>
>>> bluetoothctl
>>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>>> [bluetooth]# select 2C:33:7A:00:05:DA
>>> [bluetooth]# power on
>>> Failed to set power on: org.bluez.Error.Failed
>>> [bluetooth]#
>>>
>>> I get the following kernel error:
>>>
>>> [ 1172.484075] hci0
>>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>>
>> Why does it try to load firmware again since it is already done on
>> previous logs. I haven't used bluetoothctrl command. Can you follow up
>> this step?
>>
>> 1. Make sure to load firmware files on the kernel message
>>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>> firmware rome 0x200 build 0x111
>> 2. # hciattach hci0 up
>> 3. # hcitool inq
>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe
>>> linux-bluetooth" in
>>> the body of a message to majordomo@vger.kernel.org
>>> <mailto:majordomo@vger.kernel.org>
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Thanks
>> --Ben Kim
> Oh I rebooted; so this is a fresh log. As far as I can tell, it only
> tries to load the firmware once.
>
> Huh, odd. When I try to use hcitool, it can't find hci0:
>
> # hciattach hci0 up
> Unknown device type or id
> # hcitool inq
> Inquiring ...
> Inquiry failed.: No such device
> # hcitool dev
> Devices:
>
> Here's a pastbin or my current dmesg:
> https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
> modprobe btusb)
>
> Sumit
>
>

My bad. It was a typo. Please try this. It should work on your setup I believe.

# hciconfig hci0 up
# hcitool inq

Thanks
-- Ben Kim

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18 16:00                           ` Ben Young Tae Kim
@ 2015-06-18 16:33                             ` Sumit's Mailing Lists
  2015-06-18 16:37                               ` Ben Young Tae Kim
  0 siblings, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-18 16:33 UTC (permalink / raw)
  To: Ben Young Tae Kim; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

On 19/06/15 00:00, Ben Young Tae Kim wrote:
> Hi Sumit,
>
> On 06/17/15 20:01, Sumit's Mailing Lists wrote:
>> On 18/06/15 10:53, Kim, Ben Young Tae wrote:
>>> Hi Sumit,
>>>
>>> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
>>> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>>>
>>>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>>>> Hi Sumit,
>>>>>
>>>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>>>> Hi Sumit,
>>>>>>>>
>>>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>>>> Hi Sumit,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>>>> Hi Smuit,
>>>>>>>>>>>>
>>>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>>>> following
>>>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>>>> the devices.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>>>
>>>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>>>> ath3k (also
>>>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>>>
>>>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>
>>>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>>>
>>>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>>>> much about this.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards
>>>>>>>>>>>>
>>>>>>>>>>>> Marcel
>>>>>>>>>>>>
>>>>>>>>>>> Marcel,
>>>>>>>>>>>
>>>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>>>> hasn't been released yet?
>>>>>>>>>>>
>>>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>>>> scripts to
>>>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>>>> (mentioned in
>>>>>>>>>>> here
>>>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>>>> typically
>>>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>>>
>>>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>>>
>>>>>>>>>> Hi Rick,
>>>>>>>>>>
>>>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>>>
>>>>>>>>>>> Sumit
>>>>>>>>>>> --
>>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>>> Thanks
>>>>>>>>>> -- Ben Kim
>>>>>>>>>>
>>>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>>>> Australia. Is
>>>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>>>
>>>>>>>>> Sumit
>>>>>>>>> --
>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>> linux-bluetooth" in
>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>>>
>>>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>>>> be addressed on your setup?
>>>>>>>>
>>>>>>>> --
>>>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>>>
>>>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>>>> ...
>>>>>>>>    /* QCA ROME chipset */
>>>>>>>>    { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>    { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>    { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>>>> // <-- add new VID/PID here
>>>>>>>> ...
>>>>>>>>
>>>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>>>> - nvm_usb_00000200.bin
>>>>>>>> - rampatch_usb_00000200.bin
>>>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>>>> but it it will be available soon I believe.
>>>>>>>> --
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> -- Ben Kim
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> Hi Ben,
>>>>>>>
>>>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>>>> .config back
>>>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>>>> bzImage and
>>>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>>>
>>>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>>>> could get some more info, and discovered I also have to delete
>>>>>>> this line
>>>>>>> or it will match the ath first:
>>>>>>>
>>>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>>>
>>>>>>> So then I saw
>>>>>>>
>>>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>>>> ehci-pci
>>>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>>>> ehci-pci
>>>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>>>> idProduct=3004
>>>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>>>> SerialNumber=0
>>>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>>>> [    1.350462] BT Device Info 0
>>>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>>>> [    1.350466] In Rome Block
>>>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>>>> /devices/platform/i8042/serio1/input/input10
>>>>>>> [    1.350671] hci0
>>>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>>>> idProduct=ff00
>>>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>>>> SerialNumber=1
>>>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>>>
>>>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>>>> BTUSB_QCA_ROME) "
>>>>>>> and you can see where that error comes from.
>>>>>>>
>>>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>>>> following to qca_device_info
>>>>>>>
>>>>>>>        { 0x00000200, 28, 4, 18 },
>>>>>>>
>>>>>>> and now I get;
>>>>>>>
>>>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>>>> [    1.357943] BT Device Info 0
>>>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>>>> [    1.357946] In Rome Block
>>>>>>> [    1.358113] hci0
>>>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>>>
>>>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>>>> those
>>>>>>> the right numbers for the device_info block?
>>>>>>>
>>>>>>> Sumit
>>>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>>>> I have it installed right. Is this correct:
>>>>>>
>>>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>>>> total 60
>>>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>>>
>>>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>>>
>>>>> You did right thing. I cannot understand why driver couldn't access
>>>>> firmware file which is in /lib/firmware/qca. Did you check each
>>>>> folder has right permission to access?
>>>>>
>>>>> Thanks
>>>>> -- Ben Kim
>>>>>
>>>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>>>> module and it loads the firmware! :)
>>>>
>>>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>>>> [  108.599733] usbcore: registered new interface driver btusb
>>>> [  108.599769] hci0
>>>> [  108.602907] Bluetooth: hci0: using rampatch file:
>>>> qca/rampatch_usb_00000200.bin
>>>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>> firmware rome 0x200 build 0x111
>>>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>>>
>>>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>>>
>>>> sudo rfkill list
>>>> 0: msi-bluetooth: Bluetooth
>>>>    Soft blocked: no
>>>>    Hard blocked: no
>>>> 1: msi-wlan: Wireless LAN
>>>>    Soft blocked: no
>>>>    Hard blocked: no
>>>> 2: hci0: Bluetooth
>>>>    Soft blocked: no
>>>>    Hard blocked: no
>>>> 3: phy0: Wireless LAN
>>>>    Soft blocked: no
>>>>    Hard blocked: no
>>>>
>>>> Sumit
>>>>
>>>>
>>>>
>>>> However, upon attempting to turn on bluetooth, either via the blueman
>>>> applet or the bluetoothctl command line like so:
>>>>
>>>> bluetoothctl
>>>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>>>> [bluetooth]# select 2C:33:7A:00:05:DA
>>>> [bluetooth]# power on
>>>> Failed to set power on: org.bluez.Error.Failed
>>>> [bluetooth]#
>>>>
>>>> I get the following kernel error:
>>>>
>>>> [ 1172.484075] hci0
>>>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>>>
>>> Why does it try to load firmware again since it is already done on
>>> previous logs. I haven't used bluetoothctrl command. Can you follow up
>>> this step?
>>>
>>> 1. Make sure to load firmware files on the kernel message
>>>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>> firmware rome 0x200 build 0x111
>>> 2. # hciattach hci0 up
>>> 3. # hcitool inq
>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe
>>>> linux-bluetooth" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> <mailto:majordomo@vger.kernel.org>
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> Thanks
>>> --Ben Kim
>> Oh I rebooted; so this is a fresh log. As far as I can tell, it only
>> tries to load the firmware once.
>>
>> Huh, odd. When I try to use hcitool, it can't find hci0:
>>
>> # hciattach hci0 up
>> Unknown device type or id
>> # hcitool inq
>> Inquiring ...
>> Inquiry failed.: No such device
>> # hcitool dev
>> Devices:
>>
>> Here's a pastbin or my current dmesg:
>> https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
>> modprobe btusb)
>>
>> Sumit
>>
>>
> My bad. It was a typo. Please try this. It should work on your setup I believe.
>
> # hciconfig hci0 up
> # hcitool inq
>
> Thanks
> -- Ben Kim
>
Ben,

Still doesn't work, but "hciconfig hci0 up" gives me a different error
message:

[10041.915542] hci0
[10041.915549] Bluetooth: hci0: Failed to access otp area (-113)

Actually I just remembered where I've see otp before. So to get Wi-fi
working on this laptop, I had to the kvalo/ath fork on github and I had
to add the following to /etc/modprobe.d/ath10k.conf:

options ath10k_core skip_otp=y

That's why I'm still on the kvalo fork, so I can use my internal ath10k
wi-fi adapter. (There's a bug on the Ubuntu launchpad tracker where I
got that from).

So I'm a bit out of my league here. What is OTP?

Sumit
Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18 16:33                             ` Sumit's Mailing Lists
@ 2015-06-18 16:37                               ` Ben Young Tae Kim
  2015-06-19  5:04                                 ` Sumit's Mailing Lists
  2015-06-30 14:05                                 ` Sumit's Mailing Lists
  0 siblings, 2 replies; 29+ messages in thread
From: Ben Young Tae Kim @ 2015-06-18 16:37 UTC (permalink / raw)
  To: Sumit's Mailing Lists; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth



On 06/18/15 09:33, Sumit's Mailing Lists wrote:
> On 19/06/15 00:00, Ben Young Tae Kim wrote:
>> Hi Sumit,
>>
>> On 06/17/15 20:01, Sumit's Mailing Lists wrote:
>>> On 18/06/15 10:53, Kim, Ben Young Tae wrote:
>>>> Hi Sumit,
>>>>
>>>> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
>>>> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>>>>
>>>>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>>>>> Hi Sumit,
>>>>>>
>>>>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>>>>> Hi Sumit,
>>>>>>>>>
>>>>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>>>>> Hi Sumit,
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>>>>> Hi Smuit,
>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>>>>> following
>>>>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>>>>> the devices.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>>>>> ath3k (also
>>>>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>>>>> much about this.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>
>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>>
>>>>>>>>>>>> Marcel,
>>>>>>>>>>>>
>>>>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>>>>> hasn't been released yet?
>>>>>>>>>>>>
>>>>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>>>>> scripts to
>>>>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>>>>> (mentioned in
>>>>>>>>>>>> here
>>>>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>>>>> typically
>>>>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>>>>
>>>>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>>>>
>>>>>>>>>>> Hi Rick,
>>>>>>>>>>>
>>>>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>>>>
>>>>>>>>>>>> Sumit
>>>>>>>>>>>> --
>>>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>>>> Thanks
>>>>>>>>>>> -- Ben Kim
>>>>>>>>>>>
>>>>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>>>>> Australia. Is
>>>>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>>>>
>>>>>>>>>> Sumit
>>>>>>>>>> --
>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>>>>
>>>>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>>>>> be addressed on your setup?
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>>>>
>>>>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>>>>> ...
>>>>>>>>>    /* QCA ROME chipset */
>>>>>>>>>    { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>>    { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>>    { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>> // <-- add new VID/PID here
>>>>>>>>> ...
>>>>>>>>>
>>>>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>>>>> - nvm_usb_00000200.bin
>>>>>>>>> - rampatch_usb_00000200.bin
>>>>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>>>>> but it it will be available soon I believe.
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> -- Ben Kim
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Hi Ben,
>>>>>>>>
>>>>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>>>>> .config back
>>>>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>>>>> bzImage and
>>>>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>>>>
>>>>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>>>>> could get some more info, and discovered I also have to delete
>>>>>>>> this line
>>>>>>>> or it will match the ath first:
>>>>>>>>
>>>>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>>>>
>>>>>>>> So then I saw
>>>>>>>>
>>>>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>>>>> ehci-pci
>>>>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>>>>> ehci-pci
>>>>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>>>>> idProduct=3004
>>>>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>>>>> SerialNumber=0
>>>>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>>>>> [    1.350462] BT Device Info 0
>>>>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>>>>> [    1.350466] In Rome Block
>>>>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>>>>> /devices/platform/i8042/serio1/input/input10
>>>>>>>> [    1.350671] hci0
>>>>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>>>>> idProduct=ff00
>>>>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>>>>> SerialNumber=1
>>>>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>>>>
>>>>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>>>>> BTUSB_QCA_ROME) "
>>>>>>>> and you can see where that error comes from.
>>>>>>>>
>>>>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>>>>> following to qca_device_info
>>>>>>>>
>>>>>>>>        { 0x00000200, 28, 4, 18 },
>>>>>>>>
>>>>>>>> and now I get;
>>>>>>>>
>>>>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>>>>> [    1.357943] BT Device Info 0
>>>>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>>>>> [    1.357946] In Rome Block
>>>>>>>> [    1.358113] hci0
>>>>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>>>>
>>>>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>>>>> those
>>>>>>>> the right numbers for the device_info block?
>>>>>>>>
>>>>>>>> Sumit
>>>>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>>>>> I have it installed right. Is this correct:
>>>>>>>
>>>>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>>>>> total 60
>>>>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>>>>
>>>>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>>>>
>>>>>> You did right thing. I cannot understand why driver couldn't access
>>>>>> firmware file which is in /lib/firmware/qca. Did you check each
>>>>>> folder has right permission to access?
>>>>>>
>>>>>> Thanks
>>>>>> -- Ben Kim
>>>>>>
>>>>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>>>>> module and it loads the firmware! :)
>>>>>
>>>>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>>>>> [  108.599733] usbcore: registered new interface driver btusb
>>>>> [  108.599769] hci0
>>>>> [  108.602907] Bluetooth: hci0: using rampatch file:
>>>>> qca/rampatch_usb_00000200.bin
>>>>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>>> firmware rome 0x200 build 0x111
>>>>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>>>>
>>>>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>>>>
>>>>> sudo rfkill list
>>>>> 0: msi-bluetooth: Bluetooth
>>>>>    Soft blocked: no
>>>>>    Hard blocked: no
>>>>> 1: msi-wlan: Wireless LAN
>>>>>    Soft blocked: no
>>>>>    Hard blocked: no
>>>>> 2: hci0: Bluetooth
>>>>>    Soft blocked: no
>>>>>    Hard blocked: no
>>>>> 3: phy0: Wireless LAN
>>>>>    Soft blocked: no
>>>>>    Hard blocked: no
>>>>>
>>>>> Sumit
>>>>>
>>>>>
>>>>>
>>>>> However, upon attempting to turn on bluetooth, either via the blueman
>>>>> applet or the bluetoothctl command line like so:
>>>>>
>>>>> bluetoothctl
>>>>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>>>>> [bluetooth]# select 2C:33:7A:00:05:DA
>>>>> [bluetooth]# power on
>>>>> Failed to set power on: org.bluez.Error.Failed
>>>>> [bluetooth]#
>>>>>
>>>>> I get the following kernel error:
>>>>>
>>>>> [ 1172.484075] hci0
>>>>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>>>>
>>>> Why does it try to load firmware again since it is already done on
>>>> previous logs. I haven't used bluetoothctrl command. Can you follow up
>>>> this step?
>>>>
>>>> 1. Make sure to load firmware files on the kernel message
>>>>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>>> firmware rome 0x200 build 0x111
>>>> 2. # hciattach hci0 up
>>>> 3. # hcitool inq
>>>>
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>> linux-bluetooth" in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> <mailto:majordomo@vger.kernel.org>
>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> Thanks
>>>> --Ben Kim
>>> Oh I rebooted; so this is a fresh log. As far as I can tell, it only
>>> tries to load the firmware once.
>>>
>>> Huh, odd. When I try to use hcitool, it can't find hci0:
>>>
>>> # hciattach hci0 up
>>> Unknown device type or id
>>> # hcitool inq
>>> Inquiring ...
>>> Inquiry failed.: No such device
>>> # hcitool dev
>>> Devices:
>>>
>>> Here's a pastbin or my current dmesg:
>>> https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
>>> modprobe btusb)
>>>
>>> Sumit
>>>
>>>
>> My bad. It was a typo. Please try this. It should work on your setup I believe.
>>
>> # hciconfig hci0 up
>> # hcitool inq
>>
>> Thanks
>> -- Ben Kim
>>
> Ben,
>
> Still doesn't work, but "hciconfig hci0 up" gives me a different error
> message:
>
> [10041.915542] hci0
> [10041.915549] Bluetooth: hci0: Failed to access otp area (-113)
>
> Actually I just remembered where I've see otp before. So to get Wi-fi
> working on this laptop, I had to the kvalo/ath fork on github and I had
> to add the following to /etc/modprobe.d/ath10k.conf:
>
> options ath10k_core skip_otp=y
>
> That's why I'm still on the kvalo fork, so I can use my internal ath10k
> wi-fi adapter. (There's a bug on the Ubuntu launchpad tracker where I
> got that from).
>
> So I'm a bit out of my league here. What is OTP?
>
> Sumit
> Sumit

Hi Sumit,

[10041.915549] Bluetooth: hci0: Failed to access otp area (-113)

In the driver setup stage, it should communicate with controller to read rom HW / patch version inside. If you see this error, driver couldn't access controller through USB channel to read rom version.

[  108.602907] Bluetooth: hci0: using rampatch file:
qca/rampatch_usb_00000200.bin
[  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
firmware rome 0x200 build 0x111
[  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin


However, if you see those messages, it means you can read rom version first and patch download steps are completely done without any error so that controller is ready to do BT works. that's why I'm suggesting to trigger to install Bluetooth protocol into BlueZ driver using 'hciconfig hci0 up' command. 

Have you seen your error message of OTP area(-113) after patch download is done?

Thanks
-- Ben Kim

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18 16:37                               ` Ben Young Tae Kim
@ 2015-06-19  5:04                                 ` Sumit's Mailing Lists
  2015-06-30 14:05                                 ` Sumit's Mailing Lists
  1 sibling, 0 replies; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-19  5:04 UTC (permalink / raw)
  To: Ben Young Tae Kim; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

On 19/06/15 00:37, Ben Young Tae Kim wrote:
>
> On 06/18/15 09:33, Sumit's Mailing Lists wrote:
>> On 19/06/15 00:00, Ben Young Tae Kim wrote:
>>> Hi Sumit,
>>>
>>> On 06/17/15 20:01, Sumit's Mailing Lists wrote:
>>>> On 18/06/15 10:53, Kim, Ben Young Tae wrote:
>>>>> Hi Sumit,
>>>>>
>>>>> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
>>>>> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>>>>>
>>>>>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>>>>>> Hi Sumit,
>>>>>>>
>>>>>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>>>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>>>>>> Hi Sumit,
>>>>>>>>>>
>>>>>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>>>>>> Hi Sumit,
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>>>>>> Hi Smuit,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>>>>>> following
>>>>>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>>>>>> the devices.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>>>>>> ath3k (also
>>>>>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>>>>>> much about this.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>>>
>>>>>>>>>>>>> Marcel,
>>>>>>>>>>>>>
>>>>>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>>>>>> hasn't been released yet?
>>>>>>>>>>>>>
>>>>>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>>>>>> scripts to
>>>>>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>>>>>> (mentioned in
>>>>>>>>>>>>> here
>>>>>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>>>>>> typically
>>>>>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>>>>>
>>>>>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Rick,
>>>>>>>>>>>>
>>>>>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>>>>>
>>>>>>>>>>>>> Sumit
>>>>>>>>>>>>> --
>>>>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>>>>> Thanks
>>>>>>>>>>>> -- Ben Kim
>>>>>>>>>>>>
>>>>>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>>>>>> Australia. Is
>>>>>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>>>>>
>>>>>>>>>>> Sumit
>>>>>>>>>>> --
>>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>>>>>
>>>>>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>>>>>> be addressed on your setup?
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>>>>>
>>>>>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>>>>>> ...
>>>>>>>>>>    /* QCA ROME chipset */
>>>>>>>>>>    { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>>>    { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>>>    { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>>> // <-- add new VID/PID here
>>>>>>>>>> ...
>>>>>>>>>>
>>>>>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>>>>>> - nvm_usb_00000200.bin
>>>>>>>>>> - rampatch_usb_00000200.bin
>>>>>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>>>>>> but it it will be available soon I believe.
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> -- Ben Kim
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> Hi Ben,
>>>>>>>>>
>>>>>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>>>>>> .config back
>>>>>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>>>>>> bzImage and
>>>>>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>>>>>
>>>>>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>>>>>> could get some more info, and discovered I also have to delete
>>>>>>>>> this line
>>>>>>>>> or it will match the ath first:
>>>>>>>>>
>>>>>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>>>>>
>>>>>>>>> So then I saw
>>>>>>>>>
>>>>>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>>>>>> ehci-pci
>>>>>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>>>>>> ehci-pci
>>>>>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>>>>>> idProduct=3004
>>>>>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>>>>>> SerialNumber=0
>>>>>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>>>>>> [    1.350462] BT Device Info 0
>>>>>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>>>>>> [    1.350466] In Rome Block
>>>>>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>>>>>> /devices/platform/i8042/serio1/input/input10
>>>>>>>>> [    1.350671] hci0
>>>>>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>>>>>> idProduct=ff00
>>>>>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>>>>>> SerialNumber=1
>>>>>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>>>>>
>>>>>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>>>>>> BTUSB_QCA_ROME) "
>>>>>>>>> and you can see where that error comes from.
>>>>>>>>>
>>>>>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>>>>>> following to qca_device_info
>>>>>>>>>
>>>>>>>>>        { 0x00000200, 28, 4, 18 },
>>>>>>>>>
>>>>>>>>> and now I get;
>>>>>>>>>
>>>>>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>>>>>> [    1.357943] BT Device Info 0
>>>>>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>>>>>> [    1.357946] In Rome Block
>>>>>>>>> [    1.358113] hci0
>>>>>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>>>>>
>>>>>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>>>>>> those
>>>>>>>>> the right numbers for the device_info block?
>>>>>>>>>
>>>>>>>>> Sumit
>>>>>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>>>>>> I have it installed right. Is this correct:
>>>>>>>>
>>>>>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>>>>>> total 60
>>>>>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>>>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>>>>>
>>>>>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>>>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>>>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>>>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>>>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>>>>>
>>>>>>> You did right thing. I cannot understand why driver couldn't access
>>>>>>> firmware file which is in /lib/firmware/qca. Did you check each
>>>>>>> folder has right permission to access?
>>>>>>>
>>>>>>> Thanks
>>>>>>> -- Ben Kim
>>>>>>>
>>>>>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>>>>>> module and it loads the firmware! :)
>>>>>>
>>>>>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>>>>>> [  108.599733] usbcore: registered new interface driver btusb
>>>>>> [  108.599769] hci0
>>>>>> [  108.602907] Bluetooth: hci0: using rampatch file:
>>>>>> qca/rampatch_usb_00000200.bin
>>>>>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>>>> firmware rome 0x200 build 0x111
>>>>>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>>>>>
>>>>>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>>>>>
>>>>>> sudo rfkill list
>>>>>> 0: msi-bluetooth: Bluetooth
>>>>>>    Soft blocked: no
>>>>>>    Hard blocked: no
>>>>>> 1: msi-wlan: Wireless LAN
>>>>>>    Soft blocked: no
>>>>>>    Hard blocked: no
>>>>>> 2: hci0: Bluetooth
>>>>>>    Soft blocked: no
>>>>>>    Hard blocked: no
>>>>>> 3: phy0: Wireless LAN
>>>>>>    Soft blocked: no
>>>>>>    Hard blocked: no
>>>>>>
>>>>>> Sumit
>>>>>>
>>>>>>
>>>>>>
>>>>>> However, upon attempting to turn on bluetooth, either via the blueman
>>>>>> applet or the bluetoothctl command line like so:
>>>>>>
>>>>>> bluetoothctl
>>>>>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>>>>>> [bluetooth]# select 2C:33:7A:00:05:DA
>>>>>> [bluetooth]# power on
>>>>>> Failed to set power on: org.bluez.Error.Failed
>>>>>> [bluetooth]#
>>>>>>
>>>>>> I get the following kernel error:
>>>>>>
>>>>>> [ 1172.484075] hci0
>>>>>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>>>>>
>>>>> Why does it try to load firmware again since it is already done on
>>>>> previous logs. I haven't used bluetoothctrl command. Can you follow up
>>>>> this step?
>>>>>
>>>>> 1. Make sure to load firmware files on the kernel message
>>>>>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>>>> firmware rome 0x200 build 0x111
>>>>> 2. # hciattach hci0 up
>>>>> 3. # hcitool inq
>>>>>
>>>>>> --
>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>> linux-bluetooth" in
>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>> Thanks
>>>>> --Ben Kim
>>>> Oh I rebooted; so this is a fresh log. As far as I can tell, it only
>>>> tries to load the firmware once.
>>>>
>>>> Huh, odd. When I try to use hcitool, it can't find hci0:
>>>>
>>>> # hciattach hci0 up
>>>> Unknown device type or id
>>>> # hcitool inq
>>>> Inquiring ...
>>>> Inquiry failed.: No such device
>>>> # hcitool dev
>>>> Devices:
>>>>
>>>> Here's a pastbin or my current dmesg:
>>>> https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
>>>> modprobe btusb)
>>>>
>>>> Sumit
>>>>
>>>>
>>> My bad. It was a typo. Please try this. It should work on your setup I believe.
>>>
>>> # hciconfig hci0 up
>>> # hcitool inq
>>>
>>> Thanks
>>> -- Ben Kim
>>>
>> Ben,
>>
>> Still doesn't work, but "hciconfig hci0 up" gives me a different error
>> message:
>>
>> [10041.915542] hci0
>> [10041.915549] Bluetooth: hci0: Failed to access otp area (-113)
>>
>> Actually I just remembered where I've see otp before. So to get Wi-fi
>> working on this laptop, I had to the kvalo/ath fork on github and I had
>> to add the following to /etc/modprobe.d/ath10k.conf:
>>
>> options ath10k_core skip_otp=y
>>
>> That's why I'm still on the kvalo fork, so I can use my internal ath10k
>> wi-fi adapter. (There's a bug on the Ubuntu launchpad tracker where I
>> got that from).
>>
>> So I'm a bit out of my league here. What is OTP?
>>
>> Sumit
>> Sumit
> Hi Sumit,
>
> [10041.915549] Bbtusb_probe
>
> In the driver setup stage, it should communicate with controller to read rom HW / patch version inside. If you see this error, driver couldn't access controller through USB channel to read rom version.
>
> [  108.602907] Bluetooth: hci0: using rampatch file:
> qca/rampatch_usb_00000200.bin
> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
> firmware rome 0x200 build 0x111
> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>
>
> However, if you see those messages, it means you can read rom version first and patch download steps are completely done without any error so that controller is ready to do BT works. that's why I'm suggesting to trigger to install Bluetooth protocol into BlueZ driver using 'hciconfig hci0 up' command. 
>
> Have you seen your error message of OTP area(-113) after patch download is done?
>
> Thanks
> -- Ben Kim
>
Ah okay. So that error comes form btusb_qca_send_vendor_req which is
called from btusb_setup_qca, which should only be called from btusb_probe.

That is really weird. When I do

sudo hciconfig hci0 up

In get:

Can't init device hci0: Input/output error (5)

and in the kernel logs I get:

[  154.314133] hci0
[  154.314155] Bluetooth: hci0: Failed to access otp area (-108)

So that first hci0, I think is coming from the BT_DBG in btusb_open ...
oh, that also calls "data->setup_on_usb" which for the rome driver,
calls btusb_setup_qca, which then calls btusb_qca_send_vendor_req and we
come full circle. ... So that's why we're seeing that error even after
the firmware has been loaded. btusb_open also calls btusb_setup_qca.

Interestingly enough, if I run just "hciconfig hci0" I get:

hci0:    Type: BR/EDR  Bus: USB
    BD Address: 2C:33:7A:00:05:DA  ACL MTU: 1024:8  SCO MTU: 50:8
    DOWN
    RX bytes:603 acl:0 sco:0 events:32 errors:0
    TX bytes:375 acl:0 sco:0 commands:32 errors:0

So it's showing up correctly. It's just failing when I try to bring it
up. Hmm... I get that same -108 if I do an "rfkill block bluetooth"
followed by and "rfkill unblock bluetooth" ... so rfkill must try to
bring it up as well after an unblock.

The bluetooth light on my laptop is lit as well, and only flips on/off
using rfkill. hciconfig hci0 down doesn't turn it off (but doesn't error
out either) and hciconfig hci0 up doesn't turn it on if I rfkill block
it (gives me the error "Can't init device hci0: Operation not possible
due to RF-kill (132)" .. so that seems right; hciconfig shouldn't affect
if the device is actually powered on/off, just if the interface is
up/down, correct?)

Sumit


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-18 16:37                               ` Ben Young Tae Kim
  2015-06-19  5:04                                 ` Sumit's Mailing Lists
@ 2015-06-30 14:05                                 ` Sumit's Mailing Lists
  2015-07-01  0:08                                   ` Ben Young Tae Kim
  1 sibling, 1 reply; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-06-30 14:05 UTC (permalink / raw)
  To: Ben Young Tae Kim; +Cc: Marcel Holtmann, Huang, Rick, linux-bluetooth

On 19/06/15 00:37, Ben Young Tae Kim wrote:
>
> On 06/18/15 09:33, Sumit's Mailing Lists wrote:
>> On 19/06/15 00:00, Ben Young Tae Kim wrote:
>>> Hi Sumit,
>>>
>>> On 06/17/15 20:01, Sumit's Mailing Lists wrote:
>>>> On 18/06/15 10:53, Kim, Ben Young Tae wrote:
>>>>> Hi Sumit,
>>>>>
>>>>> On Jun 17, 2015, at 7:36 PM, Sumit's Mailing Lists
>>>>> <lists@battlepenguin.com <mailto:lists@battlepenguin.com>> wrote:
>>>>>
>>>>>> On 18/06/15 02:54, Ben Young Tae Kim wrote:
>>>>>>> Hi Sumit,
>>>>>>>
>>>>>>> On 06/17/15 06:00, Sumit Khanna wrote:
>>>>>>>> On 17/06/15 20:46, Sumit's Mailing Lists wrote:
>>>>>>>>> On 17/06/15 04:52, Ben Young Tae Kim wrote:
>>>>>>>>>> Hi Sumit,
>>>>>>>>>>
>>>>>>>>>> On 06/15/15 10:48, Sumit's Mailing Lists wrote:
>>>>>>>>>>> On 16/06/15 00:57, Ben Young Tae Kim wrote:
>>>>>>>>>>>> Hi Sumit,
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 06/15/15 07:16, Sumit's Mailing Lists wrote:
>>>>>>>>>>>>> On 15/06/15 21:55, Marcel Holtmann wrote:
>>>>>>>>>>>>>> Hi Smuit,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I'm currently using an MSI WS60 laptop which contains the
>>>>>>>>>>>>>>>>> following
>>>>>>>>>>>>>>>>> Bluetooth controller (from lsusb):
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>>>> assuming that the firmware is present, this is most likely
>>>>>>>>>>>>>>>> just missing the right VID/PID additions in the drivers.
>>>>>>>>>>>>>>>> Please prepare a patch for that.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> and the more detailed version:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Bus 003 Device 003: ID 0cf3:3004 Atheros Communications,
>>>>>>>>>>>>>>>>> Inc. AR3012
>>>>>>>>>>>>>>>>> Bluetooth 4.0
>>>>>>>>>>>>>>>>> Device Descriptor:
>>>>>>>>>>>>>>>>> bLength                18
>>>>>>>>>>>>>>>>> bDescriptorType         1
>>>>>>>>>>>>>>>>> bcdUSB               1.10
>>>>>>>>>>>>>>>>> bDeviceClass          224 Wireless
>>>>>>>>>>>>>>>>> bDeviceSubClass         1 Radio Frequency
>>>>>>>>>>>>>>>>> bDeviceProtocol         1 Bluetooth
>>>>>>>>>>>>>>>>> bMaxPacketSize0        64
>>>>>>>>>>>>>>>>> idVendor           0x0cf3 Atheros Communications, Inc.
>>>>>>>>>>>>>>>>> idProduct          0x3004 AR3012 Bluetooth 4.0
>>>>>>>>>>>>>>>>> bcdDevice            0.01
>>>>>>>>>>>>>>>>> iManufacturer           0
>>>>>>>>>>>>>>>>> iProduct                0
>>>>>>>>>>>>>>>>> iSerial                 0
>>>>>>>>>>>>>>>>> bNumConfigurations      1
>>>>>>>>>>>>>>>>> Configuration Descriptor:
>>>>>>>>>>>>>>>> I actually prefer /sys/kernel/debug/usb/devices output for
>>>>>>>>>>>>>>>> the devices.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Here is the output from /sys/kernel/debug/usb/devices for my
>>>>>>>>>>>>>>> ath3k (also
>>>>>>>>>>>>>>> added it to the kernel bugzilla):
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> T:  Bus=03 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= 0.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)
>>>>>>>>>>>>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>>>> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
>>>>>>>>>>>>>>> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
>>>>>>>>>>>>>>> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01
>>>>>>>>>>>>>>> Driver=(none)
>>>>>>>>>>>>>>> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>>> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> and the firmware the kernel is trying to load:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [  762.729370] usb 3-1.3: Direct firmware load for
>>>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu failed with error -2
>>>>>>>>>>>>>>> [  762.729373] Bluetooth: Patch file not found
>>>>>>>>>>>>>>> ar3k/AthrBT_0x00000200.dfu
>>>>>>>>>>>>>>> [  762.729374] Bluetooth: Loading patch file failed
>>>>>>>>>>>>>>> [  762.729381] ath3k: probe of 3-1.3:1.0 failed with error -2
>>>>>>>>>>>>>>> [  762.729411] usbcore: registered new interface driver ath3k
>>>>>>>>>>>>>> I fail to see that firmware in linux-firmware tree. However
>>>>>>>>>>>>>> this up to Atheros / Qualcomm to submit there. I can not do
>>>>>>>>>>>>>> much about this.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Marcel
>>>>>>>>>>>>>>
>>>>>>>>>>>>> Marcel,
>>>>>>>>>>>>>
>>>>>>>>>>>>> So it's pulling the right firmware file for my device, but It just
>>>>>>>>>>>>> hasn't been released yet?
>>>>>>>>>>>>>
>>>>>>>>>>>>> I know with the Wi-Fi firmware, the ath10k devs had python
>>>>>>>>>>>>> scripts to
>>>>>>>>>>>>> extract the firmware binaries from the Windows drivers
>>>>>>>>>>>>> (mentioned in
>>>>>>>>>>>>> here
>>>>>>>>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1383184). Has
>>>>>>>>>>>>> anyone done that before with the bluetooth firmware, or do you
>>>>>>>>>>>>> typically
>>>>>>>>>>>>> just wait for atheros/qualcom to release official ones?
>>>>>>>>>>>> Where did you get your atheros board/card since I couldn't find
>>>>>>>>>>>> that board here. Is it a laptop? The BT firmware driver was
>>>>>>>>>>>> trying to load AthrBT_0x00000200.dfu file and it got failed
>>>>>>>>>>>> because no firmware file was present. But 0x00000200 means
>>>>>>>>>>>> fw_version.rom_version which coming from controller chip,
>>>>>>>>>>>> however, I haven't seen this version on Atheros chipset.
>>>>>>>>>>>>
>>>>>>>>>>>> I'm adding my friend - Rick Huang here. He may help you out
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Rick,
>>>>>>>>>>>>
>>>>>>>>>>>> Have you seen rom_version as 0x00000200?
>>>>>>>>>>>>
>>>>>>>>>>>>> Sumit
>>>>>>>>>>>>> --
>>>>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>>>>> Thanks
>>>>>>>>>>>> -- Ben Kim
>>>>>>>>>>>>
>>>>>>>>>>> Yes, It's an MSI WS-60 Laptop, purchased two months ago in
>>>>>>>>>>> Australia. Is
>>>>>>>>>>> there any other debugging information I need to pull for you?
>>>>>>>>>>>
>>>>>>>>>>> Sumit
>>>>>>>>>>> --
>>>>>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>>>>> linux-bluetooth" in
>>>>>>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>>>>>> According to my colleague, it is not AR chip but QCA ROME core
>>>>>>>>>> inside even though they're sharing same VID/PID with AR/QCA
>>>>>>>>>> ROME(version 2). That's why you cannot bring up your card with
>>>>>>>>>> ath3k driver. I knew it was not a good idea as it was early stage
>>>>>>>>>> to develop the card so that next version of ROME USB card(v3.0 or
>>>>>>>>>> v3.2) will use different PID/VID as you can see below.
>>>>>>>>>>
>>>>>>>>>> Can you follow up these instructions to see whether or not it can
>>>>>>>>>> be addressed on your setup?
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> 1. put this code in drivers/bluetooth/btusb.c
>>>>>>>>>>
>>>>>>>>>> static const struct usb_device_id blacklist_table[] = {
>>>>>>>>>> ...
>>>>>>>>>>    /* QCA ROME chipset */
>>>>>>>>>>    { USB_DEVICE(0x0cf3, 0xe300), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>>>    { USB_DEVICE(0x0cf3, 0xe360), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>>>    { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>>>>>>>>> // <-- add new VID/PID here
>>>>>>>>>> ...
>>>>>>>>>>
>>>>>>>>>> 2. Copy firmware files into /lib/firmware/qca
>>>>>>>>>> - nvm_usb_00000200.bin
>>>>>>>>>> - rampatch_usb_00000200.bin
>>>>>>>>>> Those FW files won't be available on linux-firmware.git til today
>>>>>>>>>> but it it will be available soon I believe.
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> -- Ben Kim
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> Hi Ben,
>>>>>>>>>
>>>>>>>>> I added that line to my btusb.c; did a mrpropery, copied my
>>>>>>>>> .config back
>>>>>>>>> into the source tree, disabled ATH3K in menucofnig, made the
>>>>>>>>> bzImage and
>>>>>>>>> rebooted. The firmware you attached is in /lib/firmware/qca.
>>>>>>>>>
>>>>>>>>> I enabled debugging (FLAGS_btusb.o := -DDEBUG in the Makefile) so I
>>>>>>>>> could get some more info, and discovered I also have to delete
>>>>>>>>> this line
>>>>>>>>> or it will match the ath first:
>>>>>>>>>
>>>>>>>>> { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }
>>>>>>>>>
>>>>>>>>> So then I saw
>>>>>>>>>
>>>>>>>>> [    1.263991] usb 3-1.3: new full-speed USB device number 3 using
>>>>>>>>> ehci-pci
>>>>>>>>> [    1.277022] usb 4-1.8: new full-speed USB device number 3 using
>>>>>>>>> ehci-pci
>>>>>>>>> [    1.350050] usb 3-1.3: New USB device found, idVendor=0cf3,
>>>>>>>>> idProduct=3004
>>>>>>>>> [    1.350051] usb 3-1.3: New USB device strings: Mfr=0, Product=0,
>>>>>>>>> SerialNumber=0
>>>>>>>>> [    1.350461] intf ffff88041bf62400 id ffffffff81d83bc0
>>>>>>>>> [    1.350462] BT Device Info 0
>>>>>>>>> [    1.350463] BT Device Info (after matching) 32768
>>>>>>>>> [    1.350466] In Rome Block
>>>>>>>>> [    1.350546] input: ETPS/2 Elantech Touchpad as
>>>>>>>>> /devices/platform/i8042/serio1/input/input10
>>>>>>>>> [    1.350671] hci0
>>>>>>>>> [    1.350879] Bluetooth: hci0: don't support firmware rome 0x200
>>>>>>>>> [    1.364795] usb 4-1.8: New USB device found, idVendor=1770,
>>>>>>>>> idProduct=ff00
>>>>>>>>> [    1.364797] usb 4-1.8: New USB device strings: Mfr=1, Product=1,
>>>>>>>>> SerialNumber=1
>>>>>>>>> [    1.364798] usb 4-1.8: Product: MSI EPF USB
>>>>>>>>> [    1.364799] usb 4-1.8: Manufacturer: MSI EPF USB
>>>>>>>>> [    1.364800] usb 4-1.8: SerialNumber: MSI EPF USB
>>>>>>>>>
>>>>>>>>> So those BT Device Info statements I added in the probe function. "In
>>>>>>>>> Rome Block" I added right after "if (id->driver_info &
>>>>>>>>> BTUSB_QCA_ROME) "
>>>>>>>>> and you can see where that error comes from.
>>>>>>>>>
>>>>>>>>> And that comes from...oh it checks another table...okay so I added the
>>>>>>>>> following to qca_device_info
>>>>>>>>>
>>>>>>>>>        { 0x00000200, 28, 4, 18 },
>>>>>>>>>
>>>>>>>>> and now I get;
>>>>>>>>>
>>>>>>>>> [    1.357942] intf ffff88041ba5bc00 id ffffffff81d83bc0
>>>>>>>>> [    1.357943] BT Device Info 0
>>>>>>>>> [    1.357944] BT Device Info (after matching) 32768
>>>>>>>>> [    1.357946] In Rome Block
>>>>>>>>> [    1.358113] hci0
>>>>>>>>> [    1.358516] bluetooth hci0: Direct firmware load for
>>>>>>>>> qca/rampatch_usb_00000200.bin failed with error -2
>>>>>>>>> [    1.358517] Bluetooth: hci0: failed to request rampatch file:
>>>>>>>>> qca/rampatch_usb_00000200.bin (-2)
>>>>>>>>>
>>>>>>>>> So progress. It's attempting to load the firmware and failing. Are
>>>>>>>>> those
>>>>>>>>> the right numbers for the device_info block?
>>>>>>>>>
>>>>>>>>> Sumit
>>>>>>>> Just remembered -2 is when it can't even find the firmware. But I think
>>>>>>>> I have it installed right. Is this correct:
>>>>>>>>
>>>>>>>> catelyn linux # ls /lib/firmware/qca/ -l
>>>>>>>> total 60
>>>>>>>> -rw-r--r-- 1 root root  1859 Jun 17 18:07 nvm_usb_00000200.bin
>>>>>>>> -rw-r--r-- 1 root root 54432 Jun 17 18:07 rampatch_usb_00000200.bin
>>>>>>>>
>>>>>>>> catelyn linux # sha256sum /lib/firmware/qca/*
>>>>>>>> 50cddc73c1a7c90bb3338941785d46088374b2aebf5dd1679c23145e39ad5087
>>>>>>>> /lib/firmware/qca/nvm_usb_00000200.bin
>>>>>>>> 7551fc3a01fe46514d4da265095aabf07371cf17418a9f238e51b0fc4e83cfc5
>>>>>>>> /lib/firmware/qca/rampatch_usb_00000200.bin
>>>>>>>>
>>>>>>> You did right thing. I cannot understand why driver couldn't access
>>>>>>> firmware file which is in /lib/firmware/qca. Did you check each
>>>>>>> folder has right permission to access?
>>>>>>>
>>>>>>> Thanks
>>>>>>> -- Ben Kim
>>>>>>>
>>>>>> Ah I'm dumb. I'm using an initrd. :) So I've recompiled btusb as a
>>>>>> module and it loads the firmware! :)
>>>>>>
>>>>>> [  108.599370] intf ffff8800c9d2b800 id ffffffffa0005f50
>>>>>> [  108.599733] usbcore: registered new interface driver btusb
>>>>>> [  108.599769] hci0
>>>>>> [  108.602907] Bluetooth: hci0: using rampatch file:
>>>>>> qca/rampatch_usb_00000200.bin
>>>>>> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>>>> firmware rome 0x200 build 0x111
>>>>>> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>>>>>>
>>>>>> and I checked rfkill to make sure I wasn't soft/hard blocked:
>>>>>>
>>>>>> sudo rfkill list
>>>>>> 0: msi-bluetooth: Bluetooth
>>>>>>    Soft blocked: no
>>>>>>    Hard blocked: no
>>>>>> 1: msi-wlan: Wireless LAN
>>>>>>    Soft blocked: no
>>>>>>    Hard blocked: no
>>>>>> 2: hci0: Bluetooth
>>>>>>    Soft blocked: no
>>>>>>    Hard blocked: no
>>>>>> 3: phy0: Wireless LAN
>>>>>>    Soft blocked: no
>>>>>>    Hard blocked: no
>>>>>>
>>>>>> Sumit
>>>>>>
>>>>>>
>>>>>>
>>>>>> However, upon attempting to turn on bluetooth, either via the blueman
>>>>>> applet or the bluetoothctl command line like so:
>>>>>>
>>>>>> bluetoothctl
>>>>>> [NEW] Controller 2C:33:7A:00:05:DA BlueZ 5.25 [default]
>>>>>> [bluetooth]# select 2C:33:7A:00:05:DA
>>>>>> [bluetooth]# power on
>>>>>> Failed to set power on: org.bluez.Error.Failed
>>>>>> [bluetooth]#
>>>>>>
>>>>>> I get the following kernel error:
>>>>>>
>>>>>> [ 1172.484075] hci0
>>>>>> [ 1172.484097] Bluetooth: hci0: Failed to access otp area (-108)
>>>>>>
>>>>> Why does it try to load firmware again since it is already done on
>>>>> previous logs. I haven't used bluetoothctrl command. Can you follow up
>>>>> this step?
>>>>>
>>>>> 1. Make sure to load firmware files on the kernel message
>>>>>> Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
>>>>>> firmware rome 0x200 build 0x111
>>>>> 2. # hciattach hci0 up
>>>>> 3. # hcitool inq
>>>>>
>>>>>> --
>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>> linux-bluetooth" in
>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>> <mailto:majordomo@vger.kernel.org>
>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>> Thanks
>>>>> --Ben Kim
>>>> Oh I rebooted; so this is a fresh log. As far as I can tell, it only
>>>> tries to load the firmware once.
>>>>
>>>> Huh, odd. When I try to use hcitool, it can't find hci0:
>>>>
>>>> # hciattach hci0 up
>>>> Unknown device type or id
>>>> # hcitool inq
>>>> Inquiring ...
>>>> Inquiry failed.: No such device
>>>> # hcitool dev
>>>> Devices:
>>>>
>>>> Here's a pastbin or my current dmesg:
>>>> https://bpaste.net/show/76b3ab48f222 (towards the bottom is where I
>>>> modprobe btusb)
>>>>
>>>> Sumit
>>>>
>>>>
>>> My bad. It was a typo. Please try this. It should work on your setup I believe.
>>>
>>> # hciconfig hci0 up
>>> # hcitool inq
>>>
>>> Thanks
>>> -- Ben Kim
>>>
>> Ben,
>>
>> Still doesn't work, but "hciconfig hci0 up" gives me a different error
>> message:
>>
>> [10041.915542] hci0
>> [10041.915549] Bluetooth: hci0: Failed to access otp area (-113)
>>
>> Actually I just remembered where I've see otp before. So to get Wi-fi
>> working on this laptop, I had to the kvalo/ath fork on github and I had
>> to add the following to /etc/modprobe.d/ath10k.conf:
>>
>> options ath10k_core skip_otp=y
>>
>> That's why I'm still on the kvalo fork, so I can use my internal ath10k
>> wi-fi adapter. (There's a bug on the Ubuntu launchpad tracker where I
>> got that from).
>>
>> So I'm a bit out of my league here. What is OTP?
>>
>> Sumit
>> Sumit
> Hi Sumit,
>
> [10041.915549] Bluetooth: hci0: Failed to access otp area (-113)
>
> In the driver setup stage, it should communicate with controller to read rom HW / patch version inside. If you see this error, driver couldn't access controller through USB channel to read rom version.
>
> [  108.602907] Bluetooth: hci0: using rampatch file:
> qca/rampatch_usb_00000200.bin
> [  108.602909] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
> firmware rome 0x200 build 0x111
> [  108.658716] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
>
>
> However, if you see those messages, it means you can read rom version first and patch download steps are completely done without any error so that controller is ready to do BT works. that's why I'm suggesting to trigger to install Bluetooth protocol into BlueZ driver using 'hciconfig hci0 up' command. 
>
> Have you seen your error message of OTP area(-113) after patch download is done?
>
> Thanks
> -- Ben Kim
>
Ben,

Kvalo updated the wl-ath+ kernel fork to 4.1.0 so I attempted this again
to see if it might have been a bug that's been fixed.

So I'm using https://github.com/kvalo/ath commit
916a6fc66cc013dd67af0d5da546be0012ac2b2c

with the following patch:

diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
index f40e194..35fee06 100644
--- a/drivers/bluetooth/Makefile
+++ b/drivers/bluetooth/Makefile
@@ -1,6 +1,7 @@
 #
 # Makefile for the Linux Bluetooth HCI device drivers.
 #
+CFLAGS_btusb.o := -DDEBUG
 
 obj-$(CONFIG_BT_HCIVHCI)       += hci_vhci.o
 obj-$(CONFIG_BT_HCIUART)       += hci_uart.o
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 94c6c04..1c476d8 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -194,7 +194,6 @@ static const struct usb_device_id blacklist_table[] = {
        { 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 },
@@ -224,6 +223,7 @@ static const struct usb_device_id blacklist_table[] = {
        { 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 },
+       { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
 
        /* Broadcom BCM2035 */
        { USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },


I rebooted into linux-4.1.0-wl-ath+ and the very first command I ran was
"hciconfig hci0 up" and I still get the following in my kernel logs:

[   30.011420] hci0
[   30.011439] Bluetooth: hci0: Failed to access otp area (-113)

Here is my full kernel log: https://bpaste.net/show/96c4d5571356

Sumit

^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-06-30 14:05                                 ` Sumit's Mailing Lists
@ 2015-07-01  0:08                                   ` Ben Young Tae Kim
  2015-12-11 21:16                                     ` Sumit's Mailing Lists
  0 siblings, 1 reply; 29+ messages in thread
From: Ben Young Tae Kim @ 2015-07-01  0:08 UTC (permalink / raw)
  To: Sumit's Mailing Lists, Marcel Holtmann; +Cc: Huang, Rick, linux-bluetooth

Hi Marcel,

On 06/30/15 07:05, Sumit's Mailing Lists wrote:
> Ben,
>
> Kvalo updated the wl-ath+ kernel fork to 4.1.0 so I attempted this again
> to see if it might have been a bug that's been fixed.
>
> So I'm using https://github.com/kvalo/ath commit
> 916a6fc66cc013dd67af0d5da546be0012ac2b2c
>
> with the following patch:
>
> diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
> index f40e194..35fee06 100644
> --- a/drivers/bluetooth/Makefile
> +++ b/drivers/bluetooth/Makefile
> @@ -1,6 +1,7 @@
>  #
>  # Makefile for the Linux Bluetooth HCI device drivers.
>  #
> +CFLAGS_btusb.o := -DDEBUG
>  
>  obj-$(CONFIG_BT_HCIVHCI)       += hci_vhci.o
>  obj-$(CONFIG_BT_HCIUART)       += hci_uart.o
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 94c6c04..1c476d8 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -194,7 +194,6 @@ static const struct usb_device_id blacklist_table[] = {
>         { 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 },
> @@ -224,6 +223,7 @@ static const struct usb_device_id blacklist_table[] = {
>         { 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 },
> +       { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>  
>         /* Broadcom BCM2035 */
>         { USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },
>
>
> I rebooted into linux-4.1.0-wl-ath+ and the very first command I ran was
> "hciconfig hci0 up" and I still get the following in my kernel logs:
>
> [   30.011420] hci0
> [   30.011439] Bluetooth: hci0: Failed to access otp area (-113)
>
> Here is my full kernel log: https://bpaste.net/show/96c4d5571356
>
> Sumit
>
>

According to log, looks like patch download was done in btusb_open function, however, btusb_open was not completed after QCA patching steps were going through I believe.

[    6.505349] Bluetooth: hci0: using rampatch file: qca/rampatch_usb_00000200.bin
[    6.505352] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299, firmware rome 0x200 build 0x111
[    6.558661] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
...

[    9.133753] hci0 urb ffff8800c9cbba80 status -2 count 0
[    9.134085] hci0 urb ffff8800c9cbb9c0 status -2 count 0
[    9.134377] hci0 urb ffff8800c9cbb300 status -2 count 0

The status -2 means urb->status(-ENOENT). Haven you seen this error during sequences of btusb_open function? Could you give me some insight why we're getting -ENOENT error after patching is done?

Hi Sumit,

I'm expecting your card is up and running properly on Windows to make sure there is NO HW problem. Can you please double confirm? Addition to that, does WLAN(ath10k) work on your laptop?

Thanks
-- Ben Kim

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
  2015-07-01  0:08                                   ` Ben Young Tae Kim
@ 2015-12-11 21:16                                     ` Sumit's Mailing Lists
  0 siblings, 0 replies; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-12-11 21:16 UTC (permalink / raw)
  To: Ben Young Tae Kim, Marcel Holtmann; +Cc: Huang, Rick, linux-bluetooth

On 01/07/15 01:08, Ben Young Tae Kim wrote:
> Hi Marcel,
>
> On 06/30/15 07:05, Sumit's Mailing Lists wrote:
>> Ben,
>>
>> Kvalo updated the wl-ath+ kernel fork to 4.1.0 so I attempted this again
>> to see if it might have been a bug that's been fixed.
>>
>> So I'm using https://github.com/kvalo/ath commit
>> 916a6fc66cc013dd67af0d5da546be0012ac2b2c
>>
>> with the following patch:
>>
>> diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
>> index f40e194..35fee06 100644
>> --- a/drivers/bluetooth/Makefile
>> +++ b/drivers/bluetooth/Makefile
>> @@ -1,6 +1,7 @@
>>  #
>>  # Makefile for the Linux Bluetooth HCI device drivers.
>>  #
>> +CFLAGS_btusb.o := -DDEBUG
>>  
>>  obj-$(CONFIG_BT_HCIVHCI)       += hci_vhci.o
>>  obj-$(CONFIG_BT_HCIUART)       += hci_uart.o
>> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
>> index 94c6c04..1c476d8 100644
>> --- a/drivers/bluetooth/btusb.c
>> +++ b/drivers/bluetooth/btusb.c
>> @@ -194,7 +194,6 @@ static const struct usb_device_id blacklist_table[] = {
>>         { 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 },
>> @@ -224,6 +223,7 @@ static const struct usb_device_id blacklist_table[] = {
>>         { 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 },
>> +       { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
>>  
>>         /* Broadcom BCM2035 */
>>         { USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },
>>
>>
>> I rebooted into linux-4.1.0-wl-ath+ and the very first command I ran was
>> "hciconfig hci0 up" and I still get the following in my kernel logs:
>>
>> [   30.011420] hci0
>> [   30.011439] Bluetooth: hci0: Failed to access otp area (-113)
>>
>> Here is my full kernel log: https://bpaste.net/show/96c4d5571356
>>
>> Sumit
>>
>>
> According to log, looks like patch download was done in btusb_open function, however, btusb_open was not completed after QCA patching steps were going through I believe.
>
> [    6.505349] Bluetooth: hci0: using rampatch file: qca/rampatch_usb_00000200.bin
> [    6.505352] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299, firmware rome 0x200 build 0x111
> [    6.558661] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
> ...
>
> [    9.133753] hci0 urb ffff8800c9cbba80 status -2 count 0
> [    9.134085] hci0 urb ffff8800c9cbb9c0 status -2 count 0
> [    9.134377] hci0 urb ffff8800c9cbb300 status -2 count 0
>
> The status -2 means urb->status(-ENOENT). Haven you seen this error during sequences of btusb_open function? Could you give me some insight why we're getting -ENOENT error after patching is done?
>
> Hi Sumit,
>
> I'm expecting your card is up and running properly on Windows to make sure there is NO HW problem. Can you please double confirm? Addition to that, does WLAN(ath10k) work on your laptop?
>
> Thanks
> -- Ben Kim
>

Sorry it's taken so long for me to get back to this. I gave up and just
bought an external Bluetooth adapter for a while. I've been travelling
and my external dongle broke along the way, so I'm back to trying to get
the internal one working.

I'm now on linux-4.3.0 stock, using the same patch and getting the same
error when I attempt to turn on the bluetooth adapter using "power on"
from the bluetoothctl command line tool.

[10052.098236] Bluetooth: hci0: Failed to access otp area (-108)

I saw someone had updated the bugzilla bug and cited someone else who
used my patch and got their bluetooth working:

https://bugzilla.kernel.org/show_bug.cgi?id=99371
http://marc.info/?l=linux-bluetooth&m=144633933801493&w=2

So this still isn't working for me. As far as the question, "Does it
work in Windows" unfortunately I no longer have Windows installed on
this laptop and don't have the equipment (external hard drive or
something) to try to get a native install. If I run Windows in Virtual
Box and I try to connect the device, it still shows up at an ath3k
device and Windows 8 can't load the drivers.

Neither of the official driver packages from MSI for this laptop work if
I have it connected via VM, so I fell like I need to get Windows running
natively to really test it:

KillerSuite_1.1.53.1484_Win7_Win81
KillerDrivers_1.1.52.1438

Interestingly enough, when looking for the driver from MSI for windows,
it's apparently different for this same model of laptop. They changed
out the card throughout the production cycle. According to the bottom of
my laptop, the label says:

RF Module inside:
Qualcomm Atheros QCNFA34AC

But I guess that's just the wi-fi and not the bluetooth? The ath10k wifi
works perfectly in kernel 4.3.0.

The kernel logs still show the firmware loading:

[   11.128970] Bluetooth: hci0: using rampatch file:
qca/rampatch_usb_00000200.bin
[   11.128972] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
firmware rome 0x200 build 0x111
[   11.184335] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin
[ 6886.445648] Bluetooth: hci0: using rampatch file:
qca/rampatch_usb_00000200.bin
[ 6886.445656] Bluetooth: hci0: QCA: patch rome 0x200 build 0x299,
firmware rome 0x200 build 0x111
[ 6886.499929] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000200.bin

So the patch will only apply if the chipset is correct right? Or can
this be successful even if it's the wrong chip?

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
@ 2015-11-01  0:55 Clément de l'Hamaide
  0 siblings, 0 replies; 29+ messages in thread
From: Clément de l'Hamaide @ 2015-11-01  0:55 UTC (permalink / raw)
  To: linux-bluetooth

Hi all,

This is my first mail in this list, I've subscribed this list
because I own a MSI GS60 laptop with QCA6174 chipset (Wifi+Bluetooth)
where Bluetooth doesn't work.

I am in the very same bug than the one reported by Sumit (same dmesg report)
and it's now solved by applying the following patch:


diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index b6aceaf..884dbe5 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -199,7 +199,6 @@ static const struct usb_device_id blacklist_table[] = {
        { 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 },
@@ -230,6 +229,7 @@ static const struct usb_device_id blacklist_table[] = {
        { 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 },
+       { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },

        /* Broadcom BCM2035 */
        { USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },


After a fresh kernel compilation and reboot, my Bluetooth [0cf3:3004]
is now working as expected.

I hope my feedback will help the bluetooth community to commit this patch.

Regards,
Clément

^ permalink raw reply related	[flat|nested] 29+ messages in thread

* ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0
@ 2015-05-26 12:25 Sumit's Mailing Lists
  0 siblings, 0 replies; 29+ messages in thread
From: Sumit's Mailing Lists @ 2015-05-26 12:25 UTC (permalink / raw)
  To: linux-bluetooth

I'm currently using an MSI WS60 laptop which contains the following
Bluetooth controller (from lsusb):

Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
Bluetooth 4.0

and the more detailed version:

Bus 003 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012
Bluetooth 4.0
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x0cf3 Atheros Communications, Inc.
  idProduct          0x3004 AR3012 Bluetooth 4.0
  bcdDevice            0.01
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:


In my kernel logs I see the following:

$dmesg | grep -i bluetooth

[    0.334727] Bluetooth: Core ver 2.20
[    0.334734] Bluetooth: HCI device and connection manager initialized
[    0.334736] Bluetooth: HCI socket layer initialized
[    0.334738] Bluetooth: L2CAP socket layer initialized
[    0.334740] Bluetooth: SCO socket layer initialized
[    0.604281] Bluetooth: HCI UART driver ver 2.2
[    0.604283] Bluetooth: HCI H4 protocol initialized
[    0.604285] Bluetooth: HCI BCSP protocol initialized
[    0.604286] Bluetooth: HCILL protocol initialized
[    0.604288] Bluetooth: HCIATH3K protocol initialized
[    0.615125] Bluetooth: RFCOMM TTY layer initialized
[    0.615129] Bluetooth: RFCOMM socket layer initialized
[    0.615132] Bluetooth: RFCOMM ver 1.11
[    0.615136] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    0.615138] Bluetooth: BNEP filters: protocol multicast
[    0.615141] Bluetooth: BNEP socket layer initialized
[    0.615144] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    0.615146] Bluetooth: HIDP socket layer initialized
[    1.358547] Bluetooth: Patch file not found ar3k/AthrBT_0x00000200.dfu
[    1.358548] Bluetooth: Loading patch file failed

I did a search for this issue and only found other bugs indicating that
this should be reported upstream:

  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1451689

A mailing list message:

  http://www.spinics.net/lists/linux-wireless/msg135868.html

And a possible duplicate:

  http://www.spinics.net/lists/linux-wireless/msg135869.html

My /proc/version:

  Linux version 4.0.0-wl-ath+ (root@catelyn) (gcc version 4.8.4 (Gentoo
4.8.4 p1.5, pie-0.6.1) ) #14 SMP Thu May 7 18:26:16 AEST 2015

I am running the ath+ branch because my Wi-Fi will not work on the
current kernel (attempted linux-4.0.4-gentoo and Wi-Fi failed to load
firmware, bluetooth had exact same message in kernel logs as reported
above). I'm running commit 4b9abafd of the kvalo/ath fork with the
atk10k firmware files from my own sumdog/ath10k-firmware fork.

Is there an official bug in for this issue yet that I can watch? Are
there any dfu files I can try out there for my specific device? I can
build any kernels you need if you want more specific debugging information.

Sumit

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2015-12-11 21:16 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26 14:44 ath3k Bluetooth adapter not loading: [0cf3:3004] Atheros Communications, Inc. AR3012 Bluetooth 4.0 Sumit's Mailing Lists
2015-06-06  6:16 ` Marcel Holtmann
2015-06-15 12:05   ` Sumit's Mailing Lists
2015-06-15 13:55     ` Marcel Holtmann
2015-06-15 14:16       ` Sumit's Mailing Lists
2015-06-15 16:57         ` Ben Young Tae Kim
2015-06-15 17:48           ` Sumit's Mailing Lists
2015-06-16 20:52             ` Ben Young Tae Kim
2015-06-17  9:36               ` Marcel Holtmann
2015-06-17 18:34                 ` Ben Young Tae Kim
2015-06-17 12:46               ` Sumit's Mailing Lists
2015-06-17 13:00                 ` Sumit Khanna
2015-06-17 18:54                   ` Ben Young Tae Kim
2015-06-18  2:36                     ` Sumit's Mailing Lists
2015-06-18  2:53                       ` Kim, Ben Young Tae
2015-06-18  3:01                         ` Sumit's Mailing Lists
2015-06-18 16:00                           ` Ben Young Tae Kim
2015-06-18 16:33                             ` Sumit's Mailing Lists
2015-06-18 16:37                               ` Ben Young Tae Kim
2015-06-19  5:04                                 ` Sumit's Mailing Lists
2015-06-30 14:05                                 ` Sumit's Mailing Lists
2015-07-01  0:08                                   ` Ben Young Tae Kim
2015-12-11 21:16                                     ` Sumit's Mailing Lists
2015-06-18  3:02                         ` Sumit's Mailing Lists
2015-06-18  5:53                           ` Kim, Ben Young Tae
2015-06-18  8:45                             ` Sumit's Mailing Lists
2015-06-18 10:09                               ` Huang, Rick
  -- strict thread matches above, loose matches on Subject: below --
2015-11-01  0:55 Clément de l'Hamaide
2015-05-26 12:25 Sumit's Mailing Lists

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.