From: <Mario_Limonciello@Dell.com>
To: <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] Add HID->HCI switching support for newer Dell BT cards
Date: Fri, 4 Apr 2008 15:46:38 -0500 [thread overview]
Message-ID: <1207341998.32219.1.camel@mlimonciello> (raw)
In-Reply-To: <1207335282.19116.5.camel@mlimonciello>
[-- Attachment #1.1.1.1: Type: text/plain, Size: 1335 bytes --]
Hi,
As it turns out, this also works for the Dell 410 series cards.
Attached is an updated patch to include them.
Regards,
On Fri, 2008-04-04 at 13:54 -0500, Mario Limonciello wrote:
> Hello,
>
> As I've recently discovered, the more recent (Dell Wireless 370+) BT
> adapters with the latest firmware don't come up in Bluetooth Radio
> mode. They come up in a HID/UHE dongle like mode before the OS loads
> and expect the OS to transition the device to HCI mode.
> Unfortunately, the transition to HCI mode isn't done in the same
> fashion as the existing switch_hidproxy function available in hid2hci.
> I'm attaching a patch to hid2hci that adds a function for the expected
> behavior on these newer adapters.
>
> The device that needs to have the report sent to it is claimed by
> usbhid at OS load time, so there are some calls in there to release it
> from usbhid.
>
> I tested this against a Dell 370 BT adapter. This should be the same
> for the newer adapters (after the 370), but I haven't verified them
> yet, so there may be an additional patch needed for it.
>
> Thanks,
>
> ---
> Mario Limonciello
> Dell | Linux Engineering
> mario_limonciello@dell.com
>
>
>
---
Mario Limonciello
Dell | Linux Engineering
Desk : (512) 723-0582
mario_limonciello@dell.com
[-- Attachment #1.1.1.2: Type: text/html, Size: 2640 bytes --]
[-- Attachment #1.1.2: 007_dell_bluetooth.patch --]
[-- Type: text/x-patch, Size: 1541 bytes --]
diff -Nur -x '*.orig' -x '*~' bluez-utils-3.26/tools/hid2hci.c bluez-utils-3.26.new/tools/hid2hci.c
--- bluez-utils-3.26/tools/hid2hci.c 2008-02-01 17:16:34.000000000 -0600
+++ bluez-utils-3.26.new/tools/hid2hci.c 2008-04-04 15:39:40.000000000 -0500
@@ -211,6 +211,42 @@
return err;
}
+static int switch_dell(struct device_info *devinfo)
+{
+ char report[] = { 0x7F, 0x13, 0x00, 0x00};
+
+ struct usb_dev_handle *handle;
+ int err;
+
+ //release any locks that the kernel may have on this device
+ handle = usb_open(devinfo->dev);
+ if (handle)
+ {
+ usb_claim_interface(handle, 0);
+ usb_detach_kernel_driver_np(handle,0);
+ }
+
+ //switch device modes
+ err = usb_control_msg(handle,
+ USB_ENDPOINT_OUT + USB_TYPE_CLASS + USB_RECIP_INTERFACE,
+ 0x09,
+ 0x7f + (0x03 << 8),
+ 0,
+ (char*)report, 4, 10000);
+
+ if (err == 0) {
+ err = -1;
+ errno = EALREADY;
+ } else {
+ if (errno == ETIMEDOUT)
+ err = 0;
+ }
+
+ usb_close(handle);
+
+ return err;
+}
+
static struct device_id device_list[] = {
{ HCI, 0x0a12, 0x1000, switch_hidproxy },
{ HID, 0x0a12, 0x0001, switch_hidproxy },
@@ -229,6 +265,8 @@
{ HCI, 0x046d, 0xc70e, switch_logitech }, /* Logitech diNovo keyboard */
{ HCI, 0x046d, 0xc713, switch_logitech }, /* Logitech diNovo Edge */
{ HCI, 0x046d, 0xc714, switch_logitech }, /* Logitech diNovo Edge */
+ { HCI, 0x413c, 0x8158, switch_dell }, /* Dell Wireless 370 */
+ { HCI, 0x413c, 0x8154, switch_dell }, /* Dell Wireless 410 */
{ -1 }
};
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 278 bytes --]
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2008-04-04 20:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-04 18:54 [Bluez-devel] [PATCH] Add HID->HCI switching support for newer Dell BT cards Mario_Limonciello
2008-04-04 20:46 ` Mario_Limonciello [this message]
2008-04-04 23:17 ` Bastien Nocera
2008-04-05 15:58 ` [Bluez-devel] [PATCH] Add HID->HCI switching support fornewer " Mario_Limonciello
2008-04-06 22:42 ` Bastien Nocera
2008-04-07 0:58 ` [Bluez-devel] [PATCH] Add HID->HCI switching supportfornewer " Mario_Limonciello
2008-04-13 16:34 ` [Bluez-devel] [PATCH] Add HID->HCI switchingsupportfornewer " Mario_Limonciello
2008-04-21 16:36 ` [Bluez-devel] [PATCH] Add HID->HCIswitchingsupportfornewer " Mario_Limonciello
2008-05-09 9:40 ` Marcel Holtmann
2008-05-10 18:23 ` [Bluez-devel] [PATCH] Add HID->HCIswitchingsupportfornewer DellBT cards Mario_Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1207341998.32219.1.camel@mlimonciello \
--to=mario_limonciello@dell.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox