Re: 057c:3800 BlueFRITZ! Bluetooth Stick broken since 2.6.something

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

On Mon, Jul 22, 2013, Marcel Holtmann wrote:
> >>>>> HCI Event: Command Complete (0x0e) plen 12 [hci0] 0.043811
> >>>>      Read Local Version Information (0x04|0x0001) ncmd 1
> >>>>        Status: Success (0x00)
> >>>>        HCI version: 2 - 0x2006
> >>>>        LMP version: 2 - 0x1806
> >>>>        Manufacturer: AVM Berlin (31)
> >>> it declares itself here as Bluetooth 1.2 device. Which means it is the
> >>> second generation of BlueFritz! USB device.
> >>> 
> >>> <snip>
> >>> 
> >>>> < HCI Command: Read Local Supported Comm.. (0x04|0x0002) plen 0 [hci0] 0.210014
> >>>>> HCI Event: Command Status (0x0f) plen 4 [hci0] 0.217361
> >>>>      Read Local Supported Commands (0x04|0x0002) ncmd 1
> >>>>        Status: Unknown HCI Command (0x01)
> >>> And here is your failing command. Newer kernels have been strict with
> >>> failing commands and will just abort the setup if anything goes wrong.
> >>> 
> >>> Johan, we need to figure out on how to work around this one. Might
> >>> just match for the manufacturer before sending the command.
> >> Either that or a quirk based on the USB id. Wouldn't matching just the
> >> manufacturer be a bit problematic for any newer chips from this company,
> >> or they stopped doing Bluetooth dongles after this one?
> > They stopped doing Bluetooth dongles after this one. I found no more
> > Product with bluetooth on their website.
> > The support from AVM endet on 01.12.2009.
> > As I read here http://www.wehavemorefun.de/fritzbox/BlueFRITZ!_USB
> 
> yes, they ever only made two products. And their baseband was based on
> Silicon Wave which actually got bought by Qualcomm if I remember this
> correctly. So going by the manufacturer id and adding a good comment
> into the code might make this work nicely again.
> 
> Johan, if you prefer a quirk, then go for that one.

Since we know that these are the only pieces of hardware that exist with
this manufacturer id I think it's simplest to just use that instead of
creating more code for this.

Attached is a patch that still needs to be tested. It might e.g. reveal
other commands that also fail with this hardware.

Johan
>From 6c95ba1014b1949543fb16d3999fa3ed58e0f0d5 Mon Sep 17 00:00:00 2001
From: Johan Hedberg <johan.hedberg@xxxxxxxxx>
Date: Wed, 24 Jul 2013 02:32:46 +0300
Subject: [PATCH] Bluetooth: Fix HCI init for BlueFRITZ! devices

None of the BlueFRITZ! devices with manufacurer ID 31 (AVM Berlin)
support HCI_Read_Local_Supported_Commands. It is safe to use the
manufacturer ID (instead of e.g. a USB ID specific quirk) because the
company never created any newer controllers.

Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
---
 net/bluetooth/hci_core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index dc34bfa..d651aa7 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -513,7 +513,10 @@ static void hci_init2_req(struct hci_request *req, unsigned long opt)
 
 	hci_setup_event_mask(req);
 
-	if (hdev->hci_ver > BLUETOOTH_VER_1_1)
+	/* AVM Berlin (31), aka "BlueFRITZ!", doesn't support the read
+	 * local supported commands HCI command.
+	 */
+	if (hdev->manufacturer != 31 && hdev->hci_ver > BLUETOOTH_VER_1_1)
 		hci_req_add(req, HCI_OP_READ_LOCAL_COMMANDS, 0, NULL);
 
 	if (lmp_ssp_capable(hdev)) {
-- 
1.8.3.2


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux