* >net-wireless/bluez-4.63 unable to connect audio streams due commit
From: Pacho Ramos @ 2010-09-20 18:13 UTC (permalink / raw)
To: linux-bluetooth
[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]
Hello
This is an "old" issue that was reported downstream some time ago at:
http://bugs.gentoo.org/show_bug.cgi?id=327705
Getting errors like:
bluetoothd[23165]: State
changed /org/bluez/23165/hci0/dev_00_19_7F_1B_E8_BE: \
HEADSET_STATE_DISCONNECTED -> HEADSET_STATE_CONNECTING
bluetoothd[23165]: \
link_key_request (sba=00:19:86:00:10:FE, dba=00:19:7F:1B:E8:BE)
bluetoothd[23165]: \
kernel auth requirements = 0x00 bluetoothd[23165]: stored link key type
= 0x00
bluetoothd[23165]: adapter_get_device(00:19:7F:1B:E8:BE)
bluetoothd[23165]: Discovered Handsfree service on channel 1
bluetoothd[23165]: /org/bluez/23165/hci0/dev_00_19_7F_1B_E8_BE:
Connecting to \
00:19:7F:1B:E8:BE channel 1 bluetoothd[23165]:
hcid_dbus_bonding_process_complete: \
status=00 bluetoothd[23165]: adapter_get_device(00:19:7F:1B:E8:BE)
bluetoothd[23165]: hcid_dbus_bonding_process_complete: no pending auth
request # Here \
is really long pause, 1-2 seconds bluetoothd[23165]: Function not
implemented (38)
bluetoothd[23165]: State
changed /org/bluez/23165/hci0/dev_00_19_7F_1B_E8_BE: \
HEADSET_STATE_CONNECTING -> HEADSET_STATE_DISCONNECTED
Reporter found that the problem with his dongle was introduced in commit
aee26b30bbc24cde464ba1a557c2b258ddec6432 "Make BtIO default security
level MEDIUM", he asked here, on upstream mailing list, but didn't get
any reply clarifying this:
http://marc.info/?l=linux-bluetooth&m=127893935109510&w=2
Thanks a lot for your help :-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: [PATCH 3/3] Add hcimgmt command line test tool
From: Johan Hedberg @ 2010-09-20 13:28 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <AANLkTi=xM5RSqZJ=bG-PfphpZ8awYKjSY+sB3ey4eu_P@mail.gmail.com>
Hi Anderson,
On Mon, Sep 20, 2010, Anderson Lizardo wrote:
> On Mon, Sep 20, 2010 at 7:07 AM, <johan.hedberg@gmail.com> wrote:
> > +static void usage(void)
> > +{
> > + int i;
> > +
> > + printf("hcictl - HCI Control ver %s\n", VERSION);
>
> hcictl -> hcimgmt
Thanks. I used to call the interface "HCI Control interface" originally
and have forgotten to change all places to match the new "Management"
term.
Johan
^ permalink raw reply
* Re: [PATCH 3/3] Add hcimgmt command line test tool
From: Anderson Lizardo @ 2010-09-20 13:13 UTC (permalink / raw)
To: johan.hedberg; +Cc: linux-bluetooth, Johan Hedberg
In-Reply-To: <1284980866-3974-4-git-send-email-johan.hedberg@gmail.com>
On Mon, Sep 20, 2010 at 7:07 AM, <johan.hedberg@gmail.com> wrote:
> +static void usage(void)
> +{
> + int i;
> +
> + printf("hcictl - HCI Control ver %s\n", VERSION);
hcictl -> hcimgmt
> + printf("Usage:\n"
> + "\thcictl [options] <command> [command parameters]\n");
> + printf("Options:\n"
> + "\t--help\tDisplay help\n"
> + "\t-i dev\tHCI device\n");
> + printf("Commands:\n");
> + for (i = 0; command[i].cmd; i++)
> + printf("\t%-4s\t%s\n", command[i].cmd,
> + command[i].doc);
> + printf("\n"
> + "For more information on the usage of each command use:\n"
> + "\thcictl <command> --help\n" );
> +}
--
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
^ permalink raw reply
* Re: [PATCH 2/2] Fix potential NULL pointer access in MCAP CSP code
From: Johan Hedberg @ 2010-09-20 11:17 UTC (permalink / raw)
To: Santiago Carot-Nemesio; +Cc: linux-bluetooth
In-Reply-To: <1284971729-20509-2-git-send-email-sancane@gmail.com>
Hi,
On Mon, Sep 20, 2010, Santiago Carot-Nemesio wrote:
> NULL pointer acces may hapen when an attemp to send a
> synchronization command happens over a closed MCL.
> ---
> health/mcap_sync.c | 43 ++++++++++++++++++++++---------------------
> 1 files changed, 22 insertions(+), 21 deletions(-)
Thanks. This patch is also now upstream.
Johan
^ permalink raw reply
* Re: [PATCH 1/2] Fix minor coding style issues in MCAP CSP code
From: Johan Hedberg @ 2010-09-20 11:16 UTC (permalink / raw)
To: Santiago Carot-Nemesio; +Cc: linux-bluetooth
In-Reply-To: <1284971729-20509-1-git-send-email-sancane@gmail.com>
Hi,
On Mon, Sep 20, 2010, Santiago Carot-Nemesio wrote:
> ---
> health/mcap_sync.c | 22 +++++++++-------------
> 1 files changed, 9 insertions(+), 13 deletions(-)
Thanks for the patch. It's now upstream.
Johan
^ permalink raw reply
* [PATCH 3/3] Add hcimgmt command line test tool
From: johan.hedberg @ 2010-09-20 11:07 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Johan Hedberg
In-Reply-To: <1284980866-3974-1-git-send-email-johan.hedberg@gmail.com>
From: Johan Hedberg <johan.hedberg@nokia.com>
---
Makefile.tools | 5 +-
tools/hcimgmt.c | 413 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 417 insertions(+), 1 deletions(-)
create mode 100644 tools/hcimgmt.c
diff --git a/Makefile.tools b/Makefile.tools
index 405a42b..f354a8c 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -5,7 +5,7 @@ conf_DATA += tools/rfcomm.conf
endif
bin_PROGRAMS += tools/rfcomm tools/l2ping \
- tools/hcitool tools/sdptool tools/ciptool
+ tools/hcitool tools/sdptool tools/ciptool tools/hcimgmt
sbin_PROGRAMS += tools/hciattach tools/hciconfig
@@ -36,6 +36,9 @@ tools_hcitool_SOURCES = tools/hcitool.c src/oui.h src/oui.c \
src/textfile.h src/textfile.c
tools_hcitool_LDADD = lib/libbluetooth.la
+tools_hcimgmt_SOURCES = tools/hcimgmt.c
+tools_hcimgmt_LDADD = lib/libbluetooth.la
+
tools_sdptool_SOURCES = tools/sdptool.c src/sdp-xml.h src/sdp-xml.c
tools_sdptool_LDADD = lib/libbluetooth.la
diff --git a/tools/hcimgmt.c b/tools/hcimgmt.c
new file mode 100644
index 0000000..5276e2f
--- /dev/null
+++ b/tools/hcimgmt.c
@@ -0,0 +1,413 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2010 Nokia Corporation
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <getopt.h>
+#include <sys/param.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/hci.h>
+#include <bluetooth/hci_lib.h>
+
+#define HCI_MGMT_BUF_SIZE 1024
+
+#define for_each_opt(opt, long, short) while ((opt=getopt_long(argc, argv, short ? short:"+", long, NULL)) != -1)
+
+static void usage(void);
+
+/* Display local devices */
+
+static struct option dev_options[] = {
+ { "help", 0, 0, 'h' },
+ {0, 0, 0, 0 }
+};
+
+static int hci_open_channel(int dev_id, unsigned short channel)
+{
+ struct sockaddr_hci a;
+ int dd, err;
+
+ /* Create HCI socket */
+ dd = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
+ if (dd < 0)
+ return -errno;
+
+ /* Bind socket to the HCI device */
+ memset(&a, 0, sizeof(a));
+ a.hci_family = AF_BLUETOOTH;
+ a.hci_dev = dev_id;
+ a.hci_channel = channel;
+ if (bind(dd, (struct sockaddr *) &a, sizeof(a)) < 0) {
+ err = -errno;
+ goto fail;
+ }
+
+ return dd;
+
+fail:
+ close(dd);
+ return err;
+}
+
+static ssize_t hci_mgmt_cmd(int dd, uint16_t opcode, void *data, uint16_t len,
+ uint16_t rsp_ev, void *rsp, uint16_t rsp_len)
+{
+ ssize_t ret;
+ size_t copied;
+ struct hci_mgmt_hdr hdr = { htobs(opcode), htobs(len) };
+ char buf[HCI_MGMT_BUF_SIZE];
+
+ memcpy(buf, &hdr, sizeof(hdr));
+ memcpy(buf + sizeof(hdr), data, len);
+
+ ret = write(dd, buf, sizeof(hdr) + len);
+ if (ret < 0)
+ return -errno;
+
+ ret = read(dd, buf, sizeof(buf));
+ if (ret < 0)
+ return -errno;
+
+ if (ret < (ssize_t) sizeof(struct hci_mgmt_hdr)) {
+ fprintf(stderr,
+ "ret (%zd) != sizeof(struct hci_mgmt_hdr) (%zu)\n",
+ ret, sizeof(struct hci_mgmt_hdr));
+ return -EIO;
+ }
+
+ memcpy(&hdr, buf, sizeof(hdr));
+
+ if (btohs(hdr.len) != ret - sizeof(hdr)) {
+ fprintf(stderr, "hdr.len (%u) != ret - sizeof(hdr) (%zu)\n",
+ btohs(hdr.len), ret - sizeof(hdr));
+ return -EIO;
+ }
+
+ if (btohs(hdr.opcode) != rsp_ev) {
+ fprintf(stderr, "hdr.opcode (%u) != rsp_ev (%u)\n",
+ btohs(hdr.opcode), rsp_ev);
+ return -EIO;
+ }
+
+ copied = rsp_len < btohs(hdr.len) ? rsp_len : btohs(hdr.len);
+
+ memcpy(rsp, buf + sizeof(hdr), copied);
+
+ return copied;
+}
+
+static void print_bytes(uint8_t *bytes, size_t count)
+{
+ size_t i;
+
+ for (i = 0; i < count; i++)
+ printf("%02x ", bytes[i]);
+}
+
+static void cmd_features(int dev_id, int argc, char **argv)
+{
+ int dd;
+ ssize_t ret;
+ uint8_t features[8];
+ uint16_t opcode;
+ char buf[HCI_MGMT_BUF_SIZE], *ptr = buf;
+
+ dd = hci_open_channel(HCI_DEV_NONE, HCI_CHANNEL_CONTROL);
+ if (dd < 0) {
+ perror("HCI Control socket open failed");
+ exit(1);
+ }
+
+ ret = hci_mgmt_cmd(dd, HCI_MGMT_OP_READ_FEATURES, NULL, 0,
+ HCI_MGMT_EV_CMD_COMPLETE, buf, sizeof(buf));
+ if (ret < 0) {
+ fprintf(stderr, "Command failed: %s (%zd)\n",
+ strerror(-ret), -ret);
+ exit(1);
+ }
+
+ if (ret != 10) {
+ fprintf(stderr, "Too short response\n");
+ exit(1);
+ }
+
+ memcpy(&opcode, ptr, 2);
+ ptr += 2;
+
+ memcpy(features, ptr, 8);
+ ptr += 8;
+
+ printf("HCI Control API features: ");
+ print_bytes(features, 8);
+ printf("\n");
+}
+
+static void cmd_version(int dev_id, int argc, char **argv)
+{
+ int dd;
+ ssize_t ret;
+ uint8_t version;
+ uint16_t revision, opcode;
+ char buf[HCI_MGMT_BUF_SIZE], *ptr = buf;
+
+ dd = hci_open_channel(HCI_DEV_NONE, HCI_CHANNEL_CONTROL);
+ if (dd < 0) {
+ perror("HCI Control socket open failed");
+ exit(1);
+ }
+
+ ret = hci_mgmt_cmd(dd, HCI_MGMT_OP_READ_VERSION, NULL, 0,
+ HCI_MGMT_EV_CMD_COMPLETE, buf, sizeof(buf));
+ if (ret < 0) {
+ fprintf(stderr, "Command failed: %s (%zd)\n",
+ strerror(-ret), -ret);
+ exit(1);
+ }
+
+ if (ret != 5) {
+ fprintf(stderr, "Too short response\n");
+ exit(1);
+ }
+
+ memcpy(&opcode, ptr, 2);
+ ptr += 2;
+
+ version = *ptr++;
+
+ memcpy(&revision, ptr, 2);
+ ptr += 2;
+
+
+ printf("HCI Control API version %u.%u\n", version, btohs(revision));
+}
+
+static const char *dev_help =
+ "Usage:\n"
+ "\tdev\n";
+
+static void cmd_dev(int dev_id, int argc, char **argv)
+{
+ int opt, dd, i;
+ ssize_t ret;
+ uint16_t count, opcode;
+ char buf[HCI_MGMT_BUF_SIZE], *ptr = buf;
+
+ for_each_opt(opt, dev_options, NULL) {
+ switch (opt) {
+ default:
+ printf("%s", dev_help);
+ return;
+ }
+ }
+
+ dd = hci_open_channel(HCI_DEV_NONE, HCI_CHANNEL_CONTROL);
+ if (dd < 0) {
+ perror("HCI Control socket open failed");
+ exit(1);
+ }
+
+ ret = hci_mgmt_cmd(dd, HCI_MGMT_OP_READ_INDEX_LIST, NULL, 0,
+ HCI_MGMT_EV_CMD_COMPLETE, buf, sizeof(buf));
+ if (ret < 0) {
+ fprintf(stderr, "Failed\n");
+ exit(1);
+ }
+
+ if (ret < 4) {
+ fprintf(stderr, "Too short response\n");
+ exit(1);
+ }
+
+ memcpy(&opcode, ptr, 2);
+ ptr += 2;
+
+ memcpy(&count, ptr, 2);
+ ptr += 2;
+
+ printf("Devices:\n\t");
+
+ for (i = 0; i < count; i++, ptr += 2) {
+ uint16_t index;
+ memcpy(&index, ptr, 2);
+ printf("hci%u ", btohs(index));
+ }
+
+ printf("\n");
+}
+
+static void cmd_info(int dev_id, int argc, char **argv)
+{
+ int dd;
+ ssize_t ret;
+ uint8_t features[8], type, status;
+ char buf[HCI_MGMT_BUF_SIZE], *ptr = buf, addr[18];
+ uint16_t id, opcode;
+ bdaddr_t bdaddr;
+
+ dd = hci_open_channel(HCI_DEV_NONE, HCI_CHANNEL_CONTROL);
+ if (dd < 0) {
+ perror("HCI Control socket open failed");
+ exit(1);
+ }
+
+ if (dev_id < 0) {
+ dev_id = hci_get_route(NULL);
+ if (dev_id < 0) {
+ perror("Device is not available");
+ exit(1);
+ }
+ }
+
+ id = (uint16_t) dev_id;
+
+ ret = hci_mgmt_cmd(dd, HCI_MGMT_OP_READ_INFO, &id, sizeof(id),
+ HCI_MGMT_EV_CMD_COMPLETE, buf, sizeof(buf));
+ if (ret < 0) {
+ fprintf(stderr, "Command failed: %s (%zd)\n",
+ strerror(-ret), -ret);
+ exit(1);
+ }
+
+ if (ret != 20) {
+ fprintf(stderr, "Unexpected response length (%zd)\n", ret);
+ exit(1);
+ }
+
+ memcpy(&opcode, ptr, 2);
+ ptr += 2;
+
+ status = *ptr;
+ ptr++;
+
+ memcpy(&id, ptr, 2);
+ ptr += 2;
+
+ type = *ptr;
+ ptr++;
+
+ bacpy(&bdaddr, (bdaddr_t *) ptr);
+ ptr += sizeof(bdaddr);
+
+ memcpy(features, ptr, 8);
+ ptr += 8;
+
+ ba2str(&bdaddr, addr);
+
+ printf("hci%u type %u addr %s features ", btohs(id), type, addr);
+ print_bytes(features, 8);
+ printf("\n");
+}
+
+static struct {
+ char *cmd;
+ void (*func)(int dev_id, int argc, char **argv);
+ char *doc;
+} command[] = {
+ { "dev", cmd_dev, "Display local devices" },
+ { "version", cmd_version, "Display version" },
+ { "features", cmd_features, "Control API features" },
+ { "info", cmd_info, "Read controller info" },
+ { NULL, NULL, 0 }
+};
+
+static void usage(void)
+{
+ int i;
+
+ printf("hcictl - HCI Control ver %s\n", VERSION);
+ printf("Usage:\n"
+ "\thcictl [options] <command> [command parameters]\n");
+ printf("Options:\n"
+ "\t--help\tDisplay help\n"
+ "\t-i dev\tHCI device\n");
+ printf("Commands:\n");
+ for (i = 0; command[i].cmd; i++)
+ printf("\t%-4s\t%s\n", command[i].cmd,
+ command[i].doc);
+ printf("\n"
+ "For more information on the usage of each command use:\n"
+ "\thcictl <command> --help\n" );
+}
+
+static struct option main_options[] = {
+ { "help", 0, 0, 'h' },
+ { "device", 1, 0, 'i' },
+ { 0, 0, 0, 0 }
+};
+
+int main(int argc, char *argv[])
+{
+ int opt, i, dev_id = -1;
+ bdaddr_t ba;
+
+ while ((opt=getopt_long(argc, argv, "+i:h", main_options, NULL)) != -1) {
+ switch (opt) {
+ case 'i':
+ dev_id = hci_devid(optarg);
+ if (dev_id < 0) {
+ perror("Invalid device");
+ exit(1);
+ }
+ break;
+
+ case 'h':
+ default:
+ usage();
+ exit(0);
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+ optind = 0;
+
+ if (argc < 1) {
+ usage();
+ exit(0);
+ }
+
+ if (dev_id != -1 && hci_devba(dev_id, &ba) < 0) {
+ perror("Device is not available");
+ exit(1);
+ }
+
+ for (i = 0; command[i].cmd; i++) {
+ if (strncmp(command[i].cmd, argv[0], 3))
+ continue;
+ command[i].func(dev_id, argc, argv);
+ break;
+ }
+ return 0;
+}
--
1.7.0.4
^ permalink raw reply related
* [PATCH 2/3] Add initial definitions for Bluetooth Management API
From: johan.hedberg @ 2010-09-20 11:07 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Johan Hedberg
In-Reply-To: <1284980866-3974-1-git-send-email-johan.hedberg@gmail.com>
From: Johan Hedberg <johan.hedberg@nokia.com>
---
lib/hci.h | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/lib/hci.h b/lib/hci.h
index 512dab9..1ac153f 100644
--- a/lib/hci.h
+++ b/lib/hci.h
@@ -2232,6 +2232,24 @@ typedef struct {
#endif /* _NO_HCI_DEFS */
+struct hci_mgmt_hdr {
+ uint16_t opcode;
+ uint16_t len;
+} __packed;
+#define HCI_MGMT_HDR_SIZE 4
+
+#define HCI_MGMT_OP_READ_VERSION 0x0001
+#define HCI_MGMT_OP_READ_FEATURES 0x0002
+#define HCI_MGMT_OP_READ_INDEX_LIST 0x0003
+#define HCI_MGMT_OP_READ_INFO 0x0004
+#define HCI_MGMT_OP_READ_STATISTICS 0x0005
+#define HCI_MGMT_OP_READ_MODE 0x0006
+#define HCI_MGMT_OP_WRITE_MODE 0x0007
+
+#define HCI_MGMT_EV_CMD_COMPLETE 0x0001
+#define HCI_MGMT_EV_CMD_STATUS 0x0002
+#define HCI_MGMT_EV_CONTROLLER_ERROR 0x0003
+
/* HCI Socket options */
#define HCI_DATA_DIR 1
#define HCI_FILTER 2
@@ -2244,9 +2262,12 @@ typedef struct {
struct sockaddr_hci {
sa_family_t hci_family;
unsigned short hci_dev;
+ unsigned short hci_channel;
};
#define HCI_DEV_NONE 0xffff
+#define HCI_CHANNEL_CONTROL 1
+
struct hci_filter {
uint32_t type_mask;
uint32_t event_mask[2];
--
1.7.0.4
^ permalink raw reply related
* [PATCH 1/3] Add initial Bluetooth Management API doc
From: johan.hedberg @ 2010-09-20 11:07 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Johan Hedberg
In-Reply-To: <1284980866-3974-1-git-send-email-johan.hedberg@gmail.com>
From: Johan Hedberg <johan.hedberg@nokia.com>
---
doc/mgmt-api.txt | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 178 insertions(+), 0 deletions(-)
create mode 100644 doc/mgmt-api.txt
diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
new file mode 100644
index 0000000..9281103
--- /dev/null
+++ b/doc/mgmt-api.txt
@@ -0,0 +1,178 @@
+Bluetooth Management API
+*************************
+
+Copyright (C) 2008-2009 Marcel Holtmann <marcel@holtmann.org>
+
+
+Packet Structures
+=================
+
+ Commands:
+
+ 0 4 8 12 16 202 24 28 31
+ +-------------------------------+-----------------------------+
+ | Command Code | Parameter Total Length |
+ +-------------------------------+-----------------------------+
+ | |
+
+ Events:
+
+ 0 4 8 12 16 202 24 28 31
+ +-------------------------------+-----------------------------+
+ | Event Code | Parameter Total Length |
+ +-------------------------------+-----------------------------+
+ | |
+
+
+Read Management Version Information Command
+===========================================
+
+ Command Code: 0x0001
+ Command Parameters:
+ Return Parameters: Status (1 Octet)
+ Version (1 Octets
+ Revision (2 Octets)
+
+Read Management Supported Features Command
+==========================================
+
+ Command Code: 0x0002
+ Command Parameters:
+ Return Parameters: Status (1 Octet)
+ Features (8 Octets)
+
+ Feature Bit 0: Controller Support
+ Feature Bit 1: Tracing Support
+
+Read Controller Index List Command
+==================================
+
+ Command Code: 0x0003
+ Command Parameters:
+ Return Paramters: Status (1 Octet)
+ Num_Controllers (2 Octets)
+ Controller_Index[i] (2 Octets)
+
+Read Controller Information Command
+===================================
+
+ Command Code: 0x0004
+ Command Parameters: Controller_Index (2 Octets)
+ Return Parameters: Status (1 Octet)
+ Controller_Index (2 Octets)
+ Controller_Type (1 Octet)
+ BD_ADDR (6 Octets)
+ Supported_Features (8 Octets)
+
+ Controller_Type:0x00 Reserved
+ 0x01 Bluetooth (BR/EDR)
+ 0x02 802.11 (AMP)
+
+Read Controller Statistics Command
+==================================
+
+ Command Code: 0x0005
+ Command Parameters: Controller_Index (2 Octets)
+ Return Paramters: Status (1 Octet)
+ Controller_Index (2 Octets)
+ ....
+
+Read Controller Mode Command
+============================
+
+ Command Code: 0x0006
+ Command Parameters: Controller_Index (2 Octets)
+ Return Paramters: Status (1 Octect)
+ Controller_Index (2 Octets)
+ Enabled (1 Octet)
+ Mode (1 Octet)
+
+ Enabled: 0x00 Powered off
+ 0x01 Controller Enabled
+
+ Mode: 0x00 Reserved
+ 0x01 Connectable (pairing forbidden)
+ 0x02 Connectable (pairing allowed)
+ 0x03 Discoverable (pairing forbidden)
+ 0x04 Discoverable (pairing allowed)
+
+Write Controller Mode Command
+=============================
+
+ Command Code: 0x0007
+ Command Parameters: Controller_Index (2 Octets)
+ ...
+ Return Parameters: Status (1 Octet)
+ Controller_Index (2 Octets)
+
+
+Read Tracing Buffer Size Command
+================================
+
+ Command Code: 0x0004
+ Command Parameters:
+ Return Parameters: Status (1 Octet)
+ Buffer_Size (2 Octets)
+
+ Buffer Size in Kilobytes
+
+Write Tracing Buffer Size Command
+=================================
+
+ Command Code: 0x0005
+ Command Parameters: Buffer_Size (2 Octets)
+ Return Parameters: Status (1 Octet)
+
+ Buffer Size in Kilobytes
+
+Read Controller Tracing Filter Command
+=======================================
+
+ Command Code: 0x0011
+ Command Parameters: Controller_Index (2 Octects)
+ Return Parameters: Status (1 Octet)
+ Controller_Index (2 Octets)
+ Tracing_Enable (1 Octect)
+ Num_Filters (2 Octect)
+ Protocol_UUID[i] (16 Octets)
+ Protocol_Identifier[i] (16 Octets)
+
+ Tracing_Enable: 0x00 Tracing disabled
+ 0x01 Command and Event tracing
+ 0x02 Command, Event and ACL tracing
+ 0x03 Command, Event, ACL and SCO tracing
+
+Write Controller Tracing Filter Command
+=======================================
+
+ Command Code: 0x0012 (Group 0x0)
+ Command Parameters: Controller_Index (2 Octects)
+ Tracing_Enable (1 Octect)
+ Num_Filters (2 Octect)
+ Protocol_UUID[i] (16 Octets)
+ Protocol_Identifier[i] (16 Octets)
+ Return Paramters: Status (1 Octet)
+ Controller_Index (2 Octets)
+
+
+
+Command Complete Event
+======================
+
+Event Code 0x0001
+Event Parameters Command_Opcode
+ Return_Parameters
+
+
+Command Status Event
+====================
+
+Event Code 0x0002
+Event Parameters Status
+ Command_Opcode
+
+Controller Error Event
+======================
+
+Event Code 0x0003
+Event Parameters Error_Code
--
1.7.0.4
^ permalink raw reply related
* [RFC] Bluetooth Management Interface
From: johan.hedberg @ 2010-09-20 11:07 UTC (permalink / raw)
To: linux-bluetooth
Hi,
Here's a initial set of patches to get the Bluetooth Management
interface work started. As I've mentioned in previous emails the idea of
this interface is to replace all current HCI level access in bluetoothd.
Many things, e.g. SSP logic and name resolving, will be moved to the
kernel side so there wont be a one-to-one mapping from the new
interface to the current HCI messages that bluetoothd handles.
The patches here just add the initial header file definitions and a
command line test tool. The kernel side patches can be found from my
kernel.org git tree:
http://git.kernel.org/?p=linux/kernel/git/jh/linux-2.6.git;a=summary
Access to the new kernel interface is done with the help of a new
hci_channel member of the HCI socket address. Only channel 1 is defined
for now for the new messages, but I've understood Marcel has plans to
enable some sort of special tracing support through a second channel.
Messages with hci_channel == 1 from userspace get routed to the
callbacks defined in net/bluetooth/hci_mgmt.c.
So far I haven't made many changes to the initial draft API doc from
Marcel (doc/mgmt-api.txt). The general idea is to try to mimic standard
HCI messaging concepts whenever possible. One of the changes that I did
do is removal of the Num_Command_Packets parameters from the command
status and command complete events since I don't think it makes sense to
require userspace to do command queuing.
Next steps that need to be done for bluetoothd:
- Move all HCI socket access to hciops.c
- All ioctl and hci_* calls
- HCI event processing (mostly src/security.c)
- Create a new mgmtops.c for the new API which can ultimately replace
hciops.c
- Figure out exactly which features are needed in the new API and fill
in doc/mgmt-api.txt accordingly.
Next steps for the kernel side:
- Define structs for each message. Not sure if this is needed/wanted but
it would surely improve the readability of the current code that
accesses the byte array directly. Since the new protocol and the
format of the messages is still largely open I haven't bothered with
these structs yet.
- Implement handling of events (right now only commands and direct
responses to them are supported)
- Implement handling of commands that require sleeping (currently all
implemented commands imediately write the response to the socket)
Any feedback is welcome about these plans and the code. It's my first
attempt at more serious kernel side coding so there might well be issues
needing fixing/polishing in the code.
Johan
^ permalink raw reply
* Re: [PATCH] Bluetooth: Replace hard code of fixed channels bit mask
From: Ville Tervo @ 2010-09-20 9:19 UTC (permalink / raw)
To: ext haijun liu
Cc: ext Gustavo F. Padovan, linux-bluetooth@vger.kernel.org,
Mat Martineau, dantian.ip
In-Reply-To: <AANLkTi=L3TC8Hy29xjDH-0aCMQ9RiLZ_-JtNfno97cas@mail.gmail.com>
On Fri, Sep 17, 2010 at 01:39:30PM +0200, ext haijun liu wrote:
> Hi Ville,
>
> On Fri, Sep 17, 2010 at 4:50 PM, Ville Tervo <ville.tervo@nokia.com> wrote:
> > Hi Gustavo,
> >
> > On Thu, Sep 16, 2010 at 04:16:54PM +0200, ext Gustavo F. Padovan wrote:
> >> Hi Haijun,
> >>
> >> * haijun liu <liuhaijun.er@gmail.com> [2010-09-16 15:15:18 +0800]:
> >>
> >> > This patch add fixed channels bit mask definition for
> >> > L2CAP_FIXCHAN_NULLID
> >> > L2CAP_FIXCHAN_SIGNAL
> >> > L2CAP_FIXCHAN_CONNLESS
> >> > L2CAP_FIXCHAN_A2MP
> >> > And replace hard code in source file with the macro.
> >> >
> >> > Signed-off-by: Haijun.Liu <Haijun.Liu@Atheros.com>
> >> > ---
> >> > include/net/bluetooth/l2cap.h | 6 ++++++
> >> > net/bluetooth/l2cap.c | 2 +-
> >> > 2 files changed, 7 insertions(+), 1 deletions(-)
> >> >
> >> > diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> >> > index 6c24144..e4fe2c7 100644
> >> > --- a/include/net/bluetooth/l2cap.h
> >> > +++ b/include/net/bluetooth/l2cap.h
> >> > @@ -97,6 +97,12 @@ struct l2cap_conninfo {
> >> > #define L2CAP_FEAT_FCS 0x00000020
> >> > #define L2CAP_FEAT_FIXED_CHAN 0x00000080
> >> >
> >> > +/* L2CAP fixed channel bitmask */
> >> > +#define L2CAP_FIXCHAN_NULLID 0x00
> >> > +#define L2CAP_FIXCHAN_SIGNAL 0x02
> >> > +#define L2CAP_FIXCHAN_CONNLESS 0x04
> >> > +#define L2CAP_FIXCHAN_A2MP 0x08
> >>
> >> That's wrong, signaling channel is 0x01, connless is 0x02 and A2MP is
> >> 0x03. And if you haven't noted we already have macros for the signaling
> >> and connectionless channels:
> >
> > But these are bit masks and looks ok to me except L2CAP_FIXCHAN_A2MP which I
> > could not find from the list.. Check Vol 3 Part A 4.13.
> >
> >> #define L2CAP_CID_SIGNALING 0x0001
> >> #define L2CAP_CID_CONN_LESS 0x0002
> >
> > These are channel ids.
> >
> >
> > --
> > Ville
> >
>
> A2MP means AMP Manager Protocol, it's from <<Core_V3.0 + HS.pdf>>
ok. I am a little bit lost with all AMP acromyns.
--
Ville
^ permalink raw reply
* [PATCH 2/2] Fix potential NULL pointer access in MCAP CSP code
From: Santiago Carot-Nemesio @ 2010-09-20 8:35 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Santiago Carot-Nemesio
In-Reply-To: <1284971729-20509-1-git-send-email-sancane@gmail.com>
NULL pointer acces may hapen when an attemp to send a
synchronization command happens over a closed MCL.
---
health/mcap_sync.c | 43 ++++++++++++++++++++++---------------------
1 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/health/mcap_sync.c b/health/mcap_sync.c
index ae7ab5b..260cd71 100644
--- a/health/mcap_sync.c
+++ b/health/mcap_sync.c
@@ -80,17 +80,27 @@ static inline uint64_t ntoh64(uint64_t n)
#define hton64(x) ntoh64(x)
+static int send_sync_cmd(struct mcap_mcl *mcl, const void *buf, uint32_t size)
+{
+ int sock;
+
+ if (mcl->cc == NULL)
+ return -1;
+
+ sock = g_io_channel_unix_get_fd(mcl->cc);
+ return mcap_send_data(sock, buf, size);
+}
+
static int send_unsupported_cap_req(struct mcap_mcl *mcl)
{
mcap_md_sync_cap_rsp *cmd;
- int sock, sent;
+ int sent;
cmd = g_new0(mcap_md_sync_cap_rsp, 1);
cmd->op = MCAP_MD_SYNC_CAP_RSP;
cmd->rc = MCAP_REQUEST_NOT_SUPPORTED;
- sock = g_io_channel_unix_get_fd(mcl->cc);
- sent = mcap_send_data(sock, cmd, sizeof(*cmd));
+ sent = send_sync_cmd(mcl, cmd, sizeof(*cmd));
g_free(cmd);
return sent;
@@ -99,14 +109,13 @@ static int send_unsupported_cap_req(struct mcap_mcl *mcl)
static int send_unsupported_set_req(struct mcap_mcl *mcl)
{
mcap_md_sync_set_rsp *cmd;
- int sock, sent;
+ int sent;
cmd = g_new0(mcap_md_sync_set_rsp, 1);
cmd->op = MCAP_MD_SYNC_SET_RSP;
cmd->rc = MCAP_REQUEST_NOT_SUPPORTED;
- sock = g_io_channel_unix_get_fd(mcl->cc);
- sent = mcap_send_data(sock, cmd, sizeof(*cmd));
+ sent = send_sync_cmd(mcl, cmd, sizeof(*cmd));
g_free(cmd);
return sent;
@@ -457,7 +466,6 @@ static int send_sync_cap_rsp(struct mcap_mcl *mcl, uint8_t rspcode,
{
mcap_md_sync_cap_rsp *rsp;
int sent;
- int sock;
rsp = g_new0(mcap_md_sync_cap_rsp, 1);
@@ -469,8 +477,7 @@ static int send_sync_cap_rsp(struct mcap_mcl *mcl, uint8_t rspcode,
rsp->timestnr = htons(tmstampres);
rsp->timestna = htons(tmstampacc);
- sock = g_io_channel_unix_get_fd(mcl->cc);
- sent = mcap_send_data(sock, rsp, sizeof(*rsp));
+ sent = send_sync_cmd(mcl, rsp, sizeof(*rsp));
g_free(rsp);
return sent;
@@ -519,7 +526,7 @@ static int send_sync_set_rsp(struct mcap_mcl *mcl, uint8_t rspcode,
uint16_t tmstampres)
{
mcap_md_sync_set_rsp *rsp;
- int sock, sent;
+ int sent;
rsp = g_new0(mcap_md_sync_set_rsp, 1);
@@ -529,8 +536,7 @@ static int send_sync_set_rsp(struct mcap_mcl *mcl, uint8_t rspcode,
rsp->timestst = hton64(timestamp);
rsp->timestsa = htons(tmstampres);
- sock = g_io_channel_unix_get_fd(mcl->cc);
- sent = mcap_send_data(sock, rsp, sizeof(*rsp));
+ sent = send_sync_cmd(mcl, rsp, sizeof(*rsp));
g_free(rsp);
return sent;
@@ -786,7 +792,7 @@ static gboolean sync_send_indication(gpointer user_data)
uint32_t btclock;
uint64_t tmstamp;
struct timespec base_time;
- int sock, sent;
+ int sent;
if (!user_data)
return FALSE;
@@ -803,8 +809,7 @@ static gboolean sync_send_indication(gpointer user_data)
cmd->timestst = hton64(tmstamp);
cmd->timestsa = htons(caps(mcl)->latency);
- sock = g_io_channel_unix_get_fd(mcl->cc);
- sent = mcap_send_data(sock, cmd, sizeof(*cmd));
+ sent = send_sync_cmd(mcl, cmd, sizeof(*cmd));
g_free(cmd);
return !sent;
@@ -940,7 +945,6 @@ void mcap_sync_cap_req(struct mcap_mcl *mcl, uint16_t reqacc,
{
struct mcap_sync_cap_cbdata *cbdata;
mcap_md_sync_cap_req *cmd;
- int sock;
if (!mcl->ms->csp_enabled || !mcl->csp) {
g_set_error(err,
@@ -969,8 +973,7 @@ void mcap_sync_cap_req(struct mcap_mcl *mcl, uint16_t reqacc,
cbdata->user_data = user_data;
mcl->csp->csp_priv_data = cbdata;
- sock = g_io_channel_unix_get_fd(mcl->cc);
- mcap_send_data(sock, cmd, sizeof(*cmd));
+ send_sync_cmd(mcl, cmd, sizeof(*cmd));
g_free(cmd);
}
@@ -981,7 +984,6 @@ void mcap_sync_set_req(struct mcap_mcl *mcl, uint8_t update, uint32_t btclock,
{
mcap_md_sync_set_req *cmd;
struct mcap_sync_set_cbdata *cbdata;
- int sock;
if (!mcl->ms->csp_enabled || !mcl->csp) {
g_set_error(err,
@@ -1022,8 +1024,7 @@ void mcap_sync_set_req(struct mcap_mcl *mcl, uint8_t update, uint32_t btclock,
cbdata->user_data = user_data;
mcl->csp->csp_priv_data = cbdata;
- sock = g_io_channel_unix_get_fd(mcl->cc);
- mcap_send_data(sock, cmd, sizeof(*cmd));
+ send_sync_cmd(mcl, cmd, sizeof(*cmd));
g_free(cmd);
}
--
1.7.0.4
^ permalink raw reply related
* [PATCH 1/2] Fix minor coding style issues in MCAP CSP code
From: Santiago Carot-Nemesio @ 2010-09-20 8:35 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Santiago Carot-Nemesio
---
health/mcap_sync.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/health/mcap_sync.c b/health/mcap_sync.c
index bc1ffcd..ae7ab5b 100644
--- a/health/mcap_sync.c
+++ b/health/mcap_sync.c
@@ -590,9 +590,9 @@ static void proc_sync_set_req(struct mcap_mcl *mcl, uint8_t *cmd, uint32_t len)
return;
}
- if (sched_btclock == MCAP_BTCLOCK_IMMEDIATE) {
+ if (sched_btclock == MCAP_BTCLOCK_IMMEDIATE)
phase2_delay = 0;
- } else {
+ else {
phase2_delay = btdiff(cur_btclock, sched_btclock);
if (phase2_delay < 0) {
@@ -631,9 +631,8 @@ static void proc_sync_set_req(struct mcap_mcl *mcl, uint8_t *cmd, uint32_t len)
}
DBG("CSP: indication every %dms", ind_freq);
- } else {
+ } else
ind_freq = 0;
- }
if (mcl->csp->ind_timer) {
/* Old indications are no longer sent */
@@ -661,14 +660,12 @@ static void proc_sync_set_req(struct mcap_mcl *mcl, uint8_t *cmd, uint32_t len)
mcl->csp->set_timer = g_timeout_add(when,
proc_sync_set_req_phase2,
mcl);
- } else {
+ } else
proc_sync_set_req_phase2(mcl);
- }
/* First indication is immediate */
- if (update) {
+ if (update)
sync_send_indication(mcl);
- }
}
static gboolean get_all_clocks(struct mcap_mcl *mcl, uint32_t *btclock,
@@ -749,11 +746,10 @@ static gboolean proc_sync_set_req_phase2(gpointer user_data)
if (delay >= 0 || ((new_tmstamp - delay) > 0)) {
new_tmstamp += delay;
DBG("CSP: reset w/ delay %dus, compensated",
- delay);
- } else {
+ delay);
+ } else
DBG("CSP: reset w/ delay %dus, uncompensated",
- delay);
- }
+ delay);
}
reset_tmstamp(mcl->csp, &base_time, new_tmstamp);
@@ -860,7 +856,7 @@ static void proc_sync_cap_rsp(struct mcap_mcl *mcl, uint8_t *cmd, uint32_t len)
mcl->csp->local_caps = TRUE;
cb(mcl, mcap_err, btclockres, synclead, tmstampres, tmstampacc, NULL,
- user_data);
+ user_data);
}
static void proc_sync_set_rsp(struct mcap_mcl *mcl, uint8_t *cmd, uint32_t len)
--
1.7.0.4
^ permalink raw reply related
* [PATCH 2/2] Bluetooth: Update conf_state before send config_req out.
From: haijun liu @ 2010-09-20 1:33 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org; +Cc: dantian.ip
Update conf_state with L2CAP_CONF_REQ_SENT before send config_req out.
Signed-off-by: Haijun.Liu <Haijun.Liu@Atheros.com>
---
net/bluetooth/l2cap.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 076d1af..9d1225d 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3164,6 +3164,7 @@ static inline int l2cap_config_req(struct
l2cap_conn *conn, struct l2cap_cmd_hdr
u8 buf[64];
+ l2cap_pi(sk)->conf_state |= L2CAP_CONF_REQ_SENT;
l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
l2cap_build_conf_req(sk, buf), buf);
l2cap_pi(sk)->num_conf_req++;
}
--
1.6.3.3
--
Haijun Liu
^ permalink raw reply related
* [PATCH 1/2] Bluetooth: Remove duplicate code.
From: haijun liu @ 2010-09-20 1:26 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org; +Cc: dantian.ip
Remove duplicate code, it's already in l2cap_send_disconn_req().
Signed-off-by: Haijun.Liu <Haijun.Liu@Atheros.com>
---
net/bluetooth/l2cap.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 725744b..076d1af 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3222,7 +3222,6 @@ static inline int l2cap_config_rsp(struct
l2cap_conn *conn, struct l2cap_cmd_hdr
}
default:
- sk->sk_err = ECONNRESET;
l2cap_sock_set_timer(sk, HZ * 5);
l2cap_send_disconn_req(conn, sk, ECONNRESET);
goto done;
--
1.6.3.3
--
Haijun Liu
^ permalink raw reply related
* Need complete docs on PAN and DUN with bluez 4.66
From: Mumia W @ 2010-09-19 21:49 UTC (permalink / raw)
To: linux-bluetooth
Where is the documentation on how to use PAN and DUN
with bluez 4.66 (without using the legacy drivers)?
--
^ permalink raw reply
* New Broadcom chip in W510
From: Lu Ran @ 2010-09-19 13:26 UTC (permalink / raw)
To: linux-bluetooth
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
Hi all,
I am having trouble to make my headset work in my new W510, it works fine in an
T61, with has almost identical software and setup with the new W510. The only
difference is I am now using a pure 64 bit system, while the old T61 is a 32
bit one, and the bluetooth chip is different. the id of the chip in T61 is
0A5C:2110, while W510 has a chip from Broadcom with id 0A5C:217F. I noticed
there is a SCO fix for 0A5C:2110 in btusb.c. I tried to copy the line and
change the id to 0A5C:217F, but nothing changes. The headset can pair with the
laptop with no problem, but there seems to be no data transmition. And I get a
lot error messages in dmesg output like this:
btusb_submit_isoc_urb: hci0 urb ffff880060136e00 submission failed (28)
and
btusb_send_frame: hci0 urb ffff8801320e1a00 submission failed
the output of "hciconfig hci0 version" is
hci0: Type: BR/EDR Bus: USB
BD Address: 70:F3:95:34:2F:29 ACL MTU: 1021:8 SCO MTU: 64:8
HCI Version: 2.1 (0x4) Revision: 0x168
LMP Version: 2.1 (0x4) Subversion: 0x4203
Manufacturer: Broadcom Corporation (15)
And the output of "lsusb -v" is in the attachment. I will try to provide any
other information you need to analyse the problem.
--
Best Regards,
LR
[-- Attachment #2: lsusb.txt --]
[-- Type: text/plain, Size: 50299 bytes --]
Bus 003 Device 002: ID 8087:0020
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x8087
idProduct 0x0020
bcdDevice 0.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 12
Hub Descriptor:
bLength 11
bDescriptorType 41
nNbrPorts 8
wHubCharacteristic 0x0089
Per-port power switching
Per-port overcurrent protection
TT think time 8 FS bits
Port indicators
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00 0x00
PortPwrCtrlMask 0xff 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Port 5: 0000.0100 power
Port 6: 0000.0100 power
Port 7: 0000.0100 power
Port 8: 0000.0100 power
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.34.6 ehci_hcd
iProduct 2 EHCI Host Controller
iSerial 1 0000:00:1d.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 3
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0503 highspeed power enable connect
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
Bus 002 Device 006: ID 17ef:480f Lenovo
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x17ef Lenovo
idProduct 0x480f
bcdDevice 23.45
iManufacturer 1 Chicony Electronics Co., Ltd.
iProduct 2 Integrated Camera
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 722
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 200mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 4 Integrated Camera
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 4 Integrated Camera
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.00
wTotalLength 78
dwClockFrequency 30.000000MHz
bInCollection 1
baInterfaceNr( 0) 1
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Camera Sensor
bAssocTerminal 4
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls 0x00040a04
Auto-Exposure Priority
Zoom (Absolute)
PanTilt (Absolute)
Privacy
VideoControl Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
Warning: Descriptor too short
bUnitID 2
bSourceID 1
wMaxMultiplier 0
bControlSize 2
bmControls 0x0000013f
Brightness
Contrast
Hue
Saturation
Sharpness
Gamma
Backlight Compensation
iProcessing 0
bmVideoStandards 0x1b
None
NTSC - 525/60
SECAM - 625/50
NTSC - 625/50
VideoControl Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 3
guidExtensionCode {0a3e1874-8254-1a48-b402-48b8b8c49cc8}
bNumControl 10
bNrPins 1
baSourceID( 0) 2
bControlSize 2
bmControls( 0) 0xff
bmControls( 1) 0x03
iExtension 0
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 4
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 3
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 2
wTotalLength 533
bEndPointAddress 130
bmInfo 1
bTerminalLink 4
bStillCaptureMethod 1
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 27
bmaControls( 1) 27
VideoStreaming Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED)
bFormatIndex 1
bNumFrameDescriptors 8
guidFormat {59555932-0000-1000-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x02
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 1
bmCapabilities 0x01
Still image supported
wWidth 640
wHeight 480
dwMinBitRate 147456000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 2
bmCapabilities 0x01
Still image supported
wWidth 352
wHeight 288
dwMinBitRate 48660480
dwMaxBitRate 48660480
dwMaxVideoFrameBufferSize 202752
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 3
bmCapabilities 0x01
Still image supported
wWidth 320
wHeight 240
dwMinBitRate 36864000
dwMaxBitRate 36864000
dwMaxVideoFrameBufferSize 153600
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 4
bmCapabilities 0x01
Still image supported
wWidth 800
wHeight 600
dwMinBitRate 115200000
dwMaxBitRate 115200000
dwMaxVideoFrameBufferSize 960000
dwDefaultFrameInterval 666666
bFrameIntervalType 1
dwFrameInterval( 0) 666666
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 5
bmCapabilities 0x01
Still image supported
wWidth 1024
wHeight 768
dwMinBitRate 150994944
dwMaxBitRate 150994944
dwMaxVideoFrameBufferSize 1572864
dwDefaultFrameInterval 833333
bFrameIntervalType 1
dwFrameInterval( 0) 833333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 6
bmCapabilities 0x01
Still image supported
wWidth 1280
wHeight 720
dwMinBitRate 110592000
dwMaxBitRate 110592000
dwMaxVideoFrameBufferSize 1843200
dwDefaultFrameInterval 1333333
bFrameIntervalType 1
dwFrameInterval( 0) 1333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 7
bmCapabilities 0x01
Still image supported
wWidth 1280
wHeight 800
dwMinBitRate 122880000
dwMaxBitRate 122880000
dwMaxVideoFrameBufferSize 2048000
dwDefaultFrameInterval 1333333
bFrameIntervalType 1
dwFrameInterval( 0) 1333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 8
bmCapabilities 0x01
Still image supported
wWidth 1600
wHeight 1200
dwMinBitRate 153600000
dwMaxBitRate 153600000
dwMaxVideoFrameBufferSize 3840000
dwDefaultFrameInterval 2000000
bFrameIntervalType 1
dwFrameInterval( 0) 2000000
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 2
bNumFrameDescriptors 8
bFlags 0
Fixed-size samples: No
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x02
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities 0x01
Still image supported
wWidth 640
wHeight 480
dwMinBitRate 221184000
dwMaxBitRate 221184000
dwMaxVideoFrameBufferSize 921600
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 2
bmCapabilities 0x01
Still image supported
wWidth 352
wHeight 288
dwMinBitRate 72990720
dwMaxBitRate 72990720
dwMaxVideoFrameBufferSize 304128
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 3
bmCapabilities 0x01
Still image supported
wWidth 320
wHeight 240
dwMinBitRate 55296000
dwMaxBitRate 55296000
dwMaxVideoFrameBufferSize 230400
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 4
bmCapabilities 0x01
Still image supported
wWidth 800
wHeight 600
dwMinBitRate 345600000
dwMaxBitRate 345600000
dwMaxVideoFrameBufferSize 1440000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 5
bmCapabilities 0x01
Still image supported
wWidth 1024
wHeight 768
dwMinBitRate 283115520
dwMaxBitRate 283115520
dwMaxVideoFrameBufferSize 2359296
dwDefaultFrameInterval 666666
bFrameIntervalType 1
dwFrameInterval( 0) 666666
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 6
bmCapabilities 0x01
Still image supported
wWidth 1280
wHeight 720
dwMinBitRate 331776000
dwMaxBitRate 331776000
dwMaxVideoFrameBufferSize 2764800
dwDefaultFrameInterval 666666
bFrameIntervalType 1
dwFrameInterval( 0) 666666
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 7
bmCapabilities 0x01
Still image supported
wWidth 1280
wHeight 800
dwMinBitRate 368640000
dwMaxBitRate 368640000
dwMaxVideoFrameBufferSize 3072000
dwDefaultFrameInterval 666666
bFrameIntervalType 1
dwFrameInterval( 0) 666666
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 8
bmCapabilities 0x01
Still image supported
wWidth 1600
wHeight 1200
dwMinBitRate 691200000
dwMaxBitRate 691200000
dwMaxVideoFrameBufferSize 5760000
dwDefaultFrameInterval 666666
bFrameIntervalType 1
dwFrameInterval( 0) 666666
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0bc8 2x 968 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x13ec 3x 1004 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x13fc 3x 1020 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1400 3x 1024 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Bus 002 Device 005: ID 0a5c:217f Broadcom Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 224 Wireless
bDeviceSubClass 1 Radio Frequency
bDeviceProtocol 1 Bluetooth
bMaxPacketSize0 64
idVendor 0x0a5c Broadcom Corp.
idProduct 0x217f
bcdDevice 3.60
iManufacturer 1 Broadcom Corp
iProduct 2 Broadcom Bluetooth Device
iSerial 3 70F395342F29
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 216
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0009 1x 9 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0009 1x 9 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0011 1x 17 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0011 1x 17 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 5
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 1
iInterface 0
Device Firmware Upgrade Interface Descriptor:
bLength 7
bDescriptorType 33
bmAttributes 7
Will Not Detach
Manifestation Tolerant
Upload Supported
Download Supported
wDetachTimeout 5000 milliseconds
wTransferSize 64 bytes
Device Status: 0x0001
Self Powered
Bus 002 Device 004: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.01
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x147e Upek
idProduct 0x2016 Biometric Touchchip/Touchstrip Fingerprint Sensor
bcdDevice 0.02
iManufacturer 1 UPEK
iProduct 2 Biometric Coprocessor
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 20
Device Status: 0x0000
(Bus Powered)
Bus 002 Device 003: ID 046d:c52b Logitech, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x046d Logitech, Inc.
idProduct 0xc52b
bcdDevice 12.01
iManufacturer 1 Logitech
iProduct 2 USB Receiver
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 84
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 4 RQR12.01_B0019
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 98mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 59
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 148
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 98
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 2
Device Status: 0x0000
(Bus Powered)
Bus 002 Device 002: ID 8087:0020
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x8087
idProduct 0x0020
bcdDevice 0.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 6
wHubCharacteristic 0x0089
Per-port power switching
Per-port overcurrent protection
TT think time 8 FS bits
Port indicators
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0103 power enable connect
Port 3: 0000.0103 power enable connect
Port 4: 0000.0103 power enable connect
Port 5: 0000.0100 power
Port 6: 0000.0503 highspeed power enable connect
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.34.6 ehci_hcd
iProduct 2 EHCI Host Controller
iSerial 1 0000:00:1a.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 3
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0503 highspeed power enable connect
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
Bus 001 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
idProduct 0x0003 3.0 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.34.6 xhci_hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:0f:00.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x0009
Per-port power switching
Per-port overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
^ permalink raw reply
* Re: [PATCH] Remove --enable-mcap from configure command line options
From: Johan Hedberg @ 2010-09-19 7:39 UTC (permalink / raw)
To: Santiago Carot-Nemesio; +Cc: linux-bluetooth
In-Reply-To: <1284796712-10934-1-git-send-email-sancane@gmail.com>
Hi,
On Sat, Sep 18, 2010, Santiago Carot-Nemesio wrote:
> Only plugins are in charge of switch on MCAP if they require
> it to work.
> ---
> acinclude.m4 | 7 +------
> 1 files changed, 1 insertions(+), 6 deletions(-)
Thanks. The patch has been pushed upstream.
Johan
^ permalink raw reply
* [PATCH] Remove --enable-mcap from configure command line options
From: Santiago Carot-Nemesio @ 2010-09-18 7:58 UTC (permalink / raw)
To: linux-bluetooth; +Cc: johan.hedberg, Santiago Carot-Nemesio
Only plugins are in charge of switch on MCAP if they require
it to work.
---
acinclude.m4 | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 1df93db..287f07d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -176,7 +176,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
network_enable=yes
service_enable=yes
health_enable=no
- mcap_enable=no
pnat_enable=no
attrib_enable=no
tracer_enable=no
@@ -231,10 +230,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
health_enable=${enableval}
])
- AC_ARG_ENABLE(mcap, AC_HELP_STRING([--enable-mcap], [enable mcap support]), [
- mcap_enable=${enableval}
- ])
-
AC_ARG_ENABLE(pnat, AC_HELP_STRING([--enable-pnat], [enable pnat plugin]), [
pnat_enable=${enableval}
])
@@ -358,7 +353,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AM_CONDITIONAL(NETWORKPLUGIN, test "${network_enable}" = "yes")
AM_CONDITIONAL(SERVICEPLUGIN, test "${service_enable}" = "yes")
AM_CONDITIONAL(HEALTHPLUGIN, test "${health_enable}" = "yes")
- AM_CONDITIONAL(MCAP, test "${mcap_enable}" = "yes" || test "${health_enable}" = "yes")
+ AM_CONDITIONAL(MCAP, test "${health_enable}" = "yes")
AM_CONDITIONAL(HAL, test "${hal_enable}" = "yes")
AM_CONDITIONAL(ATTRIBPLUGIN, test "${attrib_enable}" = "yes")
AM_CONDITIONAL(ECHOPLUGIN, test "no" = "yes")
--
1.7.0.4
^ permalink raw reply related
* RE: [RFC] BlueZ D-Bus Sim Access Profile Server API description
From: Marcel Holtmann @ 2010-09-18 0:16 UTC (permalink / raw)
To: Nicolas GUILBAUD
Cc: Suraj Sumangala, Suraj Sumangala, linux-bluetooth,
Jothikumar Mothilal
In-Reply-To: <A9AC1023FCA4654D92AC24C2A8F6A09201AA816C@renesas4bis.renesas-rdf.local>
Hi Nicolas,
> >>that is just because we haven't gotten there yet. Of course if SAP takes
> over we have to shutdown oFono's handling of the modem. This could be
> done similar to the support for Lockdown we have in the oFono TODO list.
>
> Do you have information about the release date of this feature? And about the interface to lockdown, is it a D-BUS message?
good one ;)
We know that we need such or similar feature for firmware updates where
we have to essentially shutdown oFono from driving the modem for a
period of time. The details are not 100% clear. For firmware updates
this has to be a D-Bus method, actually D-Bus property on the modem
interface.
In theory we can even extend this to do this internally as well. So that
an oFono plugin could lock down the modem. Things we clearly have to
figure out at some point.
> >There is a framework for card services in general, but I think that is
> just pure overhead for this.
>
> >And to be honest, my current thinking is that even for pure SIM card
> readers with APDU mode, we might wanna support them via oFono anyway.
> Having to add SAP support in multiple levels is a bad idea.
>
> Yes but an APDU interface is needed in the SIM driver of oFono, I don't see any interface of this kind in the source code.
Because we haven't had any hardware that does this so far. You will only
see code in oFono once we had hardware in our hands that is able of
doing this and we know how to drive it.
> Maybe it's not the good place to speak about that.
Essentially the oFono mailing list is a better place for such a
discussion.
> >However in the end this all depends on the hardware and right now I have
> not had access to SAP capable hardware. Or maybe I did and I didn't know
> it yet. Do we have any target hardware in mind?
>
> Yes we have, it's Renesas Modem solution.
Any chance you guys could add Renesas Modem support to oFono and then us
some samples?
Regards
Marcel
^ permalink raw reply
* Re: Possible regression with skb_clone() in 2.6.36
From: Andrew Morton @ 2010-09-17 22:34 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: linux-bluetooth, netdev, linux-kernel, marcel
In-Reply-To: <1283209824-8795-1-git-send-email-padovan@profusion.mobi>
On Mon, 30 Aug 2010 20:10:23 -0300
"Gustavo F. Padovan" <padovan@profusion.mobi> wrote:
> I've been experiencing some problems when running the L2CAP Streaming mode in
> 2.6.36. The system quickly runs in an Out Of Memory condition and crash. That
> wasn't happening before, so I think we may have a regression here (I didn't find
> where yet). The crash log is below.
So 2.6.35 was OK?
> The following patch does not fix the regression, but shows that removing the
> skb_clone() call from l2cap_streaming_send() makes the problem goes away. The
> patch is good anyway since it saves memory and time when sending Streaming mode
> packets.
How does "make it go away" differ from "fix the regression" :)
But yes, if we don't understand the source of the bug then it may well
still be there. Did you make any progress in understanding the cause?
>
> [ 5066.137533] Bluetooth: L2CAP ver 2.15
> [ 5066.137873] Bluetooth: L2CAP socket layer initialized
> [ 5066.545179] Bluetooth: RFCOMM TTY layer initialized
> [ 5066.545879] Bluetooth: RFCOMM socket layer initialized
> [ 5066.546582] Bluetooth: RFCOMM ver 1.11
> [ 5092.268021] l2test invoked oom-killer: gfp_mask=0x4d0, order=0, oom_adj=0, oom_score_adj=0
> [ 5092.268872] Pid: 3897, comm: l2test Not tainted 2.6.36-rc3 #5
> [ 5092.269863] Call Trace:
> [ 5092.270265] [<ffffffff8138b6a6>] ? _raw_spin_unlock+0x26/0x30
> [ 5092.270878] [<ffffffff810c0827>] T.427+0x77/0x1e0
> [ 5092.271874] [<ffffffff811b85e7>] ? security_real_capable_noaudit+0x37/0x60
> [ 5092.272956] [<ffffffff810c0e3a>] out_of_memory+0x2ca/0x2f0
> [ 5092.273894] [<ffffffff810c3d43>] __alloc_pages_nodemask+0x693/0x6b0
> [ 5092.274871] [<ffffffff810ea3e6>] cache_alloc_refill+0x2d6/0x5c0
> [ 5092.275864] [<ffffffff810ea805>] __kmalloc+0x135/0x150
> [ 5092.276876] [<ffffffff8130f2ae>] __alloc_skb+0x6e/0x150
> [ 5092.277865] [<ffffffff810d3a00>] ? might_fault+0x40/0x90
> [ 5092.278652] [<ffffffff8130ace2>] sock_alloc_send_pskb+0x1c2/0x320
> [ 5092.278927] [<ffffffff810d3a00>] ? might_fault+0x40/0x90
> [ 5092.279864] [<ffffffff81312add>] ? memcpy_fromiovec+0x6d/0x90
> [ 5092.280864] [<ffffffff8130ae50>] sock_alloc_send_skb+0x10/0x20
> [ 5092.281867] [<ffffffffa00e600f>] l2cap_create_iframe_pdu+0x9f/0x2c0 [l2cap]
> [ 5092.282865] [<ffffffffa00e84b9>] l2cap_sock_sendmsg+0x5d9/0x910 [l2cap]
> [ 5092.283932] [<ffffffff8138ba3c>] ? restore_args+0x0/0x30
> [ 5092.284865] [<ffffffff8130725b>] sock_sendmsg+0xdb/0x100
> [ 5092.285652] [<ffffffff8138ba3c>] ? restore_args+0x0/0x30
> [ 5092.285864] [<ffffffff8138ba3c>] ? restore_args+0x0/0x30
> [ 5092.286864] [<ffffffff813073c0>] sys_sendto+0xf0/0x130
> [ 5092.287864] [<ffffffff8138b60b>] ? _raw_spin_unlock_irq+0x2b/0x40
> [ 5092.288872] [<ffffffff81093cfd>] ? trace_hardirqs_on_caller+0x13d/0x180
> [ 5092.289927] [<ffffffff81093d4d>] ? trace_hardirqs_on+0xd/0x10
> [ 5092.290864] [<ffffffff810d3a00>] ? might_fault+0x40/0x90
> [ 5092.291649] [<ffffffff810d3a00>] ? might_fault+0x40/0x90
> [ 5092.291864] [<ffffffff810d3a00>] ? might_fault+0x40/0x90
> [ 5092.292864] [<ffffffff8130740f>] sys_send+0xf/0x20
> [ 5092.293870] [<ffffffff8132ccd6>] compat_sys_socketcall+0x146/0x1f0
> [ 5092.294875] [<ffffffff81053ee4>] sysenter_dispatch+0x7/0x30
That's a pretty serious regression.
^ permalink raw reply
* [PATCH 2/2] bluetooth: add support for controller in MacBookPro6,2
From: Will Woods @ 2010-09-17 21:09 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, kernel, Will Woods
In-Reply-To: <1284757761-11994-1-git-send-email-wwoods@redhat.com>
Once again the device class is ff(vend.) instead of e0(wlcon).
output from 'usb-devices':
T: Bus=01 Lev=03 Prnt=03 Port=02 Cnt=03 Dev#= 8 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=05ac ProdID=8218 Rev=00.22
S: Manufacturer=Apple Inc.
S: Product=Bluetooth USB Host Controller
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
Signed-off-by: Will Woods <wwoods@redhat.com>
---
drivers/bluetooth/btusb.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index eac44e4..320e798 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -65,6 +65,9 @@ static struct usb_device_id btusb_table[] = {
/* Apple iMac11,1 */
{ USB_DEVICE(0x05ac, 0x8215) },
+ /* Apple MacBookPro6,2 */
+ { USB_DEVICE(0x05ac, 0x8218) },
+
/* AVM BlueFRITZ! USB v2.0 */
{ USB_DEVICE(0x057c, 0x3800) },
--
1.7.2.3
^ permalink raw reply related
* [PATCH 1/2] bluetooth: add support for controller in MacBookPro7,1
From: Will Woods @ 2010-09-17 21:09 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, kernel, Will Woods
In-Reply-To: <1284757761-11994-1-git-send-email-wwoods@redhat.com>
As with iMac11,1 the device class is ff(vend.) instead of e0(wlcon).
output from 'usb-devices':
T: Bus=04 Lev=02 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=05ac ProdID=8213 Rev=01.86
S: Manufacturer=Apple Inc.
S: Product=Bluetooth USB Host Controller
S: SerialNumber=58B0359C28ED
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)
Signed-off-by: Will Woods <wwoods@redhat.com>
---
drivers/bluetooth/btusb.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index d22ce3c..eac44e4 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -59,6 +59,9 @@ static struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */
{ USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
+ /* Apple MacBookPro7,1 */
+ { USB_DEVICE(0x05ac, 0x8213) },
+
/* Apple iMac11,1 */
{ USB_DEVICE(0x05ac, 0x8215) },
--
1.7.2.3
^ permalink raw reply related
* bluetooth: add support for btusb devices in recent MacBook Pros
From: Will Woods @ 2010-09-17 21:09 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, kernel
These two patches add support for the USB bluetooth controllers found
in recent MacBook Pro systems. In both cases the device class is
ff (vend.) rather than the usual e0. The iMac11,1 has the same
problem and is handled with an explicit USB_DEVICE() entry, so
these two devices are handled the same way.
(Apologies for sending the patches again - I forgot the Signed-off-by:
lines the first time.)
-w
^ permalink raw reply
* Re: Possible regression with skb_clone() in 2.6.36
From: Gustavo F. Padovan @ 2010-09-17 21:08 UTC (permalink / raw)
To: Mat Martineau; +Cc: linux-bluetooth, marcel
In-Reply-To: <alpine.DEB.2.00.1009160840080.4394@linux-sea-02>
Hi Mat,
* Mat Martineau <mathewm@codeaurora.org> [2010-09-16 09:40:54 -0700]:
>
> Gustavo -
>
> Since this is now a only a discussion of blocking behavior with ERTM
> (and not a regression with skb_clone()), I've removed linux-kernel and
> netdev from the cc list. If you think they still need to see this
> thread, please add them back in.
>
>
> On Wed, 15 Sep 2010, Gustavo F. Padovan wrote:
>
> > * Gustavo F. Padovan <padovan@profusion.mobi> [2010-09-10 16:45:09 -0300]:
> >
> >> Hi Mat,
> >>
> >> * Mat Martineau <mathewm@codeaurora.org> [2010-09-10 09:53:31 -0700]:
> >>
> >>>
> >>> Gustavo -
> >>>
> >>> I'm not sure why the streaming code used to work, but this does not
> >>> look like an skb_clone() problem. Your patch to remove the
> >>> skb_clone() call in l2cap_streaming_send() addresses the root cause of
> >>> this crash.
> >>>
> >>> On Wed, 8 Sep 2010, Gustavo F. Padovan wrote:
> >>>
> >>>> I've been experiencing some problems when running the L2CAP Streaming mode in
> >>>> 2.6.36. The system quickly runs in an Out Of Memory condition and crash. That
> >>>> wasn't happening before, so I think we may have a regression here (I didn't
> >>>> find where yet). The crash log is below.
> >>>>
> >>>> The following patch does not fix the regression, but shows that removing the
> >>>> skb_clone() call from l2cap_streaming_send() we workaround the problem. The
> >>>> patch is good anyway because it saves memory and time.
> >>>>
> >>>> By now I have no idea on how to fix this.
> >>>>
> >>>> <snip>
> >>>
> >>> This has to do with the sk->sk_wmem_alloc accounting that controls the
> >>> amount of write buffer space used on the socket.
> >>>
> >>> When the L2CAP streaming mode socket segments its data, it allocates
> >>> memory using sock_alloc_send_skb() (via bt_skb_send_alloc()). Before
> >>> that allocation call returns, skb_set_owner_w() is called on the new
> >>> skb. This adds to sk->sk_wmem_alloc and sets skb->destructor so that
> >>> sk->sk_wmem_alloc is correctly updated when the skb is freed.
> >>>
> >>> When that skb is cloned, the clone is not "owned" by the write buffer.
> >>> The clone's destructor is set to NULL in __skb_clone(). The version
> >>> of l2cap_streaming_send() that runs out of memory is passing the
> >>> non-owned skb clone down to the HCI layer. The original skb (the one
> >>> that's "owned by w") is immediately freed, which adjusts
> >>> sk->sk_wmem_alloc back down - the socket thinks it has unlimited write
> >>> buffer space. As a result, bt_skb_send_alloc() never blocks waiting
> >>> for buffer space (or returns EAGAIN for nonblocking writes) and the
> >>> HCI send queue keeps growing.
> >>
> >> If the problem is what you are saying, add a skb_set_owner_w(skb, sk) on
> >> the cloned skb should solve the problem, but it doesn't. That's exactly
> >> what tcp_transmit_skb() does. Also that just appeared in 2.6.36, is was
> >> working fine before, i.e, we have a regression here.
> >>
> >>>
> >>> This isn't a problem for the ERTM sends, because the original skbs are
> >>> kept in the ERTM tx queue until they are acked. Once they're acked,
> >>> the write buffer space is freed and additional skbs can be allocated.
> >>
> >> It affects ERTM as well, but in that case the kernel doesn't crash
> >> because ERTM block on sending trying to allocate memory. Then we are not
> >> able to receive any ack (everything stays queued in sk_backlog_queue as
> >> the sk is owned by the user) and ERTM stalls.
> >
> > By reverting
> >
> > commit 218bb9dfd21472128f86b38ad2eab123205c2991
> > Author: Gustavo F. Padovan <padovan@profusion.mobi>
> > Date: Mon Jun 21 18:53:22 2010 -0300
> >
> > Bluetooth: Add backlog queue to ERTM code
> >
> > backlog queue is the canonical mechanism to avoid race conditions due
> > interrupts in bottom half context. After the socket lock is released the
> > net core take care of push all skb in its backlog queue.
> >
> > Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> > Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> >
> >
> > we can workaround the bug. It's not the real cause of the bug because the
> > backlog queue was working before 2.6.36, but removing the backlog queue scheme
> > make L2CAP works again and also give us more time to find the real cause of the
> > problem.
> >
> > Before implement the backlog queue L2CAP had his own lock scheme to avoid race
> > conditions. The point is that the backlog queue adds too much serialization to
> > L2CAP, that was the cause of the ERTM bug. The old scheme (the one we are going
> > to use after revert this commit) just serialize access to some places.
> >
> > By not using the backlog queue, we can receive the acknowledgement frames more
> > quickly and then free the acked frames quickly. In fact the old scheme is
> > looks better than backlog queue.
> >
> > I think we should proceed with the revert with this commit in mainline, and at the
> > same time try to find the root cause of the problem.
>
> I don't think the backlog patch should be reverted. Although the old
> code would appear to get things working again, it's only because locks
> were being ignored in some important cases. Maybe it seems ok most of
> the time, but the ERTM socket state was not being properly protected.
> The backlog is the right way to do it, but also depends on correct
> lock handling in the rest of L2CAP.
>
>
> I think this is one of the locking issues from this message to
> linux-bluetooth ("ERTM known bugs/regressions (was Re: [PATCH 0/8]
> ...)") on August 2:
>
> http://www.spinics.net/lists/linux-bluetooth/msg06734.html
>
>
> We've both arrived at the root cause already: incoming frames
> (including acks) get stuck on the backlog queue while the socket is
> locked waiting for memory -- and no memory gets freed until the acks
> are processed.
>
> The only time the socket lock is held for a long time is when waiting
> for memory, so I think the best solution is to not hold the lock while
> allocating. This should be safe, since the only socket state that's
> changed during bt_skb_send_alloc() is sk->sk_wmem_alloc, which is an
> atomic_t.
>
> Then some changes are needed to these functions:
>
> l2cap_sar_segment_sdu() and l2cap_create_iframe_pdu(): Take some args
> on the stack (like remote_mps) instead of accessing l2cap_pinfo.
> Don't add to TX_QUEUE(sk) within these functions (let the caller do
> that).
>
> l2cap_sock_sendmsg(): Copy necessary data to local variables from
> l2cap_pinfo while the lock is held. release_sock(sk), then call
> l2cap_sar_segment_sdu() (which will work for the "one PDU" case too)
> with the new args for mps, fcs, etc. After l2cap_sar_segment_sdu()
> returns, check the socket state again (like the code at the beginning
> of l2cap_sock_sendmsg()) and then lock_sock(sk), queue the data, and
> send it.
If we are going to release the lock before alloc memory we are assuming
the no one will change the mps, fcs and other things we need inside
those functions, so in the big picture just add a release_lock() before
alloc memory and after that lock the socket again should work nicely and
we won't need any local variable.
However I did find any other code in net/ that release the lock before
alloc memory. ERTM is a similar (and simplified) version of TCP. TCP
uses backlog queues as well and alloc memory with the socket locked.
I'm not completely conviced that this is the better way to fix that, I'm
also looking to others solutions, but haven't figured out them yet. ;)
>
> (I know it would be better and clearer to send a patch for this, but
> I have some other things to fix right now!)
>
>
> The other locking problem (with ERTM timers) also deserves some
> attention, but maybe in a new email thread!
Yes, we need to look to it. Let's start a new mail thread.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* [PATCH 2/2] bluetooth: add support for controller in MacBookPro6,2
From: Will Woods @ 2010-09-17 20:38 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, kernel, Will Woods
In-Reply-To: <1284755883-10795-1-git-send-email-wwoods@redhat.com>
Once again the device class is ff(vend.) instead of e0(wlcon).
output from 'usb-devices':
T: Bus=01 Lev=03 Prnt=03 Port=02 Cnt=03 Dev#= 8 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=05ac ProdID=8218 Rev=00.22
S: Manufacturer=Apple Inc.
S: Product=Bluetooth USB Host Controller
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
---
drivers/bluetooth/btusb.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index eac44e4..320e798 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -65,6 +65,9 @@ static struct usb_device_id btusb_table[] = {
/* Apple iMac11,1 */
{ USB_DEVICE(0x05ac, 0x8215) },
+ /* Apple MacBookPro6,2 */
+ { USB_DEVICE(0x05ac, 0x8218) },
+
/* AVM BlueFRITZ! USB v2.0 */
{ USB_DEVICE(0x057c, 0x3800) },
--
1.7.2.3
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox