Linux bluetooth development
 help / color / mirror / Atom feed
* Re: [PATCH] Added support for Atheros AR300x UART Bluetooth Chip
From: Vikram Kandukuri @ 2010-02-17  9:55 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org; +Cc: marcel
In-Reply-To: <20100209114231.GA6587@ATH-LT-538>

Hi Marcel,
Please send your comments

Thanks

> 
>  Signed-off-by: Suraj <suraj@atheros.com>
> 
> ---
>  drivers/bluetooth/Kconfig     |   10 +
>  drivers/bluetooth/Makefile    |    1 +
>  drivers/bluetooth/hci_ath.c   |  545 +++++++++++++++++++++++++++++++++++++++++
>  drivers/bluetooth/hci_ath.h   |   72 ++++++
>  drivers/bluetooth/hci_ldisc.c |    6 +
>  drivers/bluetooth/hci_uart.h  |    8 +-
>  6 files changed, 641 insertions(+), 1 deletions(-)
>  create mode 100755 drivers/bluetooth/hci_ath.c
>  create mode 100755 drivers/bluetooth/hci_ath.h
> 
> diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
> index 058fbcc..32b98a4 100644
> --- a/drivers/bluetooth/Kconfig
> +++ b/drivers/bluetooth/Kconfig
> @@ -58,6 +58,16 @@ config BT_HCIUART_BCSP
> 
>           Say Y here to compile support for HCI BCSP protocol.
> 
> +config BT_HCIUART_ATH
> +       bool "Atheros AR3001 Board support"
> +       depends on BT_HCIUART
> +       help
> +         HCIATH (HCI Atheros) is a serial protocol for communication
> +         between Bluetooth device and host. This protocol is required for
> +         serial Bluetooth devices that are based on Atheros AR3001 chips.
> +
> +         Say Y here to compile support for HCIATH protocol.
> +
>  config BT_HCIUART_LL
>         bool "HCILL protocol support"
>         depends on BT_HCIUART
> diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
> index 7e5aed5..1481faa 100644
> --- a/drivers/bluetooth/Makefile
> +++ b/drivers/bluetooth/Makefile
> @@ -26,4 +26,5 @@ hci_uart-y                            := hci_ldisc.o
>  hci_uart-$(CONFIG_BT_HCIUART_H4)       += hci_h4.o
>  hci_uart-$(CONFIG_BT_HCIUART_BCSP)     += hci_bcsp.o
>  hci_uart-$(CONFIG_BT_HCIUART_LL)       += hci_ll.o
> +hci_uart-$(CONFIG_BT_HCIUART_ATH)      += hci_ath.o
>  hci_uart-objs                          := $(hci_uart-y)
> diff --git a/drivers/bluetooth/hci_ath.c b/drivers/bluetooth/hci_ath.c
> new file mode 100755
> index 0000000..abacc09
> --- /dev/null
> +++ b/drivers/bluetooth/hci_ath.c
> @@ -0,0 +1,545 @@
> +/*
> + * Copyright (c) 2009-2010 Atheros Communications Inc.
> + *
> + *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> + *
> + */
> +
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +
> +#include <linux/init.h>
> +#include <linux/sched.h>
> +#include <linux/types.h>
> +#include <linux/fcntl.h>
> +#include <linux/interrupt.h>
> +#include <linux/ptrace.h>
> +#include <linux/poll.h>
> +
> +#include <linux/slab.h>
> +#include <linux/tty.h>
> +#include <linux/errno.h>
> +#include <linux/string.h>
> +#include <linux/signal.h>
> +#include <linux/ioctl.h>
> +#include <linux/skbuff.h>
> +#include <linux/firmware.h>
> +#include <linux/wait.h>
> +#include <linux/timer.h>
> +#include <linux/tty.h>
> +
> +#include <net/bluetooth/bluetooth.h>
> +#include <net/bluetooth/hci.h>
> +
> +#include "hci_uart.h"
> +#include "hci_ath.h"
> +static void ath_context_switch(struct work_struct *work)
> +{
> +       int status;
> +       struct ath_struct *ath;
> +       struct hci_uart *hu;
> +       struct tty_struct *tty;
> +       struct sk_buff *skbuf;
> +       ath = container_of(work, struct ath_struct, ctxtsw);
> +       hu = ath->hu;
> +       tty = hu->tty;
> +       status = ath_wakeup_ar3001(tty);
> +       if ((status & TIOCM_CTS)) {
> +               while ((skbuf = skb_dequeue(&ath->tx_wait_q)))
> +                       skb_queue_tail(&ath->txq, skbuf);
> +
> +               /* Ready to send Data */
> +               clear_bit(HCI_UART_SENDING, &hu->tx_state);
> +               hci_uart_tx_wakeup(hu);
> +       }
> +}
> +
> +/* Initialize protocol */
> +static int ath_open(struct hci_uart *hu)
> +{
> +       struct ath_struct *ath;
> +       BT_DBG("hu %p", hu);
> +       ath = kzalloc(sizeof(*ath), GFP_ATOMIC);
> +       if (!ath)
> +               return -ENOMEM;
> +       skb_queue_head_init(&ath->txq);
> +       skb_queue_head_init(&ath->tx_wait_q);
> +       skb_queue_head_init(&ath->tx_cmd_wait_q);
> +       spin_lock_init(&ath->hciath_lock);
> +       ath->cur_sleep = 0;
> +       ath->num_cmds_complete = 1;
> +       hu->priv = ath;
> +       ath->hu = hu;
> +       init_waitqueue_head(&ath->wqevt);
> +       INIT_WORK(&ath->ctxtsw, ath_context_switch);
> +       return 0;
> +}
> +
> +/* Flush protocol data */
> +static int ath_flush(struct hci_uart *hu)
> +{
> +       struct ath_struct *ath = hu->priv;
> +       BT_DBG("hu %p", hu);
> +       skb_queue_purge(&ath->tx_wait_q);
> +       skb_queue_purge(&ath->txq);
> +       skb_queue_purge(&ath->tx_cmd_wait_q);
> +       return 0;
> +}
> +
> +/* Close protocol */
> +static int ath_close(struct hci_uart *hu)
> +{
> +       struct ath_struct *ath;
> +       ath = hu->priv;
> +       BT_DBG("hu %p", hu);
> +       skb_queue_purge(&ath->tx_wait_q);
> +       skb_queue_purge(&ath->txq);
> +       skb_queue_purge(&ath->tx_cmd_wait_q);
> +       if (ath->rx_skb)
> +               kfree_skb(ath->rx_skb);
> +       wake_up_interruptible(&ath->wqevt);
> +       hu->priv = NULL;
> +       kfree(ath);
> +       return 0;
> +}
> +
> +/* Enqueue frame for transmittion (padding, crc, etc) */
> +/* may be called from two simultaneous tasklets */
> +static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb)
> +{
> +       struct ath_struct *ath;
> +       ath = hu->priv;
> +       if (HCI_SCODATA_PKT == bt_cb(skb)->pkt_type) {
> +
> +               /* Discard SCO packet as AR3001 does not support SCO over HCI */
> +               BT_DBG("SCO Packet over HCI received Dropping\n");
> +               kfree(skb);
> +               return 0;
> +       }
> +       BT_DBG("hu %p skb %p", hu, skb);
> +
> +       /* Prepend skb with frame type */
> +       memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
> +       if (ath->num_cmds_complete <= 0
> +           && HCI_COMMAND_PKT == bt_cb(skb)->pkt_type) {
> +               skb_queue_tail(&ath->tx_cmd_wait_q, skb);
> +               return 0;
> +       }
> +
> +       skb_queue_tail(&ath->txq, skb);
> +       set_bit(HCI_UART_SENDING, &hu->tx_state);
> +
> +       schedule_work(&ath->ctxtsw);
> +       return 0;
> +}
> +
> +static struct sk_buff *ath_dequeue(struct hci_uart *hu)
> +{
> +       struct ath_struct *ath;
> +       struct sk_buff *skbuff;
> +       ath = hu->priv;
> +       skbuff = skb_dequeue(&ath->txq);
> +       if (NULL != skbuff) {
> +               ath_handle_host_data(ath, bt_cb(skbuff)->pkt_type,
> +                                    &skbuff->data[1], skbuff->len - 1);
> +       }
> +       return skbuff;
> +}
> +
> +static inline int ath_check_data_len(struct ath_struct *ath, int len)
> +{
> +       register int room = skb_tailroom(ath->rx_skb);
> +       BT_DBG("len %d room %d", len, room);
> +       if (!len) {
> +               hci_recv_frame(ath->rx_skb);
> +       } else if (len > room) {
> +               BT_ERR("Data length is too large");
> +               kfree_skb(ath->rx_skb);
> +       } else {
> +               ath->rx_state = HCIATH_W4_DATA;
> +               ath->rx_count = len;
> +               return len;
> +       }
> +       ath->rx_state = HCIATH_W4_PACKET_TYPE;
> +       ath->rx_skb = NULL;
> +       ath->rx_count = 0;
> +       return 0;
> +}
> +
> +/* Recv data */
> +static int ath_recv(struct hci_uart *hu, void *data, int count)
> +{
> +       struct ath_struct *ath = hu->priv;
> +       register char *ptr;
> +       struct hci_event_hdr *eh;
> +       struct hci_acl_hdr *ah;
> +       struct hci_sco_hdr *sh;
> +       struct sk_buff *skbuff;
> +       register int len, type, dlen;
> +       skbuff = NULL;
> +       BT_DBG("hu %p count %d rx_state %d rx_count %d", hu, count,
> +              ath->rx_state, ath->rx_count);
> +       ptr = data;
> +       while (count) {
> +               if (ath->rx_count) {
> +                       len = min_t(unsigned int, ath->rx_count, count);
> +                       memcpy(skb_put(ath->rx_skb, len), ptr, len);
> +                       ath->rx_count -= len;
> +                       count -= len;
> +                       ptr += len;
> +                       if (ath->rx_count)
> +                               continue;
> +                       switch (ath->rx_state) {
> +                       case HCIATH_W4_DATA:
> +                               ath_handle_data_from_controller(ath,
> +                                                               bt_cb
> +                                                               (ath->rx_skb)->
> +                                                               pkt_type,
> +                                                               ath->rx_skb->
> +                                                               data,
> +                                                               ath->rx_skb->
> +                                                               len);
> +                               if (HCI_EVENT_PKT ==
> +                                   bt_cb(ath->rx_skb)->pkt_type
> +                                   && ath->num_cmds_complete > 0) {
> +
> +                                       skbuff =
> +                                           skb_dequeue(&ath->tx_cmd_wait_q);
> +                                       if (skbuff != NULL) {
> +                                               skb_queue_tail(&ath->txq,
> +                                                              skbuff);
> +                                               schedule_work(&ath->ctxtsw);
> +                                       }
> +                               }
> +                               if (ath_verify_event_discardable
> +                                   (hu, bt_cb(ath->rx_skb)->pkt_type,
> +                                    ath->rx_skb->data)) {
> +                                       kfree(ath->rx_skb);
> +                                       ath->rx_skb = NULL;
> +                               } else {
> +                                       hci_recv_frame(ath->rx_skb);
> +                               }
> +                               ath->rx_state = HCIATH_W4_PACKET_TYPE;
> +                               ath->rx_skb = NULL;
> +                               ath->rx_count = 0;
> +                               continue;
> +                       case HCIATH_W4_EVENT_HDR:
> +                               eh = (struct hci_event_hdr *)ath->rx_skb->data;
> +                               BT_DBG("Event header: evt 0x%2.2x plen %d",
> +                                      eh->evt, eh->plen);
> +                               ath_check_data_len(ath, eh->plen);
> +                               continue;
> +                       case HCIATH_W4_ACL_HDR:
> +                               ah = (struct hci_acl_hdr *)ath->rx_skb->data;
> +                               dlen = __le16_to_cpu(ah->dlen);
> +                               BT_DBG("ACL header: dlen %d", dlen);
> +                               ath_check_data_len(ath, dlen);
> +                               continue;
> +                       case HCIATH_W4_SCO_HDR:
> +                               sh = (struct hci_sco_hdr *)ath->rx_skb->data;
> +                               BT_DBG("SCO header: dlen %d", sh->dlen);
> +                               ath_check_data_len(ath, sh->dlen);
> +                               continue;
> +                       }
> +               }
> +
> +               /* HCIATH_W4_PACKET_TYPE */
> +               switch (*ptr) {
> +               case HCI_EVENT_PKT:
> +                       BT_DBG("Event packet");
> +                       ath->rx_state = HCIATH_W4_EVENT_HDR;
> +                       ath->rx_count = HCI_EVENT_HDR_SIZE;
> +                       type = HCI_EVENT_PKT;
> +                       break;
> +               case HCI_ACLDATA_PKT:
> +                       BT_DBG("ACL packet");
> +                       ath->rx_state = HCIATH_W4_ACL_HDR;
> +                       ath->rx_count = HCI_ACL_HDR_SIZE;
> +                       type = HCI_ACLDATA_PKT;
> +                       break;
> +               case HCI_SCODATA_PKT:
> +                       BT_DBG("SCO packet");
> +                       ath->rx_state = HCIATH_W4_SCO_HDR;
> +                       ath->rx_count = HCI_SCO_HDR_SIZE;
> +                       type = HCI_SCODATA_PKT;
> +                       break;
> +               default:
> +                       BT_ERR("Unknown HCI packet type %2.2x", (__u8) *ptr);
> +                       hu->hdev->stat.err_rx++;
> +                       ptr++;
> +                       count--;
> +                       continue;
> +               };
> +               ptr++;
> +               count--;
> +
> +               /* Allocate packet */
> +               ath->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
> +               if (!ath->rx_skb) {
> +                       BT_ERR("Can't allocate mem for new packet");
> +                       ath->rx_state = HCIATH_W4_PACKET_TYPE;
> +                       ath->rx_count = 0;
> +                       return 0;
> +               }
> +               ath->rx_skb->dev = (void *)hu->hdev;
> +               bt_cb(ath->rx_skb)->pkt_type = type;
> +       } return count;
> +}
> +
> +static void ath_controller_sleep_mode(struct hci_uart *hu, bool enable)
> +{
> +       unsigned char sleepcmd[] = { 0x01, 0x04, 0xFC, 0x01, 0x00 };
> +       sleepcmd[4] = enable;
> +       ath_write_data_to_cntrlr(hu->hdev, sleepcmd, sizeof(sleepcmd));
> +}
> +
> +int ath_wakeup_ar3001(struct tty_struct *tty)
> +{
> +       struct termios settings;
> +       int status = 0x00;
> +       mm_segment_t oldfs;
> +       status = tty->driver->ops->tiocmget(tty, NULL);
> +
> +       if ((status & TIOCM_CTS))
> +               return status;
> +
> +       oldfs = get_fs();
> +       set_fs(KERNEL_DS);
> +       n_tty_ioctl_helper(tty, NULL, TCGETS, (unsigned long)&settings);
> +
> +       settings.c_cflag &= ~CRTSCTS;
> +       n_tty_ioctl_helper(tty, NULL, TCSETS, (unsigned long)&settings);
> +       set_fs(oldfs);
> +       status = tty->driver->ops->tiocmget(tty, NULL);
> +
> +       tty->driver->ops->tiocmset(tty, NULL, 0x00, TIOCM_RTS);
> +       mdelay(20);
> +
> +       status = tty->driver->ops->tiocmget(tty, NULL);
> +
> +       tty->driver->ops->tiocmset(tty, NULL, TIOCM_RTS, 0x00);
> +       mdelay(20);
> +
> +       status = tty->driver->ops->tiocmget(tty, NULL);
> +       oldfs = get_fs();
> +       set_fs(KERNEL_DS);
> +       n_tty_ioctl_helper(tty, NULL, TCGETS, (unsigned long)&settings);
> +
> +       settings.c_cflag |= CRTSCTS;
> +       n_tty_ioctl_helper(tty, NULL, TCSETS, (unsigned long)&settings);
> +       set_fs(oldfs);
> +       return status;
> +}
> +
> +int ath_fullboot_config(struct hci_uart *hu, int current_event)
> +{
> +       struct sk_buff *skbuf;
> +       struct ath_struct *ath = hu->priv;
> +       static int autosleep;
> +       unsigned char rstevt[] = { 0x1, 0x3, 0xc, 0x0 };
> +       if (current_event == HCI_RESET) {
> +
> +               if (ath->cur_sleep) {
> +                       autosleep = 1;
> +                       ath_controller_sleep_mode(hu, 1);
> +                       return 1;
> +               } else {
> +                       return 0;
> +               }
> +       }
> +
> +       if (current_event == HCI_SET_SLEEP_MODE) {
> +
> +               if (autosleep == 0)
> +                       return 1;
> +
> +               while ((skbuf = skb_dequeue(&ath->tx_wait_q)))
> +                       skb_queue_tail(&ath->txq, skbuf);
> +
> +               ath_write_data_to_host(hu->hdev, rstevt, sizeof(rstevt));
> +               autosleep = 0;
> +               return 1;
> +       }
> +       return 0;
> +}
> +
> +int ath_write_data_to_host(void *dev, unsigned char *data, u8 length)
> +{
> +       struct sk_buff *skbuf;
> +       struct hci_dev *hdev;
> +       hdev = (struct hci_dev *)dev;
> +       skbuf = bt_skb_alloc(length, GFP_ATOMIC);
> +       if (!skbuf) {
> +               BT_ERR("Memory allocation failed");
> +               return -1;
> +       }
> +       skb_orphan(skbuf);
> +
> +       /* First byte will be added as packet type */
> +       bt_cb(skbuf)->pkt_type = data[0];
> +       skbuf->dev = (void *)hdev;
> +       memcpy(skb_put(skbuf, length - 1), &data[1], length - 1);
> +       hci_recv_frame(skbuf);
> +       return length;
> +}
> +
> +int ath_write_data_to_cntrlr(void *dev, unsigned char *Data, u8 len)
> +{
> +       struct sk_buff *skbuff;
> +       struct ath_struct *ath;
> +       struct hci_uart *hu;
> +       struct hci_dev *hdev;
> +       if (NULL == dev) {
> +               BT_DBG("NULL handle received %p  \n", dev);
> +               return 0;
> +       }
> +       hdev = (struct hci_dev *)dev;
> +       hu = (struct hci_uart *)hdev->driver_data;
> +       if (hu == NULL) {
> +               BT_DBG("NULL handle received %p  \n", hdev);
> +               return 0;
> +       }
> +       ath = hu->priv;
> +       if (ath == NULL) {
> +               BT_DBG("NULL handle received  \n");
> +               return 0;
> +       }
> +       skbuff = bt_skb_alloc(len, GFP_ATOMIC);
> +       if (skbuff == NULL) {
> +               BT_DBG("Malloc Fail memory %p   \n", skbuff);
> +               return 0;
> +       }
> +       skb_orphan(skbuff);
> +
> +       if (len != 0)
> +               memcpy(skb_put(skbuff, len), Data, len);
> +
> +       bt_cb(skbuff)->pkt_type = HCI_COMMAND_PKT;
> +       skbuff->dev = dev;
> +       if (ath->num_cmds_complete > 0) {
> +               skb_queue_tail(&ath->txq, skbuff);
> +               schedule_work(&ath->ctxtsw);
> +       } else {
> +               skb_queue_tail(&ath->tx_cmd_wait_q, skbuff);
> +       }
> +       return len;
> +}
> +
> +int ath_check_sleep_cmd(struct ath_struct *ath, unsigned char *packet)
> +{
> +       if (packet[0] == HCI_EVENT_PKT && packet[1] == 0xFC)
> +               ath->cur_sleep = packet[3];
> +
> +       return 0;
> +}
> +
> +int ath_verify_event_discardable(struct hci_uart *hu, unsigned char pkt_type,
> +                                unsigned char *packet)
> +{
> +       if (pkt_type != HCI_EVENT_PKT)
> +               return 0;
> +
> +       switch (packet[0]) {
> +       case 0x0E:              /* Command Complete Event */
> +               if (packet[3] == 0x03 && packet[4] == 0x0C) {
> +
> +                       /* Command complete for HCI Reset Received */
> +                       return ath_fullboot_config(hu, HCI_RESET);
> +               } else if (packet[3] == 0x04 && packet[4] == 0xFC) {
> +                       return ath_fullboot_config(hu, HCI_SET_SLEEP_MODE);
> +               }
> +               break;
> +       }
> +       return 0;
> +}
> +
> +/* Update the number of commands that can be sent to controller */
> +void ath_handle_hci_cmd(struct ath_struct *ath, u8 * packet)
> +{
> +       spin_lock(&ath->hciath_lock);
> +       ath->num_cmds_complete--;
> +       spin_unlock(&ath->hciath_lock);
> +}
> +
> +void ath_handle_hci_event(struct ath_struct *ath, u8 * packet)
> +{
> +       switch (packet[0]) {
> +       case 0x05:              /* ACL Disconnection Complete Event */
> +               break;
> +       case 0x03:              /* ACL Connection Complete Event */
> +               break;
> +       case 0x0E:              /* Command Complete Event */
> +               spin_lock(&ath->hciath_lock);
> +               ath->num_cmds_complete = packet[2];
> +               spin_unlock(&ath->hciath_lock);
> +               break;
> +       case 0x0F:              /* Command Status Event */
> +               spin_lock(&ath->hciath_lock);
> +               ath->num_cmds_complete = packet[3];
> +               spin_unlock(&ath->hciath_lock);
> +               break;
> +       }
> +}
> +
> +void ath_handle_host_data(struct ath_struct *ath, u8 pktType, u8 * packet,
> +                         unsigned int len)
> +{
> +       switch (pktType) {
> +       case HCI_ACLDATA_PKT:   /* ACL packets */
> +               break;
> +       case HCI_COMMAND_PKT:   /* HCI Commands */
> +               ath_handle_hci_cmd(ath, packet);
> +               ath_check_sleep_cmd(ath, packet);
> +               break;
> +       }
> +}
> +
> +void ath_handle_data_from_controller(struct ath_struct *ath, u8 pktType,
> +                                    u8 *packet, unsigned int len)
> +{
> +       switch (pktType) {
> +       case HCI_ACLDATA_PKT:   /* ACL packets */
> +               break;
> +       case HCI_EVENT_PKT:     /* HCI Events */
> +               ath_handle_hci_event(ath, packet);
> +               break;
> +       }
> +}
> +
> +static struct hci_uart_proto athp = {
> +       .id = HCI_UART_ATH,
> +       .open = ath_open,
> +       .close = ath_close,
> +       .recv = ath_recv,
> +       .enqueue = ath_enqueue,
> +       .dequeue = ath_dequeue,
> +       .flush = ath_flush,
> +};
> +
> +int ath_init(void)
> +{
> +       int err = hci_uart_register_proto(&athp);
> +       if (!err)
> +               BT_INFO("HCIATH protocol initialized");
> +
> +       else
> +               BT_ERR("HCIATH protocol registration failed");
> +       return err;
> +}
> +
> +int ath_deinit(void)
> +{
> +       return hci_uart_unregister_proto(&athp);
> +}
> diff --git a/drivers/bluetooth/hci_ath.h b/drivers/bluetooth/hci_ath.h
> new file mode 100755
> index 0000000..7513a89
> --- /dev/null
> +++ b/drivers/bluetooth/hci_ath.h
> @@ -0,0 +1,72 @@
> +/*
> + * Copyright (c) 2009-2010 Atheros Communications Inc.
> + *
> + *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> + *
> + */
> +
> +#ifndef __HCI_ATH_H_
> +#define __HCI_ATH_H_
> +
> +#include <linux/fs.h>
> +#include <linux/errno.h>
> +#include <linux/string.h>
> +#include <linux/signal.h>
> +#include <linux/timer.h>
> +
> +#include <linux/ioctl.h>
> +#include <linux/skbuff.h>
> +#include <linux/firmware.h>
> +#include <linux/wait.h>
> +
> +#include <net/bluetooth/bluetooth.h>
> +#include <net/bluetooth/hci_core.h>
> +
> +/* HCIATH receiver States */
> +#define HCIATH_W4_PACKET_TYPE          0
> +#define HCIATH_W4_EVENT_HDR                    1
> +#define HCIATH_W4_ACL_HDR                      2
> +#define HCIATH_W4_SCO_HDR                      3
> +#define HCIATH_W4_DATA                         4
> +
> +#define HCI_SET_SLEEP_MODE                     0xFC04
> +#define HCI_RESET                                      0x030C
> +    struct ath_struct {
> +       struct hci_uart *hu;
> +       unsigned int rx_state;
> +       unsigned int rx_count;
> +       unsigned int cur_sleep;
> +       int num_cmds_complete;
> +       spinlock_t hciath_lock;
> +       struct sk_buff *rx_skb;
> +       struct sk_buff_head txq;
> +       struct sk_buff_head tx_wait_q;
> +       struct sk_buff_head tx_cmd_wait_q;
> +       wait_queue_head_t wqevt;
> +       struct work_struct ctxtsw;
> +};
> +int ath_write_data_to_cntrlr(void *dev, unsigned char *Data, u8 len);
> +int ath_write_data_to_host(void *dev, unsigned char *data, u8 length);
> +int ath_wakeup_ar3001(struct tty_struct *tty);
> +int ath_verify_event_discardable(struct hci_uart *hu, unsigned char pkt_type,
> +                                unsigned char *packet);
> +int ath_check_sleep_cmd(struct ath_struct *ath, unsigned char *packet);
> +void ath_handle_host_data(struct ath_struct *ath, u8 pktType, u8 *packet,
> +                         unsigned int len);
> +void ath_handle_data_from_controller(struct ath_struct *ath, u8 pktType,
> +                                    u8 *packet, unsigned int len);
> +
> +
> +#endif /* __HCI_ATH_H_ */
> diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
> index aa09193..bd16130 100644
> --- a/drivers/bluetooth/hci_ldisc.c
> +++ b/drivers/bluetooth/hci_ldisc.c
> @@ -542,6 +542,9 @@ static int __init hci_uart_init(void)
>  #ifdef CONFIG_BT_HCIUART_LL
>         ll_init();
>  #endif
> +#ifdef CONFIG_BT_HCIUART_ATH
> +       ath_init();
> +#endif
> 
>         return 0;
>  }
> @@ -559,6 +562,9 @@ static void __exit hci_uart_exit(void)
>  #ifdef CONFIG_BT_HCIUART_LL
>         ll_deinit();
>  #endif
> +#ifdef CONFIG_BT_HCIUART_ATH
> +       ath_deinit();
> +#endif
> 
>         /* Release tty registration of line discipline */
>         if ((err = tty_unregister_ldisc(N_HCI)))
> diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
> index 50113db..385537f 100644
> --- a/drivers/bluetooth/hci_uart.h
> +++ b/drivers/bluetooth/hci_uart.h
> @@ -33,13 +33,14 @@
>  #define HCIUARTGETDEVICE       _IOR('U', 202, int)
> 
>  /* UART protocols */
> -#define HCI_UART_MAX_PROTO     5
> +#define HCI_UART_MAX_PROTO     6
> 
>  #define HCI_UART_H4    0
>  #define HCI_UART_BCSP  1
>  #define HCI_UART_3WIRE 2
>  #define HCI_UART_H4DS  3
>  #define HCI_UART_LL    4
> +#define HCI_UART_ATH   5
> 
>  struct hci_uart;
> 
> @@ -91,3 +92,8 @@ int bcsp_deinit(void);
>  int ll_init(void);
>  int ll_deinit(void);
>  #endif
> +
> +#ifdef CONFIG_BT_HCIUART_ATH
> +int ath_init(void);
> +int ath_deinit(void);
> +#endif
> --
> 1.6.3.3
> 

^ permalink raw reply

* Re: [PATCH] Fix signal watch when a service name is given
From: Marcel Holtmann @ 2010-02-17 10:00 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Vinicius Gomes, linux-bluetooth
In-Reply-To: <2d5a2c101002170106t68e7ab17nbed678c7a4f62f9e@mail.gmail.com>

Hi Luiz,

> @Marcel: So before you apply this you should really apply Vinicius
> patch to the rest of projects: bluez, ofono, connman...

has been applied to all projects now. Please resend your other patch
based on the latest tree.

Regards

Marcel



^ permalink raw reply

* Re: [PATCH] Fix possible crash while verifying avdtp version
From: Marcel Holtmann @ 2010-02-17 10:01 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
In-Reply-To: <2d5a2c101002170139x52314d9g7b665c7fb769f40c@mail.gmail.com>

Hi Luiz,

> Codenomicon a2dp tests makes bluetoothd to crash due to a malformed
> sdp record (BlueZ 4.60):
> 
> Signal 11 (SIGSEGV)
> 0		avdtp_get_internal () at audio/avdtp.c:2073
> 1	0x00022f18	avdtp_confirm_cb (chan=0x6c0e0) at audio/avdtp.c:2266
> 2	0x0003a7dc	server_cb (user_data=0x6d380) at src/btio.c:193

patch has been applied. Thanks.

Regards

Marcel



^ permalink raw reply

* Re: [PATCH] bluez-hcidump fix SDP universal attributes
From: Marcel Holtmann @ 2010-02-17 10:02 UTC (permalink / raw)
  To: Iain Hibbert; +Cc: linux-bluetooth
In-Reply-To: <1266360907.186765.4119.nullmailer@galant.ukfsn.org>

Hi Iain,

> > > > > hcidump shows SDP universal attribute 0x000d as IconURL but in fact it is
> > > > > defined as "Additional Protocol Descriptor Lists". IconURL is 0x000c and I
> > > > > don't know what Icon_10 was, perhaps an older name?
> > > > >
> > > > > Eg, from an SDP probe of a mouse:
> > > > >
> > > > >       aid 0x000d (IconURL)
> > > > >          < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
> > > >
> > > > Reposting because there was no response to this, patch is attached..
> > > >
> > > > See "5.1.6 AdditionalProtocolDescriptorList attribute" and "5.1.14 IconURL
> > > > Attribute" sections in the core specification for reference..
> > > >
> > > > (they sometimes call it AdditionalProtocolDescriptorLists and that is more
> > > > accurate as more than one protocol descriptor list may be included)
> > >
> > > posting this simple (and easily verified) patch for hcidump for the third
> > > time..
> >
> > sorry for having missed it. For some reason it got sorted away. Can you
> > create a proper patch with git format-patch. That makes it way easier
> > for me to apply them.
> 
> I am not a git user but perhaps this is correct?

almost, but you need to edit your .gitconfig to create a proper author
name and more specific author email entry.

Regards

Marcel



^ permalink raw reply

* Re: [PATCH] Bluetooth: Fix out of scope variable access in hci_sock_cmsg()
From: Marcel Holtmann @ 2010-02-17 10:15 UTC (permalink / raw)
  To: Johann Felix Soden; +Cc: linux-bluetooth
In-Reply-To: <1266269028.8680.4.camel@LAPJFS>

Hi Johann,

> The pointer data can point to the variable ctv.
> Access to data happens when ctv is already out of scope.

patch has been applied to my bluetooth-2.6 tree.

Regards

Marcel



^ permalink raw reply

* Re: [PATCH] bluez-hcidump fix SDP universal attributes
From: Iain Hibbert @ 2010-02-17 10:32 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <1266400962.8849.55.camel@localhost.localdomain>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1567 bytes --]

On Wed, 17 Feb 2010, Marcel Holtmann wrote:

> Hi Iain,
>
> > > > > > hcidump shows SDP universal attribute 0x000d as IconURL but in fact it is
> > > > > > defined as "Additional Protocol Descriptor Lists". IconURL is 0x000c and I
> > > > > > don't know what Icon_10 was, perhaps an older name?
> > > > > >
> > > > > > Eg, from an SDP probe of a mouse:
> > > > > >
> > > > > >       aid 0x000d (IconURL)
> > > > > >          < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
> > > > >
> > > > > Reposting because there was no response to this, patch is attached..
> > > > >
> > > > > See "5.1.6 AdditionalProtocolDescriptorList attribute" and "5.1.14 IconURL
> > > > > Attribute" sections in the core specification for reference..
> > > > >
> > > > > (they sometimes call it AdditionalProtocolDescriptorLists and that is more
> > > > > accurate as more than one protocol descriptor list may be included)
> > > >
> > > > posting this simple (and easily verified) patch for hcidump for the third
> > > > time..
> > >
> > > sorry for having missed it. For some reason it got sorted away. Can you
> > > create a proper patch with git format-patch. That makes it way easier
> > > for me to apply them.
> >
> > I am not a git user but perhaps this is correct?
>
> almost, but you need to edit your .gitconfig to create a proper author
> name and more specific author email entry.

Perhaps this is finally correct, but you discourage contributions by being
so restrictive in accepting submissions.  Also, you really do need a bug
tracker.

regards,
iain

[-- Attachment #2: Type: TEXT/PLAIN, Size: 2093 bytes --]

From 4c385a2ee6cd49aeaa5e50d0d425379d929624d0 Mon Sep 17 00:00:00 2001
From: Iain Hibbert <plunky@rya-online.net>
Date: Wed, 17 Feb 2010 10:26:04 +0000
Subject: [PATCH] correct SDP Universal Attribute name printing

    0x000c = Icon URL
    0x000d = Additional Protocol Descriptor Lists
---
 parser/sdp.c |    2 +-
 parser/sdp.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/parser/sdp.c b/parser/sdp.c
index 5f2c1c6..b9f990e 100644
--- a/parser/sdp.c
+++ b/parser/sdp.c
@@ -194,8 +194,8 @@ static sdp_attr_id_nam_lookup_table_t sdp_attr_id_nam_lookup_table[] = {
 	{ SDP_ATTR_ID_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, "BTProfileDescList"  },
 	{ SDP_ATTR_ID_DOCUMENTATION_URL,                 "DocURL"             },
 	{ SDP_ATTR_ID_CLIENT_EXECUTABLE_URL,             "ClientExeURL"       },
-	{ SDP_ATTR_ID_ICON_10,                           "Icon10"             },
 	{ SDP_ATTR_ID_ICON_URL,                          "IconURL"            },
+	{ SDP_ATTR_ID_ADDITIONAL_PROTOCOL_DESC_LISTS,    "AdditionalProtocolDescLists" },
 	{ SDP_ATTR_ID_SERVICE_NAME,                      "SrvName"            },
 	{ SDP_ATTR_ID_SERVICE_DESCRIPTION,               "SrvDesc"            },
 	{ SDP_ATTR_ID_PROVIDER_NAME,                     "ProviderName"       },
diff --git a/parser/sdp.h b/parser/sdp.h
index 09e4432..4769fd0 100644
--- a/parser/sdp.h
+++ b/parser/sdp.h
@@ -129,8 +129,8 @@
 #define SDP_ATTR_ID_BLUETOOTH_PROFILE_DESCRIPTOR_LIST  0x0009
 #define SDP_ATTR_ID_DOCUMENTATION_URL                  0x000A
 #define SDP_ATTR_ID_CLIENT_EXECUTABLE_URL              0x000B
-#define SDP_ATTR_ID_ICON_10                            0x000C
-#define SDP_ATTR_ID_ICON_URL                           0x000D
+#define SDP_ATTR_ID_ICON_URL                           0x000C
+#define SDP_ATTR_ID_ADDITIONAL_PROTOCOL_DESC_LISTS     0x000D
 #define SDP_ATTR_ID_SERVICE_NAME                       0x0100
 #define SDP_ATTR_ID_SERVICE_DESCRIPTION                0x0101
 #define SDP_ATTR_ID_PROVIDER_NAME                      0x0102
-- 
1.6.6


^ permalink raw reply related

* [Patch 0/2] Resend: Fix hcidump compilation with bluez-4.61+
From: Stefan Seyfried @ 2010-02-17 12:49 UTC (permalink / raw)
  To: BlueZ development; +Cc: Marcel Holtmann

Bluez 4.61 broke compilation of hcidump.
The first patch fixes this for bluez 4.61, the second patch implements an
(admittedly ugly) hack to also allow to compile hcidump with older bluez
versions.

^ permalink raw reply

* [PATCH 1/2] Fix compilation with bluez 4.61's changed hci.h
From: Stefan Seyfried @ 2010-02-17 12:49 UTC (permalink / raw)
  To: BlueZ development; +Cc: Marcel Holtmann, Stefan Seyfried
In-Reply-To: <1266410982-26964-1-git-send-email-stefan.seyfried@googlemail.com>

From: Stefan Seyfried <seife@sphairon.com>

---
 parser/hci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/parser/hci.c b/parser/hci.c
index f1507fc..e4fc473 100644
--- a/parser/hci.c
+++ b/parser/hci.c
@@ -1973,7 +1973,7 @@ static inline void read_ext_inquiry_response_dump(int level, struct frame *frm)
 
 static inline void read_inquiry_transmit_power_level_dump(int level, struct frame *frm)
 {
-	read_inquiry_transmit_power_level_rp *rp = frm->ptr;
+	read_inq_response_tx_power_level_rp *rp = frm->ptr;
 
 	p_indent(level, frm);
 	printf("status 0x%2.2x level %d\n", rp->status, rp->level);
@@ -2325,7 +2325,7 @@ static inline void cmd_complete_dump(int level, struct frame *frm)
 		case OCF_READ_EXT_INQUIRY_RESPONSE:
 			read_ext_inquiry_response_dump(level, frm);
 			return;
-		case OCF_READ_INQUIRY_TRANSMIT_POWER_LEVEL:
+		case OCF_READ_INQ_RESPONSE_TX_POWER_LEVEL:
 			read_inquiry_transmit_power_level_dump(level, frm);
 			return;
 		case OCF_READ_DEFAULT_ERROR_DATA_REPORTING:
-- 
1.6.6.1

^ permalink raw reply related

* [PATCH 2/2] Add hack to allow compilation with old bluez lib
From: Stefan Seyfried @ 2010-02-17 12:49 UTC (permalink / raw)
  To: BlueZ development; +Cc: Marcel Holtmann, Stefan Seyfried
In-Reply-To: <1266410982-26964-2-git-send-email-stefan.seyfried@googlemail.com>

From: Stefan Seyfried <seife@sphairon.com>

---
 parser/hci.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/parser/hci.c b/parser/hci.c
index e4fc473..33c3640 100644
--- a/parser/hci.c
+++ b/parser/hci.c
@@ -41,6 +41,12 @@
 #include <bluetooth/hci.h>
 #include <bluetooth/hci_lib.h>
 
+/* ugly hack, as hci.h changed incompatibly with bluez 4.61 */
+#ifndef OCF_READ_INQ_RESPONSE_TX_POWER_LEVEL
+#define OCF_READ_INQ_RESPONSE_TX_POWER_LEVEL OCF_READ_INQUIRY_TRANSMIT_POWER_LEVEL
+#define read_inq_response_tx_power_level_rp read_inquiry_transmit_power_level_rp
+#endif
+
 #include "parser.h"
 
 static uint16_t manufacturer = DEFAULT_COMPID;
-- 
1.6.6.1

^ permalink raw reply related

* lenovo laser bt mouse
From: Pavol Klačanský @ 2010-02-17 14:58 UTC (permalink / raw)
  To: linux-bluetooth

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

Could you help me with autopairing settings (no applets, only config
files)

THX

[-- Attachment #2: Toto je digitálne podpísaná časť správy --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: [PATCH] Fix signal watch when a service name is given
From: Luiz Augusto von Dentz @ 2010-02-17 16:08 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Vinicius Gomes, linux-bluetooth
In-Reply-To: <1266400825.8849.53.camel@localhost.localdomain>

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

Hi Marcel,

On Wed, Feb 17, 2010 at 12:00 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Luiz,
>
>> @Marcel: So before you apply this you should really apply Vinicius
>> patch to the rest of projects: bluez, ofono, connman...
>
> has been applied to all projects now. Please resend your other patch
> based on the latest tree.

Resending the patch and also add another one to make sure we cancel
any pending operation during watch removal.

-- 
Luiz Augusto von Dentz
Computer Engineer

[-- Attachment #2: 0001-Fix-signal-watch-when-a-service-name-is-given.patch --]
[-- Type: text/x-patch, Size: 9393 bytes --]

From b496f47dd7cdd3e3930d13579021908a8b3f857b Mon Sep 17 00:00:00 2001
From: Luiz Augusto Von Dentz <luiz.dentz-von@nokia.com>
Date: Wed, 17 Feb 2010 17:11:02 +0200
Subject: [PATCH 1/2] Fix signal watch when a service name is given

The bus name should be resolved when adding a watch by service name since
messages do always come with sender set to owner's bus name, also it
should listen to owner updates since it can change without invalidating
the watch.
---
 gdbus/watch.c |  161 +++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 128 insertions(+), 33 deletions(-)

diff --git a/gdbus/watch.c b/gdbus/watch.c
index 1d479fa..ef02201 100644
--- a/gdbus/watch.c
+++ b/gdbus/watch.c
@@ -55,19 +55,22 @@ struct filter_callback {
 struct filter_data {
 	DBusConnection *connection;
 	DBusHandleMessageFunction handle_func;
-	char *sender;
+	char *name;
+	char *owner;
 	char *path;
 	char *interface;
 	char *member;
 	char *argument;
 	GSList *callbacks;
 	GSList *processed;
+	guint name_watch;
 	gboolean lock;
 	gboolean registered;
 };
 
 static struct filter_data *filter_data_find(DBusConnection *connection,
-							const char *sender,
+							const char *name,
+							const char *owner,
 							const char *path,
 							const char *interface,
 							const char *member,
@@ -82,8 +85,12 @@ static struct filter_data *filter_data_find(DBusConnection *connection,
 		if (connection != data->connection)
 			continue;
 
-		if (sender && data->sender &&
-				g_str_equal(sender, data->sender) == FALSE)
+		if (name && data->name &&
+				g_str_equal(name, data->name) == FALSE)
+			continue;
+
+		if (owner && data->owner &&
+				g_str_equal(owner, data->owner) == FALSE)
 			continue;
 
 		if (path && data->path &&
@@ -110,13 +117,15 @@ static struct filter_data *filter_data_find(DBusConnection *connection,
 
 static void format_rule(struct filter_data *data, char *rule, size_t size)
 {
+	const char *sender;
 	int offset;
 
 	offset = snprintf(rule, size, "type='signal'");
+	sender = data->name ? : data->owner;
 
-	if (data->sender)
+	if (sender)
 		offset += snprintf(rule + offset, size - offset,
-				",sender='%s'", data->sender);
+				",sender='%s'", sender);
 	if (data->path)
 		offset += snprintf(rule + offset, size - offset,
 				",path='%s'", data->path);
@@ -183,8 +192,10 @@ static struct filter_data *filter_data_get(DBusConnection *connection,
 					const char *argument)
 {
 	struct filter_data *data;
+	const char *name = NULL, *owner = NULL;
 
-	if (!filter_data_find(connection, NULL, NULL, NULL, NULL, NULL)) {
+	if (!filter_data_find(connection, NULL, NULL, NULL, NULL, NULL,
+				NULL)) {
 		if (!dbus_connection_add_filter(connection,
 					message_filter, NULL, NULL)) {
 			error("dbus_connection_add_filter() failed");
@@ -192,15 +203,25 @@ static struct filter_data *filter_data_get(DBusConnection *connection,
 		}
 	}
 
-	data = filter_data_find(connection, sender, path, interface, member,
-					argument);
+	if (sender == NULL)
+		goto proceed;
+
+	if (sender[0] == ':')
+		owner = sender;
+	else
+		name = sender;
+
+proceed:
+	data = filter_data_find(connection, name, owner, path, interface,
+					member, argument);
 	if (data)
 		return data;
 
 	data = g_new0(struct filter_data, 1);
 
 	data->connection = dbus_connection_ref(connection);
-	data->sender = g_strdup(sender);
+	data->name = name ? g_strdup(name) : NULL;
+	data->owner = owner ? g_strdup(owner) : NULL;
 	data->path = g_strdup(path);
 	data->interface = g_strdup(interface);
 	data->member = g_strdup(member);
@@ -244,7 +265,9 @@ static void filter_data_free(struct filter_data *data)
 		g_free(l->data);
 
 	g_slist_free(data->callbacks);
-	g_free(data->sender);
+	g_dbus_remove_watch(data->connection, data->name_watch);
+	g_free(data->name);
+	g_free(data->owner);
 	g_free(data->path);
 	g_free(data->interface);
 	g_free(data->member);
@@ -322,7 +345,8 @@ static gboolean filter_data_remove_callback(struct filter_data *data,
 	filter_data_free(data);
 
 	/* Remove filter if there are no listeners left for the connection */
-	data = filter_data_find(connection, NULL, NULL, NULL, NULL, NULL);
+	data = filter_data_find(connection, NULL, NULL, NULL, NULL, NULL,
+					NULL);
 	if (!data)
 		dbus_connection_remove_filter(connection, message_filter,
 						NULL);
@@ -359,6 +383,37 @@ static DBusHandlerResult signal_filter(DBusConnection *connection,
 	return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 }
 
+static void update_name_cache(const char *name, const char *owner)
+{
+	GSList *l;
+
+	for (l = listeners; l != NULL; l = l->next) {
+		struct filter_data *data = l->data;
+
+		if (g_strcmp0(data->name, name) != 0)
+			continue;
+
+		g_free(data->owner);
+		data->owner = g_strdup(owner);
+	}
+}
+
+static const char *check_name_cache(const char *name)
+{
+	GSList *l;
+
+	for (l = listeners; l != NULL; l = l->next) {
+		struct filter_data *data = l->data;
+
+		if (g_strcmp0(data->name, name) != 0)
+			continue;
+
+		return data->owner;
+	}
+
+	return NULL;
+}
+
 static DBusHandlerResult service_filter(DBusConnection *connection,
 					DBusMessage *message, void *user_data)
 {
@@ -375,6 +430,8 @@ static DBusHandlerResult service_filter(DBusConnection *connection,
 		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 	}
 
+	update_name_cache(name, new);
+
 	while (data->callbacks) {
 		cb = data->callbacks->data;
 
@@ -421,7 +478,9 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
 	member = dbus_message_get_member(message);
 	dbus_message_get_args(message, NULL, DBUS_TYPE_STRING, &arg, DBUS_TYPE_INVALID);
 
-	data = filter_data_find(connection, sender, path, iface, member, arg);
+	/* Sender is always bus name */
+	data = filter_data_find(connection, NULL, sender, path, iface, member,
+					arg);
 	if (!data) {
 		error("Got %s.%s signal which has no listeners", iface, member);
 		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -446,7 +505,8 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
 	filter_data_free(data);
 
 	/* Remove filter if there no listener left for the connection */
-	data = filter_data_find(connection, NULL, NULL, NULL, NULL, NULL);
+	data = filter_data_find(connection, NULL, NULL, NULL, NULL, NULL,
+					NULL);
 	if (!data)
 		dbus_connection_remove_filter(connection, message_filter,
 						NULL);
@@ -456,38 +516,60 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
 
 struct service_data {
 	DBusConnection *conn;
+	char *name;
+	const char *owner;
 	GDBusWatchFunction conn_func;
 	void *user_data;
 };
 
+static void service_data_free(struct service_data *data)
+{
+	dbus_connection_unref(data->conn);
+	g_free(data->name);
+	g_free(data);
+}
+
+static gboolean update_service(void *user_data)
+{
+	struct service_data *data = user_data;
+
+	update_name_cache(data->name, data->owner);
+	if (data->conn_func)
+		data->conn_func(data->conn, data->user_data);
+
+	service_data_free(data);
+
+	return FALSE;
+}
+
 static void service_reply(DBusPendingCall *call, void *user_data)
 {
 	struct service_data *data = user_data;
 	DBusMessage *reply;
-	DBusError error;
-	dbus_bool_t has_owner;
+	DBusError err;
 
 	reply = dbus_pending_call_steal_reply(call);
 	if (reply == NULL)
 		return;
 
-	dbus_error_init(&error);
+	dbus_error_init(&err);
 
-	if (dbus_message_get_args(reply, &error,
-					DBUS_TYPE_BOOLEAN, &has_owner,
-						DBUS_TYPE_INVALID) == FALSE) {
-		if (dbus_error_is_set(&error) == TRUE) {
-			error("%s", error.message);
-			dbus_error_free(&error);
-		} else {
-			error("Wrong arguments for NameHasOwner reply");
-		}
-		goto done;
-	}
+	if (dbus_set_error_from_message(&err, reply))
+		goto fail;
 
-	if (has_owner && data->conn_func)
-		data->conn_func(data->conn, data->user_data);
+	if (dbus_message_get_args(reply, &err,
+					DBUS_TYPE_STRING, &data->owner,
+						DBUS_TYPE_INVALID) == FALSE)
+		goto fail;
 
+	update_service(data);
+
+	goto done;
+
+fail:
+	error("%s", err.message);
+	dbus_error_free(&err);
+	service_data_free(data);
 done:
 	dbus_message_unref(reply);
 }
@@ -505,12 +587,19 @@ static void check_service(DBusConnection *connection, const char *name,
 		return;
 	}
 
-	data->conn = connection;
+	data->conn = dbus_connection_ref(connection);
+	data->name = g_strdup(name);
 	data->conn_func = connect;
 	data->user_data = user_data;
 
+	data->owner = check_name_cache(name);
+	if (data->owner != NULL) {
+		g_idle_add(update_service, data);
+		return;
+	}
+
 	message = dbus_message_new_method_call(DBUS_SERVICE_DBUS,
-			DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "NameHasOwner");
+			DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "GetNameOwner");
 	if (message == NULL) {
 		error("Can't allocate new message");
 		g_free(data);
@@ -596,6 +685,11 @@ guint g_dbus_add_signal_watch(DBusConnection *connection,
 	if (!cb)
 		return 0;
 
+	if (data->name != NULL && data->name_watch == 0)
+		data->name_watch = g_dbus_add_service_watch(connection,
+							data->name, NULL,
+							NULL, NULL, NULL);
+
 	return cb->id;
 }
 
@@ -625,7 +719,8 @@ void g_dbus_remove_all_watches(DBusConnection *connection)
 {
 	struct filter_data *data;
 
-	while ((data = filter_data_find(connection, NULL, NULL, NULL, NULL, NULL))) {
+	while ((data = filter_data_find(connection, NULL, NULL, NULL, NULL,
+					NULL, NULL))) {
 		listeners = g_slist_remove(listeners, data);
 		filter_data_call_and_free(data);
 	}
-- 
1.6.3.3


[-- Attachment #3: 0002-Fix-calling-watch-callbacks-after-it-has-been-remove.patch --]
[-- Type: text/x-patch, Size: 5020 bytes --]

From c282840ddba7fb9ace5050bb93ae9ca44b57db9f Mon Sep 17 00:00:00 2001
From: Luiz Augusto Von Dentz <luiz.dentz-von@nokia.com>
Date: Wed, 17 Feb 2010 17:12:19 +0200
Subject: [PATCH 2/2] Fix calling watch callbacks after it has been removed

Pending call should be removed if the watch is removed since the
application no longer expect that to be reached and may already freed the
data associated with it.
---
 gdbus/watch.c |   79 +++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 49 insertions(+), 30 deletions(-)

diff --git a/gdbus/watch.c b/gdbus/watch.c
index ef02201..2bec21a 100644
--- a/gdbus/watch.c
+++ b/gdbus/watch.c
@@ -43,11 +43,21 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
 static guint listener_id = 0;
 static GSList *listeners = NULL;
 
+struct service_data {
+	DBusConnection *conn;
+	DBusPendingCall *call;
+	char *name;
+	const char *owner;
+	guint id;
+	struct filter_callback *callback;
+};
+
 struct filter_callback {
 	GDBusWatchFunction conn_func;
 	GDBusWatchFunction disc_func;
 	GDBusSignalFunction signal_func;
 	GDBusDestroyFunction destroy_func;
+	struct service_data *data;
 	void *user_data;
 	guint id;
 };
@@ -302,7 +312,7 @@ static struct filter_callback *filter_data_add_callback(
 {
 	struct filter_callback *cb = NULL;
 
-	cb = g_new(struct filter_callback, 1);
+	cb = g_new0(struct filter_callback, 1);
 
 	cb->conn_func = connect;
 	cb->disc_func = disconnect;
@@ -319,6 +329,24 @@ static struct filter_callback *filter_data_add_callback(
 	return cb;
 }
 
+static void service_data_free(struct service_data *data)
+{
+	struct filter_callback *callback = data->callback;
+
+	dbus_connection_unref(data->conn);
+
+	if (data->call)
+		dbus_pending_call_unref(data->call);
+
+	if (data->id)
+		g_source_remove(data->id);
+
+	g_free(data->name);
+	g_free(data);
+
+	callback->data = NULL;
+}
+
 static gboolean filter_data_remove_callback(struct filter_data *data,
 						struct filter_callback *cb)
 {
@@ -327,6 +355,13 @@ static gboolean filter_data_remove_callback(struct filter_data *data,
 	data->callbacks = g_slist_remove(data->callbacks, cb);
 	data->processed = g_slist_remove(data->processed, cb);
 
+	/* Cancel pending operations */
+	if (cb->data) {
+		if (cb->data->call)
+			dbus_pending_call_cancel(cb->data->call);
+		service_data_free(cb->data);
+	}
+
 	if (cb->destroy_func)
 		cb->destroy_func(cb->user_data);
 
@@ -514,28 +549,14 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
 	return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 }
 
-struct service_data {
-	DBusConnection *conn;
-	char *name;
-	const char *owner;
-	GDBusWatchFunction conn_func;
-	void *user_data;
-};
-
-static void service_data_free(struct service_data *data)
-{
-	dbus_connection_unref(data->conn);
-	g_free(data->name);
-	g_free(data);
-}
-
 static gboolean update_service(void *user_data)
 {
 	struct service_data *data = user_data;
+	struct filter_callback *cb = data->callback;
 
 	update_name_cache(data->name, data->owner);
-	if (data->conn_func)
-		data->conn_func(data->conn, data->user_data);
+	if (cb->conn_func)
+		cb->conn_func(data->conn, cb->user_data);
 
 	service_data_free(data);
 
@@ -574,11 +595,11 @@ done:
 	dbus_message_unref(reply);
 }
 
-static void check_service(DBusConnection *connection, const char *name,
-				GDBusWatchFunction connect, void *user_data)
+static void check_service(DBusConnection *connection,
+					const char *name,
+					struct filter_callback *callback)
 {
 	DBusMessage *message;
-	DBusPendingCall *call;
 	struct service_data *data;
 
 	data = g_try_malloc0(sizeof(*data));
@@ -589,12 +610,12 @@ static void check_service(DBusConnection *connection, const char *name,
 
 	data->conn = dbus_connection_ref(connection);
 	data->name = g_strdup(name);
-	data->conn_func = connect;
-	data->user_data = user_data;
+	data->callback = callback;
+	callback->data = data;
 
 	data->owner = check_name_cache(name);
 	if (data->owner != NULL) {
-		g_idle_add(update_service, data);
+		data->id = g_idle_add(update_service, data);
 		return;
 	}
 
@@ -610,21 +631,19 @@ static void check_service(DBusConnection *connection, const char *name,
 							DBUS_TYPE_INVALID);
 
 	if (dbus_connection_send_with_reply(connection, message,
-							&call, -1) == FALSE) {
+							&data->call, -1) == FALSE) {
 		error("Failed to execute method call");
 		g_free(data);
 		goto done;
 	}
 
-	if (call == NULL) {
+	if (data->call == NULL) {
 		error("D-Bus connection not available");
 		g_free(data);
 		goto done;
 	}
 
-	dbus_pending_call_set_notify(call, service_reply, data, NULL);
-
-	dbus_pending_call_unref(call);
+	dbus_pending_call_set_notify(data->call, service_reply, data, NULL);
 
 done:
 	dbus_message_unref(message);
@@ -653,7 +672,7 @@ guint g_dbus_add_service_watch(DBusConnection *connection, const char *name,
 		return 0;
 
 	if (connect)
-		check_service(connection, name, connect, user_data);
+		check_service(connection, name, cb);
 
 	return cb->id;
 }
-- 
1.6.3.3


^ permalink raw reply related

* Re: [PATCH] Bluetooth: Allow SCO/eSCO packet type selection for outgoing SCO connections.
From: Nick Pelly @ 2010-02-17 16:49 UTC (permalink / raw)
  To: Ville Tervo; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <4B7BB746.1040806@nokia.com>

On Wed, Feb 17, 2010 at 1:30 AM, Ville Tervo <ville.tervo@nokia.com> wrote:
> ext Nick Pelly wrote:
>>
>> On Thu, Feb 11, 2010 at 11:59 AM, Nick Pelly <npelly@google.com> wrote:
>>>
>>> On Thu, Feb 11, 2010 at 11:54 AM, Nick Pelly <npelly@google.com> wrote:
>>>>
>>>> __u16 sco_pkt_type is introduced to struct sockaddr_sco. It allows
>>>> bitwise
>>>> selection of SCO/eSCO packet types as per the Packet_Type parameter in
>>>> HCI Setup Synchrnous Connection Command.
>>>>
>>>> 0x0001 HV1 may be used.
>>>> 0x0002 HV2 may be used.
>>>> 0x0004 HV3 may be used.
>>>> 0x0008 EV3 may be used.
>>>> 0x0010 EV4 may be used.
>>>> 0x0020 EV5 may be used.
>>>> 0x0040 2-EV3 may not be used.
>>>> 0x0080 3-EV3 may not be used.
>>>> 0x0100 2-EV5 may not be used.
>>>> 0x0200 3-EV5 may not be used.
>>>>
>>>> We've followed the Bluetooth SIG convention of reversing the logic on
>>>> the
>>>> EDR bits.
>>>>
>>>> Packet type selection is just a request made to the Bluetooth chipset,
>>>> and
>>>> it is up to the link manager on the chipset to negiotiate and decide on
>>>> the
>>>> actual packet types used. Furthermore, when a SCO/eSCO connection is
>>>> eventually
>>>> made there is no way for the host stack to determine which packet type
>>>> was used
>>>> (however it is possible to get the link type of SCO or eSCO).
>>>>
>>>> sco_pkt_type is ignored for incoming SCO connections. It is possible
>>>> to add this in the future as a parameter to the Accept Synchronous
>>>> Connection
>>>> Command, however its a little trickier because the kernel does not
>>>> currently preserve sockaddr_sco data between userspace calls to
>>>> accept().
>>>>
>>>> Typically userspace just wants to select eSCO or SCO packet types, which
>>>> can be
>>>> done with the new constants ALL_SCO_PKTS or ALL_ESCO_PKTS. If
>>>> sco_pkt_type is
>>>> zero, or userspace uses the old sockaddr_sco structure size, then
>>>> ALL_ESCO_PKTS
>>>> will be selected as default.
>>>>
>>>> This patch is motivated by broken Bluetooth carkits such as the Motorolo
>>>> HF850 (it claims to support eSCO, but will actually reject eSCO
>>>> connections
>>>> after 5 seconds) and the 2007/2008 Infiniti G35/37 (fails to route audio
>>>> if a 2-EV5 packet type is negiotiated). With this patch userspace can
>>>> maintain
>>>> a blacklist of packet types to workaround broken remote devices such as
>>>> these.
>>>>
>>>> Signed-off-by: Nick Pelly <npelly@google.com>
>>>> ---
>>>>  include/net/bluetooth/hci.h      |    7 +++-
>>>>  include/net/bluetooth/hci_core.h |    7 +++-
>>>>  include/net/bluetooth/sco.h      |    4 ++-
>>>>  net/bluetooth/hci_conn.c         |   25 +++++++++------
>>>>  net/bluetooth/hci_event.c        |    6 ++-
>>>>  net/bluetooth/l2cap.c            |    2 +-
>>>>  net/bluetooth/sco.c              |   61
>>>> +++++++++++++++++++++++++------------
>>>>  7 files changed, 74 insertions(+), 38 deletions(-)
>>>>
>>>> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
>>>> index 4f7795f..72efc94 100644
>>>> --- a/include/net/bluetooth/hci.h
>>>> +++ b/include/net/bluetooth/hci.h
>>>> @@ -139,8 +139,11 @@ enum {
>>>>  #define ESCO_2EV5      0x0100
>>>>  #define ESCO_3EV5      0x0200
>>>>
>>>> -#define SCO_ESCO_MASK  (ESCO_HV1 | ESCO_HV2 | ESCO_HV3)
>>>> -#define EDR_ESCO_MASK  (ESCO_2EV3 | ESCO_3EV3 | ESCO_2EV5 | ESCO_3EV5)
>>>> +#define SCO_ESCO_MASK  (ESCO_HV1 | ESCO_HV2 | ESCO_HV3)
>>>> +#define EDR_ESCO_MASK  (ESCO_2EV3 | ESCO_3EV3 | ESCO_2EV5 | ESCO_3EV5)
>>>> +
>>>> +#define ALL_SCO_PKTS   (SCO_ESCO_MASK | EDR_ESCO_MASK)
>>>> +#define ALL_ESCO_PKTS  (SCO_ESCO_MASK | ESCO_EV3 | ESCO_EV4 | ESCO_EV5)
>>>>
>>>>  /* ACL flags */
>>>>  #define ACL_START              0x00
>>>> diff --git a/include/net/bluetooth/hci_core.h
>>>> b/include/net/bluetooth/hci_core.h
>>>> index b6d36cb..cbcc5b1 100644
>>>> --- a/include/net/bluetooth/hci_core.h
>>>> +++ b/include/net/bluetooth/hci_core.h
>>>> @@ -326,12 +326,15 @@ void hci_acl_disconn(struct hci_conn *conn, __u8
>>>> reason);
>>>>  void hci_add_sco(struct hci_conn *conn, __u16 handle);
>>>>  void hci_setup_sync(struct hci_conn *conn, __u16 handle);
>>>>
>>>> -struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t
>>>> *dst);
>>>> +struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type,
>>>> +                                       __u16 pkt_type, bdaddr_t *dst);
>>>>  int hci_conn_del(struct hci_conn *conn);
>>>>  void hci_conn_hash_flush(struct hci_dev *hdev);
>>>>  void hci_conn_check_pending(struct hci_dev *hdev);
>>>>
>>>> -struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t
>>>> *dst, __u8 sec_level, __u8 auth_type);
>>>> +struct hci_conn *hci_connect(struct hci_dev *hdev, int type,
>>>> +                                       __u16 pkt_type, bdaddr_t *dst,
>>>> +                                       __u8 sec_level, __u8 auth_type);
>>>>  int hci_conn_check_link_mode(struct hci_conn *conn);
>>>>  int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8
>>>> auth_type);
>>>>  int hci_conn_change_link_key(struct hci_conn *conn);
>>>> diff --git a/include/net/bluetooth/sco.h b/include/net/bluetooth/sco.h
>>>> index e28a2a7..924338a 100644
>>>> --- a/include/net/bluetooth/sco.h
>>>> +++ b/include/net/bluetooth/sco.h
>>>> @@ -37,6 +37,7 @@
>>>>  struct sockaddr_sco {
>>>>       sa_family_t     sco_family;
>>>>       bdaddr_t        sco_bdaddr;
>>>> +       __u16           sco_pkt_type;
>>>>  };
>>>>
>>>>  /* SCO socket options */
>>>> @@ -72,7 +73,8 @@ struct sco_conn {
>>>>
>>>>  struct sco_pinfo {
>>>>       struct bt_sock  bt;
>>>> -       __u32           flags;
>>>> +       __u16           pkt_type;
>>>> +
>>>>       struct sco_conn *conn;
>>>>  };
>>>>
>>>> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
>>>> index fa8b412..8ced057 100644
>>>> --- a/net/bluetooth/hci_conn.c
>>>> +++ b/net/bluetooth/hci_conn.c
>>>> @@ -196,7 +196,8 @@ static void hci_conn_idle(unsigned long arg)
>>>>       hci_conn_enter_sniff_mode(conn);
>>>>  }
>>>>
>>>> -struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t
>>>> *dst)
>>>> +struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type,
>>>> +                                       __u16 pkt_type, bdaddr_t *dst)
>>>>  {
>>>>       struct hci_conn *conn;
>>>>
>>>> @@ -221,14 +222,16 @@ struct hci_conn *hci_conn_add(struct hci_dev
>>>> *hdev, int type, bdaddr_t *dst)
>>>>               conn->pkt_type = hdev->pkt_type & ACL_PTYPE_MASK;
>>>>               break;
>>>>       case SCO_LINK:
>>>> +               if (!pkt_type)
>>>> +                       pkt_type = ALL_SCO_PKTS;
>>>> +       case ESCO_LINK:
>>>> +               if (!pkt_type)
>>>> +                       pkt_type = ALL_ESCO_PKTS;
>>>>               if (lmp_esco_capable(hdev))
>>>> -                       conn->pkt_type = (hdev->esco_type &
>>>> SCO_ESCO_MASK) |
>>>> -                                       (hdev->esco_type &
>>>> EDR_ESCO_MASK);
>>>> +                       conn->pkt_type = pkt_type & hdev->esco_type;
>>>>               else
>>>> -                       conn->pkt_type = hdev->pkt_type &
>>>> SCO_PTYPE_MASK;
>>>> -               break;
>>>> -       case ESCO_LINK:
>>>> -               conn->pkt_type = hdev->esco_type & ~EDR_ESCO_MASK;
>>>> +                       conn->pkt_type = (pkt_type << 5) &
>>>> hdev->pkt_type &
>>>> +                                       SCO_PTYPE_MASK;
>>>>               break;
>>>>       }
>>>>
>>>> @@ -340,7 +343,9 @@ EXPORT_SYMBOL(hci_get_route);
>>>>
>>>>  /* Create SCO or ACL connection.
>>>>  * Device _must_ be locked */
>>>> -struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t
>>>> *dst, __u8 sec_level, __u8 auth_type)
>>>> +struct hci_conn *hci_connect(struct hci_dev *hdev, int type,
>>>> +                                       __u16 pkt_type, bdaddr_t *dst,
>>>> +                                       __u8 sec_level, __u8 auth_type)
>>>>  {
>>>>       struct hci_conn *acl;
>>>>       struct hci_conn *sco;
>>>> @@ -348,7 +353,7 @@ struct hci_conn *hci_connect(struct hci_dev *hdev,
>>>> int type, bdaddr_t *dst, __u8
>>>>       BT_DBG("%s dst %s", hdev->name, batostr(dst));
>>>>
>>>>       if (!(acl = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst))) {
>>>> -               if (!(acl = hci_conn_add(hdev, ACL_LINK, dst)))
>>>> +               if (!(acl = hci_conn_add(hdev, ACL_LINK, 0, dst)))
>>>>                       return NULL;
>>>>       }
>>>>
>>>> @@ -364,7 +369,7 @@ struct hci_conn *hci_connect(struct hci_dev *hdev,
>>>> int type, bdaddr_t *dst, __u8
>>>>               return acl;
>>>>
>>>>       if (!(sco = hci_conn_hash_lookup_ba(hdev, type, dst))) {
>>>> -               if (!(sco = hci_conn_add(hdev, type, dst))) {
>>>> +               if (!(sco = hci_conn_add(hdev, type, pkt_type, dst))) {
>>>>                       hci_conn_put(acl);
>>>>                       return NULL;
>>>>               }
>>>> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
>>>> index 10edd1a..5343e0f 100644
>>>> --- a/net/bluetooth/hci_event.c
>>>> +++ b/net/bluetooth/hci_event.c
>>>> @@ -579,7 +579,7 @@ static inline void hci_cs_create_conn(struct hci_dev
>>>> *hdev, __u8 status)
>>>>               }
>>>>       } else {
>>>>               if (!conn) {
>>>> -                       conn = hci_conn_add(hdev, ACL_LINK,
>>>> &cp->bdaddr);
>>>> +                       conn = hci_conn_add(hdev, ACL_LINK, 0,
>>>> &cp->bdaddr);
>>>>                       if (conn) {
>>>>                               conn->out = 1;
>>>>                               conn->link_mode |= HCI_LM_MASTER;
>>>> @@ -964,7 +964,9 @@ static inline void hci_conn_request_evt(struct
>>>> hci_dev *hdev, struct sk_buff *sk
>>>>
>>>>               conn = hci_conn_hash_lookup_ba(hdev, ev->link_type,
>>>> &ev->bdaddr);
>>>>               if (!conn) {
>>>> -                       if (!(conn = hci_conn_add(hdev, ev->link_type,
>>>> &ev->bdaddr))) {
>>>> +                       /* pkt_type not yet used for incoming
>>>> connections */
>>>> +                       if (!(conn = hci_conn_add(hdev, ev->link_type,
>>>> 0,
>>>> +                                                       &ev->bdaddr))) {
>>>>                               BT_ERR("No memmory for new connection");
>>>>                               hci_dev_unlock(hdev);
>>>>                               return;
>>>> diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
>>>> index d056886..b342f06 100644
>>>> --- a/net/bluetooth/l2cap.c
>>>> +++ b/net/bluetooth/l2cap.c
>>>> @@ -955,7 +955,7 @@ static int l2cap_do_connect(struct sock *sk)
>>>>               }
>>>>       }
>>>>
>>>> -       hcon = hci_connect(hdev, ACL_LINK, dst,
>>>> +       hcon = hci_connect(hdev, ACL_LINK, 0, dst,
>>>>                                       l2cap_pi(sk)->sec_level,
>>>> auth_type);
>>>>       if (!hcon)
>>>>               goto done;
>>>> diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
>>>> index 77f4153..4976ad5 100644
>>>> --- a/net/bluetooth/sco.c
>>>> +++ b/net/bluetooth/sco.c
>>>> @@ -176,6 +176,7 @@ static int sco_connect(struct sock *sk)
>>>>  {
>>>>       bdaddr_t *src = &bt_sk(sk)->src;
>>>>       bdaddr_t *dst = &bt_sk(sk)->dst;
>>>> +       __u16 pkt_type = sco_pi(sk)->pkt_type;
>>>>       struct sco_conn *conn;
>>>>       struct hci_conn *hcon;
>>>>       struct hci_dev  *hdev;
>>>> @@ -192,10 +193,14 @@ static int sco_connect(struct sock *sk)
>>>>
>>>>       if (lmp_esco_capable(hdev) && !disable_esco)
>>>>               type = ESCO_LINK;
>>>> -       else
>>>> +       else {
>>>>               type = SCO_LINK;
>>>> +               pkt_type &= SCO_ESCO_MASK;
>>>> +               pkt_type |= EDR_ESCO_MASK;
>>>> +       }
>>>>
>>>> -       hcon = hci_connect(hdev, type, dst, BT_SECURITY_LOW,
>>>> HCI_AT_NO_BONDING);
>>>> +       hcon = hci_connect(hdev, type, pkt_type, dst,
>>>> +                                       BT_SECURITY_LOW,
>>>> HCI_AT_NO_BONDING);
>>>>       if (!hcon)
>>>>               goto done;
>>>>
>>>> @@ -451,18 +456,22 @@ static int sco_sock_create(struct net *net, struct
>>>> socket *sock, int protocol)
>>>>       return 0;
>>>>  }
>>>>
>>>> -static int sco_sock_bind(struct socket *sock, struct sockaddr *addr,
>>>> int addr_len)
>>>> +static int sco_sock_bind(struct socket *sock, struct sockaddr *addr,
>>>> int alen)
>>>>  {
>>>> -       struct sockaddr_sco *sa = (struct sockaddr_sco *) addr;
>>>> +       struct sockaddr_sco sa;
>>>>       struct sock *sk = sock->sk;
>>>> -       bdaddr_t *src = &sa->sco_bdaddr;
>>>> -       int err = 0;
>>>> +       bdaddr_t *src = &sa.sco_bdaddr;
>>>> +       int len, err = 0;
>>>>
>>>> -       BT_DBG("sk %p %s", sk, batostr(&sa->sco_bdaddr));
>>>> +       BT_DBG("sk %p %s", sk, batostr(&sa.sco_bdaddr));
>>>>
>>>>       if (!addr || addr->sa_family != AF_BLUETOOTH)
>>>>               return -EINVAL;
>>>>
>>>> +       memset(&sa, 0, sizeof(sa));
>>>> +       len = min_t(unsigned int, sizeof(sa), alen);
>>>> +       memcpy(&sa, addr, len);
>>>> +
>>>>       lock_sock(sk);
>>>>
>>>>       if (sk->sk_state != BT_OPEN) {
>>>> @@ -476,7 +485,8 @@ static int sco_sock_bind(struct socket *sock, struct
>>>> sockaddr *addr, int addr_le
>>>>               err = -EADDRINUSE;
>>>>       } else {
>>>>               /* Save source address */
>>>> -               bacpy(&bt_sk(sk)->src, &sa->sco_bdaddr);
>>>> +               bacpy(&bt_sk(sk)->src, &sa.sco_bdaddr);
>>>> +               sco_pi(sk)->pkt_type = sa.sco_pkt_type;
>>>>               sk->sk_state = BT_BOUND;
>>>>       }
>>>>
>>>> @@ -489,26 +499,34 @@ done:
>>>>
>>>>  static int sco_sock_connect(struct socket *sock, struct sockaddr *addr,
>>>> int alen, int flags)
>>>>  {
>>>> -       struct sockaddr_sco *sa = (struct sockaddr_sco *) addr;
>>>>       struct sock *sk = sock->sk;
>>>> -       int err = 0;
>>>> -
>>>> +       struct sockaddr_sco sa;
>>>> +       int len, err = 0;
>>>>
>>>>       BT_DBG("sk %p", sk);
>>>>
>>>> -       if (addr->sa_family != AF_BLUETOOTH || alen < sizeof(struct
>>>> sockaddr_sco))
>>>> +       if (!addr || addr->sa_family != AF_BLUETOOTH)
>>>>               return -EINVAL;
>>>>
>>>> -       if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND)
>>>> -               return -EBADFD;
>>>> -
>>>> -       if (sk->sk_type != SOCK_SEQPACKET)
>>>> -               return -EINVAL;
>>>> +       memset(&sa, 0, sizeof(sa));
>>>> +       len = min_t(unsigned int, sizeof(sa), alen);
>>>> +       memcpy(&sa, addr, len);
>>>>
>>>>       lock_sock(sk);
>>>>
>>>> +       if (sk->sk_type != SOCK_SEQPACKET) {
>>>> +               err = -EINVAL;
>>>> +               goto done;
>>>> +       }
>>>> +
>>>> +       if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND) {
>>>> +               err = -EBADFD;
>>>> +               goto done;
>>>> +       }
>>>> +
>>>>       /* Set destination address and psm */
>>>> -       bacpy(&bt_sk(sk)->dst, &sa->sco_bdaddr);
>>>> +       bacpy(&bt_sk(sk)->dst, &sa.sco_bdaddr);
>>>> +       sco_pi(sk)->pkt_type = sa.sco_pkt_type;
>>>>
>>>>       if ((err = sco_connect(sk)))
>>>>               goto done;
>>>> @@ -610,10 +628,13 @@ static int sco_sock_getname(struct socket *sock,
>>>> struct sockaddr *addr, int *len
>>>>       addr->sa_family = AF_BLUETOOTH;
>>>>       *len = sizeof(struct sockaddr_sco);
>>>>
>>>> -       if (peer)
>>>> +       if (peer) {
>>>>               bacpy(&sa->sco_bdaddr, &bt_sk(sk)->dst);
>>>> -       else
>>>> +               sa->sco_pkt_type = sco_pi(sk)->pkt_type;
>>>> +       } else {
>>>>               bacpy(&sa->sco_bdaddr, &bt_sk(sk)->src);
>>>> +               sa->sco_pkt_type = sco_pi(sk)->pkt_type;
>>>> +       }
>>>>
>>>>       return 0;
>>>>  }
>>>> --
>>>> 1.6.5.3
>>>>
>>>>
>>> BTW i'm happy to switch the logic on the EDR bits, such that 1 is
>>> always 'allow this packet type'. I stuck with the Bluetooth SIG
>>> convention in this patch because the logic actually came out cleanly.
>>>
>>> Either way, its confusing for userspace, and we should document it
>>> carefully in the patch to userspace headers.
>>
>> Ping.
>>
>> As a first step, can we get consensus on the userspace API:
>>
>> --- a/include/net/bluetooth/hci.h
>> +++ b/include/net/bluetooth/hci.h
>> @@ -139,8 +139,11 @@ enum {
>> +#define ALL_SCO_PKTS   (SCO_ESCO_MASK | EDR_ESCO_MASK)
>> +#define ALL_ESCO_PKTS  (SCO_ESCO_MASK | ESCO_EV3 | ESCO_EV4 | ESCO_EV5)
>>
>> --- a/include/net/bluetooth/sco.h
>> +++ b/include/net/bluetooth/sco.h
>> @@ -37,6 +37,7 @@
>> struct sockaddr_sco {
>>       sa_family_t     sco_family;
>>       bdaddr_t        sco_bdaddr;
>> +       __u16           sco_pkt_type;
>> };
>>
>> This will at least unblock my work.
>
> Would it be better to add new sockopt for sco socket?

What advantage does that have?

Putting it in struct sockaddr_sco seems to make more sense since
packet types can only be selected during SCO connection establishment.
They can't be changed once the socket is connected.

Nick

^ permalink raw reply

* Re: [PATCH] bluez-hcidump fix SDP universal attributes
From: Marcel Holtmann @ 2010-02-17 17:19 UTC (permalink / raw)
  To: Iain Hibbert; +Cc: linux-bluetooth
In-Reply-To: <1266402749.757708.1900.nullmailer@galant.ukfsn.org>

Hi Iain,

> > > > > > > hcidump shows SDP universal attribute 0x000d as IconURL but in fact it is
> > > > > > > defined as "Additional Protocol Descriptor Lists". IconURL is 0x000c and I
> > > > > > > don't know what Icon_10 was, perhaps an older name?
> > > > > > >
> > > > > > > Eg, from an SDP probe of a mouse:
> > > > > > >
> > > > > > >       aid 0x000d (IconURL)
> > > > > > >          < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >
> > > > > >
> > > > > > Reposting because there was no response to this, patch is attached..
> > > > > >
> > > > > > See "5.1.6 AdditionalProtocolDescriptorList attribute" and "5.1.14 IconURL
> > > > > > Attribute" sections in the core specification for reference..
> > > > > >
> > > > > > (they sometimes call it AdditionalProtocolDescriptorLists and that is more
> > > > > > accurate as more than one protocol descriptor list may be included)
> > > > >
> > > > > posting this simple (and easily verified) patch for hcidump for the third
> > > > > time..
> > > >
> > > > sorry for having missed it. For some reason it got sorted away. Can you
> > > > create a proper patch with git format-patch. That makes it way easier
> > > > for me to apply them.
> > >
> > > I am not a git user but perhaps this is correct?
> >
> > almost, but you need to edit your .gitconfig to create a proper author
> > name and more specific author email entry.
> 
> Perhaps this is finally correct, but you discourage contributions by being
> so restrictive in accepting submissions.  Also, you really do need a bug
> tracker.

patch has been applied. Thanks.

And if I am not restrictive with the patch submission, then I am always
going to clean up after them. Not really something I plan to do.

Regards

Marcel



^ permalink raw reply

* Re: [PATCH] Bluetooth: Allow SCO/eSCO packet type selection for outgoing SCO connections.
From: Marcel Holtmann @ 2010-02-17 17:31 UTC (permalink / raw)
  To: Nick Pelly; +Cc: Ville Tervo, linux-bluetooth@vger.kernel.org
In-Reply-To: <35c90d961002170849m1d13743fg725a87594d63b80c@mail.gmail.com>

Hi Nick,

> >> As a first step, can we get consensus on the userspace API:
> >>
> >> --- a/include/net/bluetooth/hci.h
> >> +++ b/include/net/bluetooth/hci.h
> >> @@ -139,8 +139,11 @@ enum {
> >> +#define ALL_SCO_PKTS   (SCO_ESCO_MASK | EDR_ESCO_MASK)
> >> +#define ALL_ESCO_PKTS  (SCO_ESCO_MASK | ESCO_EV3 | ESCO_EV4 | ESCO_EV5)
> >>
> >> --- a/include/net/bluetooth/sco.h
> >> +++ b/include/net/bluetooth/sco.h
> >> @@ -37,6 +37,7 @@
> >> struct sockaddr_sco {
> >>       sa_family_t     sco_family;
> >>       bdaddr_t        sco_bdaddr;
> >> +       __u16           sco_pkt_type;
> >> };
> >>
> >> This will at least unblock my work.
> >
> > Would it be better to add new sockopt for sco socket?
> 
> What advantage does that have?
> 
> Putting it in struct sockaddr_sco seems to make more sense since
> packet types can only be selected during SCO connection establishment.
> They can't be changed once the socket is connected.

in theory you can change the allowed packet types for ACL, SCO and eSCO
after the connection is active. However the usefulness here is fairly
limited. In case of ACL it is purely academical and most link manager
will just ignore you. Mainly because the host stack can't really make a
good decision here anyway.

Personally I think it is a total brain dead concept to give this into
the control of the host stack anyway. For eSCO packet types this make a
bit more sense since you might wanna control the bandwidth. However
changing them later is just pointless. And I don't recall of any profile
actually mentioning about it. I think they had a great idea behind eSCO
support, but since it is impossible to get the negotiation parts right,
everybody sticks with simple eSCO channels and doesn't bother to change
them.

And even if we would be going for a setsockopt(), that would be blocking
and then again pretty much pointless API. The sockaddr is most logical
thing that fits into what we wanna achieve. Disallow/allow certain
packet types and essentially force SCO over eSCO.

Regards

Marcel



^ permalink raw reply

* [PATCH] prevent buffer overruns when parsing invalid OBEX frames
From: Iain Hibbert @ 2010-02-17 19:12 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: TEXT/PLAIN, Size: 464 bytes --]

Hi,

While I have git installed then, I found a problem recently where hcidump
would dump core when parsing an OBEX packet. It turned out that the OBEX
packet was faulty at my end (socket buffer exhausted), but the patch
attached prevents the parsing code from running off the end of the buffer
and receiving a SIGSEGV.

The patch does not make any complaint about the invalid frame, adding that
would be a little more complex and I'm not sure its necessary?

iain

[-- Attachment #2: Type: TEXT/PLAIN, Size: 2475 bytes --]

From 0a163656b73140265cdb7643ab4596fd3efef62c Mon Sep 17 00:00:00 2001
From: Iain Hibbert <plunky@rya-online.net>
Date: Wed, 17 Feb 2010 18:58:37 +0000
Subject: [PATCH] prevent buffer overruns when parsing invalid OBEX frames

---
 parser/obex.c |   47 +++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/parser/obex.c b/parser/obex.c
index 133f2a2..50b9737 100644
--- a/parser/obex.c
+++ b/parser/obex.c
@@ -200,27 +200,55 @@ static void parse_headers(int level, struct frame *frm)
 		printf("%s (0x%02x)", hi2str(hi), hi);
 		switch (hi & 0xc0) {
 		case 0x00:	/* Unicode */
+			if (frm->len < 2) {
+				printf("\n");
+				return;
+			}
+
 			len = get_u16(frm) - 3;
 			printf(" = Unicode length %d\n", len);
+
+			if (frm->len < len)
+				return;
+
 			raw_ndump(level, frm, len);
 			frm->ptr += len;
 			frm->len -= len;
 			break;
 
 		case 0x40:	/* Byte sequence */
+			if (frm->len < 2) {
+				printf("\n");
+				return;
+			}
+
 			len = get_u16(frm) - 3;
 			printf(" = Sequence length %d\n", len);
+
+			if (frm->len < len)
+				return;
+
 			raw_ndump(level, frm, len);
 			frm->ptr += len;
 			frm->len -= len;
 			break;
 
 		case 0x80:	/* One byte */
+			if (frm->len < 1) {
+				printf("\n");
+				return;
+			}
+
 			hv8 = get_u8(frm);
 			printf(" = %d\n", hv8);
 			break;
 
 		case 0xc0:	/* Four bytes */
+			if (frm->len < 4) {
+				printf("\n");
+				return;
+			}
+
 			hv32 = get_u32(frm);
 			printf(" = %u\n", hv32);
 			break;
@@ -276,6 +304,11 @@ void obex_dump(int level, struct frame *frm)
 
 		switch (opcode & 0x7f) {
 		case 0x00:	/* Connect */
+			if (frm->len < 4) {
+				printf("\n");
+				return;
+			}
+
 			version = get_u8(frm);
 			flags   = get_u8(frm);
 			pktlen  = get_u16(frm);
@@ -284,17 +317,19 @@ void obex_dump(int level, struct frame *frm)
 			break;
 
 		case 0x05:	/* SetPath */
-			if (length > 3) {
-				flags     = get_u8(frm);
-				constants = get_u8(frm);
-				printf(" flags %d constants %d\n",
-							flags, constants);
-			} else
+			if (frm->len < 2) {
 				printf("\n");
+				return;
+			}
+
+			flags     = get_u8(frm);
+			constants = get_u8(frm);
+			printf(" flags %d constants %d\n", flags, constants);
 			break;
 
 		default:
 			printf("\n");
+			break;
 		}
 
 		if ((status & 0x70) && (parser.flags & DUMP_VERBOSE)) {
-- 
1.6.6


^ permalink raw reply related

* Re: [PATCH] prevent buffer overruns when parsing invalid OBEX frames
From: Marcel Holtmann @ 2010-02-17 19:15 UTC (permalink / raw)
  To: Iain Hibbert; +Cc: linux-bluetooth
In-Reply-To: <1266433932.690365.3132.nullmailer@galant.ukfsn.org>

Hi Iain,

> While I have git installed then, I found a problem recently where hcidump
> would dump core when parsing an OBEX packet. It turned out that the OBEX
> packet was faulty at my end (socket buffer exhausted), but the patch
> attached prevents the parsing code from running off the end of the buffer
> and receiving a SIGSEGV.
> 
> The patch does not make any complaint about the invalid frame, adding that
> would be a little more complex and I'm not sure its necessary?

patch has been applied. Thanks.

Regards

Marcel



^ permalink raw reply

* What's the idea of security_cfm is called for both hci_proto_auth_cfm and hci_proto_encrypt_cfm?
From: Liejun Tao @ 2010-02-17 19:17 UTC (permalink / raw)
  To: Bluettooth Linux; +Cc: Marcel Holtmann, Nick Pelly

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

Hi Marcel,
Beside the l2cap issue with Blackberry 8900, I meet another l2cap
connection failure issue when testing
PTS AVRCP_TC_TG_PTT_BV_01_I.

For 8900, the sequence is:
l2cap_do_start(): send L2CAP_INFO_REQ
security_cfm(): send L2CAP_CONN_REQ
l2cap_information_rsp(): call l2cap_do_start(), send L2CAP_CONN_REQ again

For PTS AVRCP_TC_TG_PTT_BV_01_I, the sequence is:
l2cap_do_start(): send L2CAP_CONN_REQ
security_cfm():send L2CAP_CONN_REQ again
l2cap_conn_rsp(): receive L2CAP_CR_PEND
l2cap_conn_rsp(): receive L2CAP_CR_NO_MEM

In both cases, security_cfm() is called from hci_proto_encrypt_cfm(),
and interrupt the normal sequence of l2cap connection.

security_cfm() is also called in hci_proto_auth_cfm. I feel auth_cfm
and encryption_cfm are for different events, why they call the same
function?

What's your mind to avoid 2 connection request?

Aside, should we set a state bit after send l2CAP_CONN_REQ?

Attach a kernel debug message when testing AVRCP_TC_TG_PTT_BV_01_I,
we can see 2 CONN_REQ at line 2065 & 2130.

[-- Attachment #2: dmesg_connect_request_sent_twice.txt --]
[-- Type: text/plain, Size: 136048 bytes --]

g: sock cea6cc90, sk c4257e00
<3>[  340.040649] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  340.046783] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  340.051727] ll_device_want_to_sleep: hu c9590d80
<3>[  340.056579] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  340.061431] hci_uart_tx_wakeup: 
<3>[  340.064849] hci_uart_tty_wakeup: 
<3>[  340.068359] hci_uart_tx_wakeup: 
<3>[  340.071777] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.076843] hci_dev_get: 0
<3>[  340.089660] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.095306] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.104339] hci_dev_get: 0
<3>[  340.107391] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.113128] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.118164] hci_dev_get: 0
<3>[  340.121063] hci_sock_create: sock ce8984e8
<3>[  340.125457] hci_sock_bind: sock ce8984e8 sk ccbc0a00
<3>[  340.130828] hci_dev_get: 0
<3>[  340.133697] hci_sock_setsockopt: sk ccbc0a00, opt 2
<3>[  340.138854] hci_sock_sendmsg: sock ce8984e8 sk ccbc0a00
<3>[  340.144653] hci_cmd_task: hci0 cmd 1
<3>[  340.148468] hci_send_frame: hci0 type 1 len 3
<3>[  340.153045] hci_send_to_sock: hdev c453c000 len 3
<3>[  340.157989] hci_uart_send_frame: hci0: type 1 len 3
<3>[  340.163116] ll_enqueue: hu c9590d80 skb cec59908
<3>[  340.167999] ll_enqueue: device asleep, waking up and queueing packet
<3>[  340.174652] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  340.179534] hci_uart_tx_wakeup: 
<3>[  340.182952] hci_uart_tty_wakeup: 
<3>[  340.186462] hci_uart_tx_wakeup: 
<3>[  340.190582] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  340.196746] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  340.201354] ll_device_woke_up: hu c9590d80
<3>[  340.205657] hci_uart_tx_wakeup: 
<3>[  340.209106] hci_uart_tty_wakeup: 
<3>[  340.212585] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  340.218719] ll_recv: Event packet
<3>[  340.222259] ll_recv: Event header: evt 0x0e plen 5
<3>[  340.227294] ll_check_data_len: len 5 room 1078
<3>[  340.231964] ll_recv: Complete data
<3>[  340.235565] hci_uart_tx_wakeup: 
<3>[  340.238983] hci_rx_task: hci0
<3>[  340.242065] hci_send_to_sock: hdev c453c000 len 7
<3>[  340.247070] hci_cmd_complete_evt: hci0 opcode 0xc19
<3>[  340.252502] hci_sock_recvmsg: sock ce8984e8, sk ccbc0a00
<3>[  340.258392] hci_sock_setsockopt: sk ccbc0a00, opt 2
<3>[  340.264465] hci_sock_create: sock ce8c0050
<3>[  340.268829] hci_sock_bind: sock ce8c0050 sk c4257800
<3>[  340.274078] hci_dev_get: 0
<3>[  340.276947] hci_sock_setsockopt: sk c4257800, opt 2
<3>[  340.282073] hci_sock_sendmsg: sock ce8c0050 sk c4257800
<3>[  340.287872] hci_cmd_task: hci0 cmd 1
<3>[  340.291625] hci_send_frame: hci0 type 1 len 7
<3>[  340.296234] hci_send_to_sock: hdev c453c000 len 7
<3>[  340.301208] hci_uart_send_frame: hci0: type 1 len 7
<3>[  340.306304] ll_enqueue: hu c9590d80 skb cd7dc308
<3>[  340.311187] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  340.317352] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  340.322265] ll_device_want_to_sleep: hu c9590d80
<3>[  340.327117] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  340.332000] hci_uart_tx_wakeup: 
<3>[  340.335418] ll_enqueue: device asleep, waking up and queueing packet
<3>[  340.342102] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  340.346954] hci_uart_tx_wakeup: 
<3>[  340.350402] hci_uart_tty_wakeup: 
<3>[  340.353881] hci_uart_tx_wakeup: 
<3>[  340.358154] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  340.364318] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  340.368896] ll_device_woke_up: hu c9590d80
<3>[  340.373229] hci_uart_tx_wakeup: 
<3>[  340.376617] hci_uart_tty_wakeup: 
<3>[  340.380157] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  340.386291] ll_recv: Event packet
<3>[  340.389801] ll_recv: Event header: evt 0x0e plen 4
<3>[  340.394836] ll_check_data_len: len 4 room 1078
<3>[  340.399505] ll_recv: Complete data
<3>[  340.403106] hci_uart_tx_wakeup: 
<3>[  340.406494] hci_rx_task: hci0
<3>[  340.409576] hci_send_to_sock: hdev c453c000 len 6
<3>[  340.414550] hci_cmd_complete_evt: hci0 opcode 0xc3a
<3>[  340.426788] hci_sock_recvmsg: sock ce8c0050, sk c4257800
<3>[  340.436065] hci_sock_setsockopt: sk c4257800, opt 2
<3>[  340.441253] hci_sock_release: sock ce8c0050 sk c4257800
<3>[  340.447692] hci_sock_release: sock ce8984e8 sk ccbc0a00
<3>[  340.453735] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.461273] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.466430] hci_dev_get: 0
<3>[  340.469299] hci_sock_create: sock ce8c0050
<3>[  340.473724] hci_sock_bind: sock ce8c0050 sk ccbc0a00
<3>[  340.478942] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  340.485076] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  340.490051] ll_device_want_to_sleep: hu c9590d80
<3>[  340.494873] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  340.499755] hci_uart_tx_wakeup: 
<3>[  340.503173] hci_uart_tty_wakeup: 
<3>[  340.506683] hci_uart_tx_wakeup: 
<3>[  340.510070] hci_dev_get: 0
<3>[  340.512969] hci_sock_setsockopt: sk ccbc0a00, opt 2
<3>[  340.518096] hci_sock_sendmsg: sock ce8c0050 sk ccbc0a00
<3>[  340.523651] hci_cmd_task: hci0 cmd 1
<3>[  340.527435] hci_send_frame: hci0 type 1 len 3
<3>[  340.532012] hci_send_to_sock: hdev c453c000 len 3
<3>[  340.536987] hci_uart_send_frame: hci0: type 1 len 3
<3>[  340.542114] ll_enqueue: hu c9590d80 skb cec59db8
<3>[  340.546966] ll_enqueue: device asleep, waking up and queueing packet
<3>[  340.553619] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  340.558502] hci_uart_tx_wakeup: 
<3>[  340.561950] hci_uart_tty_wakeup: 
<3>[  340.565399] hci_uart_tx_wakeup: 
<3>[  340.569458] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  340.575592] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  340.580169] ll_device_woke_up: hu c9590d80
<3>[  340.584442] hci_uart_tx_wakeup: 
<3>[  340.587890] hci_uart_tty_wakeup: 
<3>[  340.591369] ll_recv: hu c9590d80 count 10 rx_state 0 rx_count 0
<3>[  340.597564] ll_recv: Event packet
<3>[  340.601074] ll_recv: Event header: evt 0x0e plen 7
<3>[  340.606109] ll_check_data_len: len 7 room 1078
<3>[  340.610748] ll_recv: Complete data
<3>[  340.614318] hci_uart_tx_wakeup: 
<3>[  340.617706] hci_rx_task: hci0
<3>[  340.620819] hci_send_to_sock: hdev c453c000 len 9
<3>[  340.625793] hci_cc_read_class_of_dev: hci0 status 0x0
<3>[  340.631072] hci_cc_read_class_of_dev: hci0 class 0x08020c
<3>[  340.636779] hci_sock_recvmsg: sock ce8c0050, sk ccbc0a00
<3>[  340.642364] hci_sock_setsockopt: sk ccbc0a00, opt 2
<3>[  340.647796] hci_sock_release: sock ce8c0050 sk ccbc0a00
<3>[  340.656066] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.661895] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.666992] hci_dev_get: 0
<3>[  340.669921] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.675720] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.680725] hci_dev_get: 0
<3>[  340.683654] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.689239] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  340.695373] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  340.700317] ll_device_want_to_sleep: hu c9590d80
<3>[  340.705169] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  340.710052] hci_uart_tx_wakeup: 
<3>[  340.713470] hci_uart_tty_wakeup: 
<3>[  340.716979] hci_uart_tx_wakeup: 
<3>[  340.720428] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.725494] hci_dev_get: 0
<3>[  340.728363] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.733978] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.739013] hci_dev_get: 0
<3>[  340.741882] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.747497] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.752532] hci_dev_get: 0
<3>[  340.755401] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.761016] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.766082] hci_dev_get: 0
<3>[  340.768951] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  340.774566] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  340.780914] hci_dev_get: 0
<3>[  340.934753] rfcomm_sock_create: sock ce8c0050
<3>[  340.939361] rfcomm_dlc_clear_state: c95a5ec0
<3>[  340.943908] rfcomm_dlc_alloc: c95a5ec0
<3>[  340.947845] rfcomm_sock_alloc: sk c97cc600
<3>[  340.952209] rfcomm_sock_init: sk c97cc600
<3>[  341.071228] rfcomm_sock_setsockopt: sk c97cc600
<3>[  341.087158] rfcomm_sock_setsockopt_old: sk c97cc600
<3>[  341.093597] rfcomm_sock_bind: sk c97cc600 00:00:00:00:00:00
<3>[  341.099578] rfcomm_sock_create: sock cea3e980
<3>[  341.104187] rfcomm_dlc_clear_state: c44227c0
<3>[  341.108673] rfcomm_dlc_alloc: c44227c0
<3>[  341.112609] rfcomm_sock_alloc: sk ccbc0600
<3>[  341.116943] rfcomm_sock_init: sk ccbc0600
<3>[  341.125640] rfcomm_sock_listen: sk c97cc600 backlog 10
<3>[  341.131347] rfcomm_sock_create: sock cea89360
<3>[  341.135925] rfcomm_dlc_clear_state: c4422640
<3>[  341.140441] rfcomm_dlc_alloc: c4422640
<3>[  341.144409] rfcomm_sock_alloc: sk ccbc0a00
<3>[  341.148742] rfcomm_sock_init: sk ccbc0a00
<3>[  341.167816] hci_sock_create: sock ce89a980
<3>[  341.172149] hci_sock_bind: sock ce89a980 sk ccbc0400
<3>[  341.177520] hci_dev_get: 0
<3>[  341.180358] hci_sock_setsockopt: sk ccbc0400, opt 2
<3>[  341.185699] hci_sock_sendmsg: sock ce89a980 sk ccbc0400
<3>[  341.195037] rfcomm_sock_setsockopt: sk ccbc0a00
<3>[  341.199981] hci_cmd_task: hci0 cmd 1
<3>[  341.203735] hci_send_frame: hci0 type 1 len 6
<3>[  341.208343] hci_send_to_sock: hdev c453c000 len 6
<3>[  341.213287] hci_uart_send_frame: hci0: type 1 len 6
<3>[  341.218414] ll_enqueue: hu c9590d80 skb cec59778
<3>[  341.223266] ll_enqueue: device asleep, waking up and queueing packet
<3>[  341.229949] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  341.234832] hci_uart_tx_wakeup: 
<3>[  341.238281] hci_uart_tty_wakeup: 
<3>[  341.241760] hci_uart_tx_wakeup: 
<3>[  341.245178] rfcomm_sock_setsockopt_old: sk ccbc0a00
<3>[  341.250366] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  341.256500] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  341.261077] ll_device_woke_up: hu c9590d80
<3>[  341.265380] hci_uart_tx_wakeup: 
<3>[  341.268798] hci_uart_tty_wakeup: 
<3>[  341.272308] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  341.278442] ll_recv: Event packet
<3>[  341.281951] ll_recv: Event header: evt 0x0e plen 4
<3>[  341.287017] ll_check_data_len: len 4 room 1078
<3>[  341.291687] ll_recv: Complete data
<3>[  341.295288] hci_uart_tx_wakeup: 
<3>[  341.298675] hci_rx_task: hci0
<3>[  341.301818] hci_send_to_sock: hdev c453c000 len 6
<3>[  341.306762] hci_cc_write_class_of_dev: hci0 status 0x0
<3>[  341.312194] hci_sent_cmd_data: hci0 opcode 0xc24
<3>[  341.323883] hci_sock_recvmsg: sock ce89a980, sk ccbc0400
<3>[  341.329498] hci_sock_setsockopt: sk ccbc0400, opt 2
<3>[  341.334686] hci_sock_release: sock ce89a980 sk ccbc0400
<3>[  341.342559] hci_sock_create: sock ce89a980
<3>[  341.346893] hci_sock_bind: sock ce89a980 sk ccbc0400
<3>[  341.355041] hci_dev_get: 0
<3>[  341.357940] hci_sock_setsockopt: sk ccbc0400, opt 2
<3>[  341.363189] rfcomm_sock_bind: sk ccbc0a00 00:00:00:00:00:00
<3>[  341.369049] rfcomm_sock_listen: sk ccbc0a00 backlog 10
<3>[  341.374511] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  341.380645] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  341.385589] ll_device_want_to_sleep: hu c9590d80
<3>[  341.390441] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  341.395324] hci_uart_tx_wakeup: 
<3>[  341.398742] hci_uart_tty_wakeup: 
<3>[  341.402252] hci_uart_tx_wakeup: 
<3>[  341.405670] hci_sock_sendmsg: sock ce89a980 sk ccbc0400
<3>[  341.412231] hci_cmd_task: hci0 cmd 1
<3>[  341.416015] hci_send_frame: hci0 type 1 len 244
<3>[  341.420837] hci_send_to_sock: hdev c453c000 len 244
<3>[  341.425964] hci_uart_send_frame: hci0: type 1 len 244
<3>[  341.431274] ll_enqueue: hu c9590d80 skb cd7dc308
<3>[  341.436126] ll_enqueue: device asleep, waking up and queueing packet
<3>[  341.442779] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  341.447662] hci_uart_tx_wakeup: 
<3>[  341.451110] hci_uart_tty_wakeup: 
<3>[  341.454620] hci_uart_tx_wakeup: 
<3>[  341.459442] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  341.465606] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  341.470214] ll_device_woke_up: hu c9590d80
<3>[  341.474517] hci_uart_tx_wakeup: 
<3>[  341.477935] hci_uart_tty_wakeup: 
<3>[  341.481445] hci_uart_tx_wakeup: 
<3>[  341.486236] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  341.492431] ll_recv: Event packet
<3>[  341.495971] ll_recv: Event header: evt 0x0e plen 4
<3>[  341.500976] ll_check_data_len: len 4 room 1078
<3>[  341.505676] ll_recv: Complete data
<3>[  341.509277] hci_rx_task: hci0
<3>[  341.512420] hci_send_to_sock: hdev c453c000 len 6
<3>[  341.517364] hci_cmd_complete_evt: hci0 opcode 0xc52
<3>[  341.526153] sco_sock_create: sock ce89a360
<3>[  341.530578] sco_sock_init: sk ccbc0200
<3>[  341.534545] hci_sock_recvmsg: sock ce89a980, sk ccbc0400
<3>[  341.540222] sco_sock_bind: sk ccbc0200 00:00:00:00:00:00
<3>[  341.545867] hci_sock_setsockopt: sk ccbc0400, opt 2
<3>[  341.551025] sco_sock_listen: sk ccbc0200 backlog 1
<3>[  341.556213] hci_sock_release: sock ce89a980 sk ccbc0400
<3>[  341.561981] rfcomm_sock_create: sock ce89a980
<3>[  341.566619] rfcomm_dlc_clear_state: c4422440
<3>[  341.571105] rfcomm_dlc_alloc: c4422440
<3>[  341.575073] rfcomm_sock_alloc: sk ccbc0400
<3>[  341.579345] rfcomm_sock_init: sk ccbc0400
<3>[  341.583892] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  341.589538] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  341.595672] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  341.600616] ll_device_want_to_sleep: hu c9590d80
<3>[  341.605499] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  341.610351] hci_uart_tx_wakeup: 
<3>[  341.613800] hci_uart_tty_wakeup: 
<3>[  341.617279] hci_uart_tx_wakeup: 
<3>[  341.620758] rfcomm_sock_bind: sk ccbc0400 00:00:00:00:00:00
<3>[  341.626617] rfcomm_sock_listen: sk ccbc0400 backlog 10
<3>[  341.632415] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  341.637756] hci_dev_get: 0
<3>[  341.640747] hci_sock_create: sock ce89a1d8
<3>[  341.645111] hci_sock_bind: sock ce89a1d8 sk c4257800
<3>[  341.650299] hci_dev_get: 0
<3>[  341.653198] hci_sock_setsockopt: sk c4257800, opt 2
<3>[  341.658721] hci_sock_sendmsg: sock ce89a1d8 sk c4257800
<3>[  341.664306] hci_cmd_task: hci0 cmd 1
<3>[  341.668090] hci_send_frame: hci0 type 1 len 3
<3>[  341.672668] hci_send_to_sock: hdev c453c000 len 3
<3>[  341.677642] hci_uart_send_frame: hci0: type 1 len 3
<3>[  341.682739] ll_enqueue: hu c9590d80 skb cec59138
<3>[  341.687622] ll_enqueue: device asleep, waking up and queueing packet
<3>[  341.694274] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  341.699157] hci_uart_tx_wakeup: 
<3>[  341.702575] hci_uart_tty_wakeup: 
<3>[  341.706054] hci_uart_tx_wakeup: 
<3>[  341.710723] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  341.716888] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  341.721466] ll_device_woke_up: hu c9590d80
<3>[  341.725799] hci_uart_tx_wakeup: 
<3>[  341.729217] hci_uart_tty_wakeup: 
<3>[  341.732757] ll_recv: hu c9590d80 count 10 rx_state 0 rx_count 0
<3>[  341.738983] ll_recv: Event packet
<3>[  341.742492] ll_recv: Event header: evt 0x0e plen 7
<3>[  341.747528] ll_check_data_len: len 7 room 1078
<3>[  341.752197] ll_recv: Complete data
<3>[  341.755798] hci_uart_tx_wakeup: 
<3>[  341.759185] hci_rx_task: hci0
<3>[  341.762329] hci_send_to_sock: hdev c453c000 len 9
<3>[  341.767303] hci_cc_read_class_of_dev: hci0 status 0x0
<3>[  341.772613] hci_cc_read_class_of_dev: hci0 class 0x4a020c
<3>[  341.778350] hci_sock_recvmsg: sock ce89a1d8, sk c4257800
<3>[  341.783935] hci_sock_setsockopt: sk c4257800, opt 2
<3>[  341.789398] hci_sock_release: sock ce89a1d8 sk c4257800
<3>[  341.799713] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  341.805419] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  341.810638] hci_dev_get: 0
<3>[  341.813537] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  341.819152] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  341.824218] hci_dev_get: 0
<3>[  341.829498] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  341.835693] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  341.840637] ll_device_want_to_sleep: hu c9590d80
<3>[  341.845520] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  341.850402] hci_uart_tx_wakeup: 
<3>[  341.853851] hci_uart_tty_wakeup: 
<3>[  341.857330] hci_uart_tx_wakeup: 
<3>[  343.848083] hci_sock_create: sock ce8a9e18
<3>[  343.852600] hci_sock_bind: sock ce8a9e18 sk c4257800
<3>[  343.858184] hci_dev_get: 0
<3>[  343.861145] hci_sock_sendmsg: sock ce8a9e18 sk c4257800
<3>[  343.866851] hci_cmd_task: hci0 cmd 1
<3>[  343.870758] hci_send_frame: hci0 type 1 len 4
<3>[  343.875427] hci_send_to_sock: hdev c453c000 len 4
<3>[  343.880462] hci_uart_send_frame: hci0: type 1 len 4
<3>[  343.885620] ll_enqueue: hu c9590d80 skb ce3de348
<3>[  343.890563] ll_enqueue: device asleep, waking up and queueing packet
<3>[  343.897308] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  343.902313] hci_uart_tx_wakeup: 
<3>[  343.905853] hci_uart_tty_wakeup: 
<3>[  343.909393] hci_uart_tx_wakeup: 
<3>[  343.913818] hci_sock_release: sock ce8a9e18 sk c4257800
<3>[  343.919342] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  343.925506] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  343.930084] ll_device_woke_up: hu c9590d80
<3>[  343.934387] hci_uart_tx_wakeup: 
<3>[  343.937805] hci_uart_tty_wakeup: 
<3>[  343.941314] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  343.947448] ll_recv: Event packet
<3>[  343.950958] ll_recv: Event header: evt 0x0e plen 4
<3>[  343.955993] ll_check_data_len: len 4 room 1078
<3>[  343.960662] ll_recv: Complete data
<3>[  343.964233] hci_uart_tx_wakeup: 
<3>[  343.967651] hci_rx_task: hci0
<3>[  343.970764] hci_send_to_sock: hdev c453c000 len 6
<3>[  343.975738] hci_cc_write_scan_enable: hci0 status 0x0
<3>[  343.981048] hci_sent_cmd_data: hci0 opcode 0xc1a
<3>[  343.985900] hci_req_complete: hci0 result 0x00
<3>[  343.997344] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  344.002960] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  344.015747] hci_dev_get: 0
<3>[  344.018646] hci_sock_create: sock ce8a9c90
<3>[  344.023071] hci_sock_bind: sock ce8a9c90 sk c900ce00
<3>[  344.028442] hci_dev_get: 0
<3>[  344.031311] hci_sock_setsockopt: sk c900ce00, opt 2
<3>[  344.036560] hci_sock_sendmsg: sock ce8a9c90 sk c900ce00
<3>[  344.042053] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  344.048217] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  344.053161] ll_device_want_to_sleep: hu c9590d80
<3>[  344.058013] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  344.062896] hci_uart_tx_wakeup: 
<3>[  344.066345] hci_uart_tty_wakeup: 
<3>[  344.069824] hci_uart_tx_wakeup: 
<3>[  344.073211] hci_cmd_task: hci0 cmd 1
<3>[  344.077026] hci_send_frame: hci0 type 1 len 3
<3>[  344.081604] hci_send_to_sock: hdev c453c000 len 3
<3>[  344.086547] hci_uart_send_frame: hci0: type 1 len 3
<3>[  344.091705] ll_enqueue: hu c9590d80 skb cec59778
<3>[  344.096527] ll_enqueue: device asleep, waking up and queueing packet
<3>[  344.103210] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  344.108062] hci_uart_tx_wakeup: 
<3>[  344.111480] hci_uart_tty_wakeup: 
<3>[  344.114990] hci_uart_tx_wakeup: 
<3>[  344.119445] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  344.125579] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  344.130157] ll_device_woke_up: hu c9590d80
<3>[  344.134429] hci_uart_tx_wakeup: 
<3>[  344.137878] hci_uart_tty_wakeup: 
<3>[  344.141357] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  344.147460] ll_recv: Event packet
<3>[  344.150970] ll_recv: Event header: evt 0x0e plen 5
<3>[  344.156005] ll_check_data_len: len 5 room 1078
<3>[  344.160644] ll_recv: Complete data
<3>[  344.164245] hci_uart_tx_wakeup: 
<3>[  344.167633] hci_rx_task: hci0
<3>[  344.170745] hci_send_to_sock: hdev c453c000 len 7
<3>[  344.175689] hci_cmd_complete_evt: hci0 opcode 0xc19
<3>[  344.181121] hci_sock_recvmsg: sock ce8a9c90, sk c900ce00
<3>[  344.186798] hci_sock_setsockopt: sk c900ce00, opt 2
<3>[  344.193572] hci_sock_release: sock ce8a9c90 sk c900ce00
<3>[  344.199310] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  344.204895] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  344.209960] hci_dev_get: 0
<3>[  344.213562] hci_sock_create: sock ce8a9b08
<3>[  344.217956] hci_sock_bind: sock ce8a9b08 sk ccbc0800
<3>[  344.223358] hci_dev_get: 0
<3>[  344.226226] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  344.231445] hci_sock_sendmsg: sock ce8a9b08 sk ccbc0800
<3>[  344.236938] hci_cmd_task: hci0 cmd 1
<3>[  344.240753] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  344.246887] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  344.251831] ll_device_want_to_sleep: hu c9590d80
<3>[  344.256683] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  344.261566] hci_uart_tx_wakeup: 
<3>[  344.265014] hci_send_frame: hci0 type 1 len 244
<3>[  344.269775] hci_send_to_sock: hdev c453c000 len 244
<3>[  344.274902] hci_uart_send_frame: hci0: type 1 len 244
<3>[  344.280212] ll_enqueue: hu c9590d80 skb ce3de348
<3>[  344.285064] ll_enqueue: device asleep, waking up and queueing packet
<3>[  344.291748] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  344.296600] hci_uart_tx_wakeup: 
<3>[  344.300018] hci_uart_tty_wakeup: 
<3>[  344.303527] hci_uart_tx_wakeup: 
<3>[  344.308197] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  344.314331] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  344.318908] ll_device_woke_up: hu c9590d80
<3>[  344.323181] hci_uart_tx_wakeup: 
<3>[  344.326629] hci_uart_tty_wakeup: 
<3>[  344.330108] hci_uart_tx_wakeup: 
<3>[  344.336181] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  344.342285] ll_recv: Event packet
<3>[  344.345794] ll_recv: Event header: evt 0x0e plen 4
<3>[  344.350830] ll_check_data_len: len 4 room 1078
<3>[  344.355468] ll_recv: Complete data
<3>[  344.359039] hci_rx_task: hci0
<3>[  344.362152] hci_send_to_sock: hdev c453c000 len 6
<3>[  344.367126] hci_cmd_complete_evt: hci0 opcode 0xc52
<3>[  344.372283] hci_sock_recvmsg: sock ce8a9b08, sk ccbc0800
<3>[  344.377868] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  344.383056] hci_sock_release: sock ce8a9b08 sk ccbc0800
<3>[  344.389862] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  344.395538] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  344.400604] hci_dev_get: 0
<3>[  344.435729] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  344.441925] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  344.446868] ll_device_want_to_sleep: hu c9590d80
<3>[  344.451782] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  344.456726] hci_uart_tx_wakeup: 
<3>[  344.460144] hci_uart_tty_wakeup: 
<3>[  344.463623] hci_uart_tx_wakeup: 
<3>[  344.516784] hci_sock_create: sock ce8a9980
<3>[  344.521270] hci_sock_bind: sock ce8a9980 sk ccbc0800
<3>[  344.526489] hci_dev_get: 0
<3>[  344.529632] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  344.535095] hci_sock_sendmsg: sock ce8a9980 sk ccbc0800
<3>[  344.540679] hci_cmd_task: hci0 cmd 1
<3>[  344.544494] hci_send_frame: hci0 type 1 len 244
<3>[  344.549255] hci_send_to_sock: hdev c453c000 len 244
<3>[  344.554443] hci_uart_send_frame: hci0: type 1 len 244
<3>[  344.559783] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  344.564636] ll_enqueue: device asleep, waking up and queueing packet
<3>[  344.571319] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  344.576232] hci_uart_tx_wakeup: 
<3>[  344.579681] hci_uart_tty_wakeup: 
<3>[  344.583190] hci_uart_tx_wakeup: 
<3>[  344.588195] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  344.594299] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  344.598876] ll_device_woke_up: hu c9590d80
<3>[  344.603149] hci_uart_tx_wakeup: 
<3>[  344.606597] hci_uart_tty_wakeup: 
<3>[  344.610076] hci_uart_tx_wakeup: 
<3>[  344.616302] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  344.622406] ll_recv: Event packet
<3>[  344.625915] ll_recv: Event header: evt 0x0e plen 4
<3>[  344.630950] ll_check_data_len: len 4 room 1078
<3>[  344.635620] ll_recv: Complete data
<3>[  344.639190] hci_rx_task: hci0
<3>[  344.642303] hci_send_to_sock: hdev c453c000 len 6
<3>[  344.647247] hci_cmd_complete_evt: hci0 opcode 0xc52
<3>[  344.652526] hci_sock_recvmsg: sock ce8a9980, sk ccbc0800
<3>[  344.658111] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  344.663330] hci_sock_release: sock ce8a9980 sk ccbc0800
<3>[  344.670135] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  344.675842] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  344.680877] hci_dev_get: 0
<3>[  344.715728] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  344.721862] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  344.726806] ll_device_want_to_sleep: hu c9590d80
<3>[  344.731689] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  344.736541] hci_uart_tx_wakeup: 
<3>[  344.739990] hci_uart_tty_wakeup: 
<3>[  344.743438] hci_uart_tx_wakeup: 
<3>[  345.047668] hci_sock_create: sock ce8a9980
<3>[  345.052307] hci_sock_bind: sock ce8a9980 sk ccbc0800
<3>[  345.057647] hci_dev_get: 0
<3>[  345.061981] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  345.067169] hci_sock_sendmsg: sock ce8a9980 sk ccbc0800
<3>[  345.072692] hci_cmd_task: hci0 cmd 1
<3>[  345.076477] hci_send_frame: hci0 type 1 len 6
<3>[  345.081054] hci_send_to_sock: hdev c453c000 len 6
<3>[  345.086029] hci_uart_send_frame: hci0: type 1 len 6
<3>[  345.091156] ll_enqueue: hu c9590d80 skb ce3de348
<3>[  345.095977] ll_enqueue: device asleep, waking up and queueing packet
<3>[  345.102661] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  345.107513] hci_uart_tx_wakeup: 
<3>[  345.110961] hci_uart_tty_wakeup: 
<3>[  345.114471] hci_uart_tx_wakeup: 
<3>[  345.119445] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  345.125579] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  345.130157] ll_device_woke_up: hu c9590d80
<3>[  345.134429] hci_uart_tx_wakeup: 
<3>[  345.137847] hci_uart_tty_wakeup: 
<3>[  345.141357] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  345.147460] ll_recv: Event packet
<3>[  345.150970] ll_recv: Event header: evt 0x0e plen 4
<3>[  345.156005] ll_check_data_len: len 4 room 1078
<3>[  345.160644] ll_recv: Complete data
<3>[  345.164245] hci_uart_tx_wakeup: 
<3>[  345.167633] hci_rx_task: hci0
<3>[  345.170745] hci_send_to_sock: hdev c453c000 len 6
<3>[  345.175689] hci_cc_write_class_of_dev: hci0 status 0x0
<3>[  345.181091] hci_sent_cmd_data: hci0 opcode 0xc24
<3>[  345.186462] hci_sock_recvmsg: sock ce8a9980, sk ccbc0800
<3>[  345.192138] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  345.197265] hci_sock_release: sock ce8a9980 sk ccbc0800
<3>[  345.202819] hci_sock_create: sock ce8a9980
<3>[  345.207183] hci_sock_bind: sock ce8a9980 sk ccbc0800
<3>[  345.212402] hci_dev_get: 0
<3>[  345.215301] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  345.220397] hci_sock_sendmsg: sock ce8a9980 sk ccbc0800
<3>[  345.225952] hci_cmd_task: hci0 cmd 1
<3>[  345.229705] hci_send_frame: hci0 type 1 len 244
<3>[  345.234497] hci_send_to_sock: hdev c453c000 len 244
<3>[  345.239654] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  345.245788] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  345.250701] ll_device_want_to_sleep: hu c9590d80
<3>[  345.255584] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  345.260437] hci_uart_tx_wakeup: 
<3>[  345.263854] hci_uart_send_frame: hci0: type 1 len 244
<3>[  345.269195] ll_enqueue: hu c9590d80 skb cec59070
<3>[  345.274017] ll_enqueue: device asleep, waking up and queueing packet
<3>[  345.280670] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  345.285552] hci_uart_tx_wakeup: 
<3>[  345.289001] hci_uart_tty_wakeup: 
<3>[  345.292480] hci_uart_tx_wakeup: 
<3>[  345.296936] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  345.303100] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  345.307678] ll_device_woke_up: hu c9590d80
<3>[  345.311981] hci_uart_tx_wakeup: 
<3>[  345.315399] hci_uart_tty_wakeup: 
<3>[  345.318908] hci_uart_tx_wakeup: 
<3>[  345.324493] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  345.330596] ll_recv: Event packet
<3>[  345.334106] ll_recv: Event header: evt 0x0e plen 4
<3>[  345.339141] ll_check_data_len: len 4 room 1078
<3>[  345.343780] ll_recv: Complete data
<3>[  345.347351] hci_rx_task: hci0
<3>[  345.350463] hci_send_to_sock: hdev c453c000 len 6
<3>[  345.355407] hci_cmd_complete_evt: hci0 opcode 0xc52
<3>[  345.367523] hci_sock_recvmsg: sock ce8a9980, sk ccbc0800
<3>[  345.383300] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  345.388458] hci_sock_release: sock ce8a9980 sk ccbc0800
<3>[  345.395324] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  345.400970] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  345.406188] hci_dev_get: 0
<3>[  345.409088] hci_sock_create: sock ce8a9b08
<3>[  345.413513] hci_sock_bind: sock ce8a9b08 sk ccbc0800
<3>[  345.418762] hci_dev_get: 0
<3>[  345.421630] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  345.426757] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  345.432891] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  345.437835] ll_device_want_to_sleep: hu c9590d80
<3>[  345.442718] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  345.447570] hci_uart_tx_wakeup: 
<3>[  345.451019] hci_uart_tty_wakeup: 
<3>[  345.454498] hci_uart_tx_wakeup: 
<3>[  345.458007] hci_sock_sendmsg: sock ce8a9b08 sk ccbc0800
<3>[  345.463531] hci_cmd_task: hci0 cmd 1
<3>[  345.467315] hci_send_frame: hci0 type 1 len 3
<3>[  345.471893] hci_send_to_sock: hdev c453c000 len 3
<3>[  345.476867] hci_uart_send_frame: hci0: type 1 len 3
<3>[  345.481994] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  345.486846] ll_enqueue: device asleep, waking up and queueing packet
<3>[  345.493499] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  345.498382] hci_uart_tx_wakeup: 
<3>[  345.501800] hci_uart_tty_wakeup: 
<3>[  345.505310] hci_uart_tx_wakeup: 
<3>[  345.509490] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  345.515655] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  345.520233] ll_device_woke_up: hu c9590d80
<3>[  345.524536] hci_uart_tx_wakeup: 
<3>[  345.527984] hci_uart_tty_wakeup: 
<3>[  345.531494] ll_recv: hu c9590d80 count 10 rx_state 0 rx_count 0
<3>[  345.537719] ll_recv: Event packet
<3>[  345.541229] ll_recv: Event header: evt 0x0e plen 7
<3>[  345.546264] ll_check_data_len: len 7 room 1078
<3>[  345.550964] ll_recv: Complete data
<3>[  345.554534] hci_uart_tx_wakeup: 
<3>[  345.557922] hci_rx_task: hci0
<3>[  345.561065] hci_send_to_sock: hdev c453c000 len 9
<3>[  345.566040] hci_cc_read_class_of_dev: hci0 status 0x0
<3>[  345.571350] hci_cc_read_class_of_dev: hci0 class 0x5a020c
<3>[  345.578399] hci_sock_recvmsg: sock ce8a9b08, sk ccbc0800
<3>[  345.584655] hci_sock_setsockopt: sk ccbc0800, opt 2
<3>[  345.589874] hci_sock_release: sock ce8a9b08 sk ccbc0800
<3>[  345.600311] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  345.606018] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  345.611053] hci_dev_get: 0
<3>[  345.614135] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  345.619750] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  345.624847] hci_dev_get: 0
<3>[  345.628204] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  345.634338] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  345.639312] ll_device_want_to_sleep: hu c9590d80
<3>[  345.644165] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  345.649017] hci_uart_tx_wakeup: 
<3>[  345.652465] hci_uart_tty_wakeup: 
<3>[  345.655944] hci_uart_tx_wakeup: 
<3>[  345.672210] hci_sock_create: sock ce8a97f8
<3>[  345.676635] hci_sock_bind: sock ce8a97f8 sk c4257800
<3>[  345.681823] hci_dev_get: 0
<3>[  345.684783] hci_sock_setsockopt: sk c4257800, opt 2
<3>[  345.690216] hci_sock_sendmsg: sock ce8a97f8 sk c4257800
<3>[  345.695770] hci_cmd_task: hci0 cmd 1
<3>[  345.699554] hci_send_frame: hci0 type 1 len 244
<3>[  345.704315] hci_send_to_sock: hdev c453c000 len 244
<3>[  345.709472] hci_uart_send_frame: hci0: type 1 len 244
<3>[  345.714813] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  345.719635] ll_enqueue: device asleep, waking up and queueing packet
<3>[  345.726318] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  345.731170] hci_uart_tx_wakeup: 
<3>[  345.734619] hci_uart_tty_wakeup: 
<3>[  345.738128] hci_uart_tx_wakeup: 
<3>[  345.743194] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  345.749359] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  345.753936] ll_device_woke_up: hu c9590d80
<3>[  345.758239] hci_uart_tx_wakeup: 
<3>[  345.761688] hci_uart_tty_wakeup: 
<3>[  345.765167] hci_uart_tx_wakeup: 
<3>[  345.771820] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  345.777954] ll_recv: Event packet
<3>[  345.781463] ll_recv: Event header: evt 0x0e plen 4
<3>[  345.786499] ll_check_data_len: len 4 room 1078
<3>[  345.791168] ll_recv: Complete data
<3>[  345.794769] hci_rx_task: hci0
<3>[  345.797882] hci_send_to_sock: hdev c453c000 len 6
<3>[  345.802856] hci_cmd_complete_evt: hci0 opcode 0xc52
<3>[  345.808258] hci_sock_recvmsg: sock ce8a97f8, sk c4257800
<3>[  345.813903] hci_sock_setsockopt: sk c4257800, opt 2
<3>[  345.819061] hci_sock_release: sock ce8a97f8 sk c4257800
<3>[  345.825897] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  345.831573] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  345.836578] hci_dev_get: 0
<3>[  345.872009] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  345.878143] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  345.883087] ll_device_want_to_sleep: hu c9590d80
<3>[  345.887939] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  345.892791] hci_uart_tx_wakeup: 
<3>[  345.896240] hci_uart_tty_wakeup: 
<3>[  345.899719] hci_uart_tx_wakeup: 
<3>[  347.087493] rfcomm_sock_create: sock ce8a9e18
<3>[  347.092376] rfcomm_dlc_clear_state: c44222c0
<3>[  347.096954] rfcomm_dlc_alloc: c44222c0
<3>[  347.101013] rfcomm_sock_alloc: sk c4257800
<3>[  347.105407] rfcomm_sock_init: sk c4257800
<3>[  347.109863] rfcomm_sock_setsockopt: sk c4257800
<3>[  347.114746] rfcomm_sock_setsockopt_old: sk c4257800
<3>[  347.126342] rfcomm_sock_bind: sk c4257800 00:00:00:00:00:00
<3>[  347.132446] rfcomm_sock_listen: sk c4257800 backlog 1
<3>[  349.978973] rfcomm_sock_create: sock ce8a9360
<3>[  349.983825] rfcomm_dlc_clear_state: c4422240
<3>[  349.988403] rfcomm_dlc_alloc: c4422240
<3>[  349.992431] rfcomm_sock_alloc: sk ccbc0800
<3>[  349.996826] rfcomm_sock_init: sk ccbc0800
<3>[  350.001647] rfcomm_sock_bind: sk ccbc0800 00:00:00:00:00:00
<3>[  350.007659] rfcomm_sock_listen: sk ccbc0800 backlog 1
<6>[  365.680511] request_suspend_state: sleep (0->3) at 357231902868 (2010-02-14 08:30:17.717469718 UTC)
<4>[  397.270477] select 1425 (roid.googleapps), adj 15, size 3764, to kill
<4>[  397.277313] select 1524 (id.provisioning), adj 15, size 3943, to kill
<4>[  397.284088] select 1973 (a.togglewidgets), adj 15, size 3996, to kill
<4>[  397.290863] send sigkill to 1973 (a.togglewidgets), adj 15, size 3996
<6>[  397.610321] request_suspend_state: wakeup (3->0) at 389161742970 (2010-02-14 08:30:49.647309820 UTC)
<6>[  397.742584] done EDISCO CTRL ENABLE
<6>[  397.760223] input: sensors as /devices/virtual/input/input9
<6>[  397.801605] qtouch_force_reset: Forcing HW reset
<6>[  398.011322] do_cmd_proc_msg:EEPROM checksum doesn't match 0x8970
<6>[  398.017669] qtouch_hw_init: Doing hw init
<6>[  398.089447] qtouch_hw_init: No entry key instance.
<6>[  398.161987] qtouch_hw_init: No entry key instance.
<6>[  398.214813] qtouch_force_calibration: Forcing calibration
<6>[  398.761688] do_cmd_proc_msg: Reset done.
<6>[  398.766387] do_cmd_proc_msg: Self-calibration started.
<3>[  398.771820] do_cmd_proc_msg: Acquisition error
<3>[  398.776977] do_cmd_proc_msg: Acquisition error
<6>[  430.385894] request_suspend_state: sleep (0->3) at 421937286179 (2010-02-14 08:31:22.422853029 UTC)
<3>[  465.670532] hci_sock_create: sock cea89980
<3>[  465.675048] hci_sock_bind: sock cea89980 sk c900ca00
<3>[  465.680725] hci_dev_get: 0
<3>[  465.683715] hci_sock_sendmsg: sock cea89980 sk c900ca00
<3>[  465.689331] hci_cmd_task: hci0 cmd 1
<3>[  465.693237] hci_send_frame: hci0 type 1 len 4
<3>[  465.697845] hci_send_to_sock: hdev c453c000 len 4
<3>[  465.702911] hci_uart_send_frame: hci0: type 1 len 4
<3>[  465.708129] ll_enqueue: hu c9590d80 skb cec59cf0
<3>[  465.713012] ll_enqueue: device asleep, waking up and queueing packet
<3>[  465.719726] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  465.724731] hci_uart_tx_wakeup: 
<3>[  465.728240] hci_uart_tty_wakeup: 
<3>[  465.731811] hci_uart_tx_wakeup: 
<3>[  465.735321] hci_sock_release: sock cea89980 sk c900ca00
<3>[  465.740997] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  465.747222] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  465.751861] ll_device_woke_up: hu c9590d80
<3>[  465.756256] hci_uart_tx_wakeup: 
<3>[  465.759826] hci_uart_tty_wakeup: 
<3>[  465.763427] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  465.769653] ll_recv: Event packet
<3>[  465.773284] ll_recv: Event header: evt 0x0e plen 4
<3>[  465.778442] ll_check_data_len: len 4 room 1078
<3>[  465.783142] ll_recv: Complete data
<3>[  465.786804] hci_uart_tx_wakeup: 
<3>[  465.790283] hci_rx_task: hci0
<3>[  465.793487] hci_send_to_sock: hdev c453c000 len 6
<3>[  465.798492] hci_cc_write_scan_enable: hci0 status 0x0
<3>[  465.803894] hci_sent_cmd_data: hci0 opcode 0xc1a
<3>[  465.808868] hci_req_complete: hci0 result 0x00
<3>[  465.829254] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  465.834930] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  465.839996] hci_dev_get: 0
<3>[  465.842864] hci_sock_create: sock cea89980
<3>[  465.847229] hci_sock_bind: sock cea89980 sk c900ca00
<3>[  465.852447] hci_dev_get: 0
<3>[  465.855316] hci_sock_setsockopt: sk c900ca00, opt 2
<3>[  465.860443] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  465.866577] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  465.871520] ll_device_want_to_sleep: hu c9590d80
<3>[  465.876373] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  465.881225] hci_uart_tx_wakeup: 
<3>[  465.884643] hci_uart_tty_wakeup: 
<3>[  465.888153] hci_uart_tx_wakeup: 
<3>[  465.891540] hci_sock_sendmsg: sock cea89980 sk c900ca00
<3>[  465.897094] hci_cmd_task: hci0 cmd 1
<3>[  465.900848] hci_send_frame: hci0 type 1 len 3
<3>[  465.905426] hci_send_to_sock: hdev c453c000 len 3
<3>[  465.910400] hci_uart_send_frame: hci0: type 1 len 3
<3>[  465.915527] ll_enqueue: hu c9590d80 skb cec59840
<3>[  465.920379] ll_enqueue: device asleep, waking up and queueing packet
<3>[  465.927032] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  465.931915] hci_uart_tx_wakeup: 
<3>[  465.935363] hci_uart_tty_wakeup: 
<3>[  465.938812] hci_uart_tx_wakeup: 
<3>[  465.943847] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  465.950012] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  465.954589] ll_device_woke_up: hu c9590d80
<3>[  465.958892] hci_uart_tx_wakeup: 
<3>[  465.962310] hci_uart_tty_wakeup: 
<3>[  465.965820] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  465.971954] ll_recv: Event packet
<3>[  465.975463] ll_recv: Event header: evt 0x0e plen 5
<3>[  465.980499] ll_check_data_len: len 5 room 1078
<3>[  465.985168] ll_recv: Complete data
<3>[  465.988769] hci_uart_tx_wakeup: 
<3>[  465.992126] hci_rx_task: hci0
<3>[  465.995239] hci_send_to_sock: hdev c453c000 len 7
<3>[  466.000213] hci_cmd_complete_evt: hci0 opcode 0xc19
<3>[  466.005615] hci_sock_recvmsg: sock cea89980, sk c900ca00
<3>[  466.011260] hci_sock_setsockopt: sk c900ca00, opt 2
<3>[  466.016418] hci_sock_create: sock ce89a7f8
<3>[  466.020751] hci_sock_bind: sock ce89a7f8 sk c900c800
<3>[  466.025970] hci_dev_get: 0
<3>[  466.028839] hci_sock_setsockopt: sk c900c800, opt 2
<3>[  466.033966] hci_sock_sendmsg: sock ce89a7f8 sk c900c800
<3>[  466.039520] hci_cmd_task: hci0 cmd 1
<3>[  466.043334] hci_send_frame: hci0 type 1 len 7
<3>[  466.047882] hci_send_to_sock: hdev c453c000 len 7
<3>[  466.052856] hci_uart_send_frame: hci0: type 1 len 7
<3>[  466.057952] ll_enqueue: hu c9590d80 skb cec59cf0
<3>[  466.062835] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  466.068969] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  466.073913] ll_device_want_to_sleep: hu c9590d80
<3>[  466.078765] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  466.083618] hci_uart_tx_wakeup: 
<3>[  466.087036] ll_enqueue: device asleep, waking up and queueing packet
<3>[  466.093688] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  466.098571] hci_uart_tx_wakeup: 
<3>[  466.101959] hci_uart_tty_wakeup: 
<3>[  466.105468] hci_uart_tx_wakeup: 
<3>[  466.110107] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  466.116302] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  466.120880] ll_device_woke_up: hu c9590d80
<3>[  466.125183] hci_uart_tx_wakeup: 
<3>[  466.128601] hci_uart_tty_wakeup: 
<3>[  466.132110] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  466.138244] ll_recv: Event packet
<3>[  466.141723] ll_recv: Event header: evt 0x0e plen 4
<3>[  466.146789] ll_check_data_len: len 4 room 1078
<3>[  466.151428] ll_recv: Complete data
<3>[  466.155029] hci_uart_tx_wakeup: 
<3>[  466.158416] hci_rx_task: hci0
<3>[  466.161529] hci_send_to_sock: hdev c453c000 len 6
<3>[  466.166473] hci_cmd_complete_evt: hci0 opcode 0xc3a
<3>[  466.171875] hci_sock_recvmsg: sock ce89a7f8, sk c900c800
<3>[  466.177490] hci_sock_setsockopt: sk c900c800, opt 2
<3>[  466.182617] hci_sock_release: sock ce89a7f8 sk c900c800
<3>[  466.189697] hci_sock_release: sock cea89980 sk c900ca00
<3>[  466.195373] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  466.201019] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  466.206024] hci_dev_get: 0
<3>[  466.208953] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  466.214721] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  466.219726] hci_dev_get: 0
<3>[  466.228881] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  466.235046] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  466.239990] ll_device_want_to_sleep: hu c9590d80
<3>[  466.244842] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  466.249694] hci_uart_tx_wakeup: 
<3>[  466.253112] hci_uart_tty_wakeup: 
<3>[  466.256622] hci_uart_tx_wakeup: 
<3>[  523.404052] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  523.410247] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  523.414855] ll_device_want_to_wakeup: hu c9590d80
<3>[  523.419860] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  523.424804] hci_uart_tx_wakeup: 
<3>[  523.428375] hci_uart_tty_wakeup: 
<3>[  523.431945] ll_recv: hu c9590d80 count 13 rx_state 0 rx_count 0
<3>[  523.438201] ll_recv: Event packet
<3>[  523.441802] ll_recv: Event header: evt 0x04 plen 10
<3>[  523.446960] ll_check_data_len: len 10 room 1078
<3>[  523.451873] ll_recv: Complete data
<3>[  523.455505] hci_uart_tx_wakeup: 
<3>[  523.459045] hci_rx_task: hci0
<3>[  523.462249] hci_send_to_sock: hdev c453c000 len 12
<3>[  523.467437] hci_conn_request_evt: hci0 bdaddr A0:33:E7:98:80:00 type 0x1
<3>[  523.474609] l2cap_connect_ind: hdev hci0, bdaddr A0:33:E7:98:80:00
<3>[  523.481231] hci_inquiry_cache_lookup: cache c453c234, A0:33:E7:98:80:00
<3>[  523.488281] hci_conn_add: hci0 dst A0:33:E7:98:80:00
<3>[  523.493560] hci_send_cmd: hci0 opcode 0x409 plen 7
<3>[  523.498748] hci_send_cmd: skb len 10
<3>[  523.502563] hci_cmd_task: hci0 cmd 1
<3>[  523.506439] hci_send_frame: hci0 type 1 len 10
<3>[  523.511138] hci_send_to_sock: hdev c453c000 len 10
<3>[  523.516265] hci_uart_send_frame: hci0: type 1 len 10
<3>[  523.521575] ll_enqueue: hu c9590d80 skb cec59840
<3>[  523.526458] ll_enqueue: device awake, sending normally
<3>[  523.531982] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  523.538208] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  523.543243] ll_device_want_to_sleep: hu c9590d80
<3>[  523.548126] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  523.553100] hci_uart_tx_wakeup: 
<3>[  523.556579] hci_uart_tx_wakeup: 
<3>[  523.560089] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  523.566314] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  523.570922] ll_device_want_to_wakeup: hu c9590d80
<3>[  523.575927] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  523.580932] hci_uart_tty_wakeup: 
<3>[  523.584533] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  523.590759] ll_recv: Event packet
<3>[  523.594360] ll_recv: Event header: evt 0x0f plen 4
<3>[  523.599487] ll_check_data_len: len 4 room 1078
<3>[  523.604187] ll_recv: Complete data
<3>[  523.607849] hci_uart_tx_wakeup: 
<3>[  523.611267] hci_rx_task: hci0
<3>[  523.614471] hci_send_to_sock: hdev c453c000 len 6
<3>[  523.619506] hci_cmd_status_evt: hci0 opcode 0x409
<3>[  523.624877] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  523.635040] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  523.641326] hci_dev_get: 0
<3>[  523.649536] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  523.675598] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  523.680725] hci_dev_get: 0
<3>[  523.683746] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  523.689941] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  523.694976] ll_device_want_to_sleep: hu c9590d80
<3>[  523.699920] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  523.704864] hci_uart_tx_wakeup: 
<3>[  523.708526] hci_uart_tty_wakeup: 
<3>[  523.712036] hci_uart_tx_wakeup: 
<3>[  523.717956] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  523.724273] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  523.728881] ll_device_want_to_wakeup: hu c9590d80
<3>[  523.733978] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  523.738983] hci_uart_tx_wakeup: 
<3>[  523.742523] hci_uart_tty_wakeup: 
<3>[  523.746154] ll_recv: hu c9590d80 count 11 rx_state 0 rx_count 0
<3>[  523.752532] ll_recv: Event packet
<3>[  523.756256] ll_recv: Event header: evt 0x12 plen 8
<3>[  523.761413] ll_check_data_len: len 8 room 1078
<3>[  523.766174] ll_recv: Complete data
<3>[  523.769958] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  523.776184] ll_recv: Event packet
<3>[  523.779876] ll_recv: Event header: evt 0x03 plen 11
<3>[  523.785156] ll_check_data_len: len 11 room 1078
<3>[  523.790008] ll_recv: hu c9590d80 count 23 rx_state 4 rx_count 7
<3>[  523.796356] ll_recv: Complete data
<3>[  523.800018] ll_recv: Event packet
<3>[  523.803710] ll_recv: Event header: evt 0x20 plen 7
<3>[  523.808868] ll_check_data_len: len 7 room 1078
<3>[  523.813629] ll_recv: Complete data
<3>[  523.817443] ll_recv: Event packet
<3>[  523.821044] ll_recv: Event header: evt 0x1b plen 3
<3>[  523.826171] ll_check_data_len: len 3 room 1078
<3>[  523.830871] ll_recv: Complete data
<3>[  523.834564] hci_uart_tx_wakeup: 
<3>[  523.838073] hci_rx_task: hci0
<3>[  523.841308] hci_send_to_sock: hdev c453c000 len 10
<3>[  523.846466] hci_role_change_evt: hci0 status 0
<3>[  523.851287] hci_send_to_sock: hdev c453c000 len 13
<3>[  523.856475] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  523.862762] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  523.867797] ll_device_want_to_sleep: hu c9590d80
<3>[  523.872772] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  523.877716] hci_uart_tx_wakeup: 
<3>[  523.881286] hci_conn_complete_evt: hci0
<3>[  523.885375] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  523.891601] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  523.896301] ll_device_want_to_wakeup: hu c9590d80
<3>[  523.901367] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  523.906372] hci_uart_tx_wakeup: 
<3>[  523.909942] hci_conn_add_sysfs: conn c900c000
<3>[  523.914642] ll_recv: hu c9590d80 count 9 rx_state 0 rx_count 0
<3>[  523.920898] ll_recv: Event packet
<3>[  523.924530] ll_recv: Event header: evt 0x17 plen 6
<3>[  523.929687] ll_check_data_len: len 6 room 1078
<3>[  523.934478] ll_recv: Complete data
<3>[  523.938201] hci_send_cmd: hci0 opcode 0x41b plen 2
<3>[  523.943420] hci_send_cmd: skb len 5
<3>[  523.947174] hci_conn_check_pending: hdev hci0
<3>[  523.951904] hci_send_to_sock: hdev c453c000 len 9
<3>[  523.956970] hci_pscan_rep_mode_evt: hci0
<3>[  523.961334] hci_inquiry_cache_lookup: cache c453c234, A0:33:E7:98:80:00
<3>[  523.968414] hci_send_to_sock: hdev c453c000 len 5
<3>[  523.973480] hci_event_packet: hci0 event 0x1b
<3>[  523.978118] hci_send_to_sock: hdev c453c000 len 8
<3>[  523.983184] hci_link_key_request_evt: hci0
<3>[  523.987670] hci_uart_tty_wakeup: 
<3>[  523.991241] hci_uart_tx_wakeup: 
<3>[  523.994689] hci_rx_task: hci0
<3>[  523.997894] hci_cmd_task: hci0 cmd 1
<3>[  524.001708] hci_send_frame: hci0 type 1 len 5
<3>[  524.006408] hci_send_to_sock: hdev c453c000 len 5
<3>[  524.011474] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  524.017669] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  524.022705] ll_device_want_to_sleep: hu c9590d80
<3>[  524.027648] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  524.032562] hci_uart_tx_wakeup: 
<3>[  524.036102] hci_uart_send_frame: hci0: type 1 len 5
<3>[  524.041290] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  524.046234] ll_enqueue: device asleep, waking up and queueing packet
<3>[  524.053009] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  524.057983] hci_uart_tx_wakeup: 
<3>[  524.061462] hci_uart_tty_wakeup: 
<3>[  524.065002] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  524.071258] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  524.075927] ll_device_woke_up: hu c9590d80
<3>[  524.080261] hci_uart_tx_wakeup: 
<3>[  524.083770] hci_uart_tx_wakeup: 
<3>[  524.087249] ll_recv: hu c9590d80 count 21 rx_state 0 rx_count 0
<3>[  524.093566] ll_recv: Event packet
<3>[  524.097229] ll_recv: Event header: evt 0x0f plen 4
<3>[  524.102294] ll_check_data_len: len 4 room 1078
<3>[  524.107055] ll_recv: Complete data
<3>[  524.110687] ll_recv: Event packet
<3>[  524.114318] ll_recv: Event header: evt 0x0b plen 11
<3>[  524.119476] ll_check_data_len: len 11 room 1078
<3>[  524.124328] ll_recv: Complete data
<3>[  524.127960] hci_rx_task: hci0
<3>[  524.131225] hci_send_to_sock: hdev c453c000 len 6
<3>[  524.136291] hci_cs_read_remote_features: hci0 status 0x0
<3>[  524.141937] hci_send_to_sock: hdev c453c000 len 13
<3>[  524.147094] hci_remote_features_evt: hci0 status 0
<3>[  524.152252] l2cap_connect_cfm: hcon c900c000 bdaddr A0:33:E7:98:80:00 status 0
<3>[  524.159973] l2cap_conn_add: hcon c900c000 conn ccd49940
<3>[  524.165496] l2cap_conn_ready: conn ccd49940
<3>[  524.169982] sco_connect_cfm: hcon c900c000 bdaddr A0:33:E7:98:80:00 status 0
<6>[  524.183288] request_suspend_state: wakeup (3->0) at 515734710486 (2010-02-14 08:32:56.220277336 UTC)
<3>[  524.192962] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  524.199096] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  524.204010] ll_device_want_to_sleep: hu c9590d80
<3>[  524.208892] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  524.213745] hci_uart_tx_wakeup: 
<3>[  524.217193] hci_uart_tty_wakeup: 
<3>[  524.220672] hci_uart_tx_wakeup: 
<3>[  524.227600] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  524.233276] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  524.238372] hci_dev_get: 0
<3>[  524.267333] hci_sock_create: sock ce8a97f8
<6>[  524.282897] input: sensors as /devices/virtual/input/input10
<6>[  524.304595] done EDISCO CTRL ENABLE
<3>[  524.323760] hci_sock_bind: sock ce8a97f8 sk c900c400
<3>[  524.328979] hci_dev_get: 0
<6>[  524.362945] qtouch_force_reset: Forcing HW reset
<3>[  524.367858] hci_sock_sendmsg: sock ce8a97f8 sk c900c400
<3>[  524.393554] hci_cmd_task: hci0 cmd 1
<3>[  524.397399] hci_send_frame: hci0 type 1 len 13
<3>[  524.402099] hci_send_to_sock: hdev c453c000 len 13
<3>[  524.407104] hci_uart_send_frame: hci0: type 1 len 13
<3>[  524.412353] ll_enqueue: hu c9590d80 skb cec595e8
<3>[  524.417205] ll_enqueue: device asleep, waking up and queueing packet
<3>[  524.423858] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  524.428771] hci_uart_tx_wakeup: 
<3>[  524.432220] hci_uart_tty_wakeup: 
<3>[  524.435729] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  524.441864] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  524.446441] ll_device_woke_up: hu c9590d80
<3>[  524.450744] hci_uart_tx_wakeup: 
<3>[  524.454162] hci_uart_tx_wakeup: 
<3>[  524.457580] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  524.463714] ll_recv: Event packet
<3>[  524.467224] ll_recv: Event header: evt 0x0f plen 4
<3>[  524.472290] ll_check_data_len: len 4 room 1078
<3>[  524.476928] ll_recv: Complete data
<3>[  524.480560] hci_rx_task: hci0
<3>[  524.483673] hci_send_to_sock: hdev c453c000 len 6
<3>[  524.488616] hci_cs_remote_name_req: hci0 status 0x0
<3>[  524.493804] ll_recv: hu c9590d80 count 61 rx_state 0 rx_count 0
<3>[  524.500061] ll_recv: Event packet
<3>[  524.503631] ll_recv: Event header: evt 0x07 plen 255
<3>[  524.508819] ll_check_data_len: len 255 room 1078
<3>[  524.513763] ll_recv: hu c9590d80 count 61 rx_state 4 rx_count 197
<3>[  524.520233] ll_recv: hu c9590d80 count 61 rx_state 4 rx_count 136
<3>[  524.526672] ll_recv: hu c9590d80 count 7 rx_state 4 rx_count 75
<3>[  524.532897] ll_recv: hu c9590d80 count 54 rx_state 4 rx_count 68
<3>[  524.539245] ll_recv: hu c9590d80 count 14 rx_state 4 rx_count 14
<3>[  524.545562] ll_recv: Complete data
<3>[  524.549163] hci_send_to_sock: hdev c453c000 len 257
<3>[  524.554290] hci_remote_name_evt: hci0
<3>[  524.558166] hci_conn_check_pending: hdev hci0
<3>[  524.562744] hci_rx_task: hci0
<3>[  524.626953] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  524.633178] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  524.638153] ll_device_want_to_sleep: hu c9590d80
<3>[  524.642974] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  524.647888] hci_uart_tx_wakeup: 
<3>[  524.651336] hci_uart_tty_wakeup: 
<3>[  524.654815] hci_uart_tx_wakeup: 
<6>[  524.659942] do_cmd_proc_msg: Reset done.
<6>[  524.682403] do_cmd_proc_msg: Self-calibration started.
<3>[  524.687835] do_cmd_proc_msg: Acquisition error
<3>[  524.694213] do_cmd_proc_msg: Acquisition error
<3>[  524.704467] hci_sock_release: sock ce8a97f8 sk c900c400
<3>[  524.710449] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  524.717346] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  524.722625] hci_dev_get: 0
<3>[  524.726409] hci_sock_ioctl: cmd 800448d7 arg be90c9fc
<3>[  524.731903] hci_sock_sendmsg: sock cea6cc90 sk c4257e00
<3>[  524.742767] hci_cmd_task: hci0 cmd 1
<3>[  524.746612] hci_send_frame: hci0 type 1 len 9
<3>[  524.751220] hci_send_to_sock: hdev c453c000 len 9
<3>[  524.756195] hci_uart_send_frame: hci0: type 1 len 9
<3>[  524.761322] ll_enqueue: hu c9590d80 skb ce3de7f8
<3>[  524.766174] ll_enqueue: device asleep, waking up and queueing packet
<3>[  524.772827] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  524.777709] hci_uart_tx_wakeup: 
<3>[  524.781158] hci_uart_tty_wakeup: 
<3>[  524.784698] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  524.790802] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  524.795410] ll_device_woke_up: hu c9590d80
<3>[  524.799713] hci_uart_tx_wakeup: 
<3>[  524.803131] hci_uart_tx_wakeup: 
<3>[  524.806518] ll_recv: hu c9590d80 count 13 rx_state 0 rx_count 0
<3>[  524.812744] ll_recv: Event packet
<3>[  524.816284] ll_recv: Event header: evt 0x0e plen 10
<3>[  524.821411] ll_check_data_len: len 10 room 1078
<3>[  524.826171] ll_recv: Complete data
<3>[  524.829772] hci_rx_task: hci0
<3>[  524.832885] hci_send_to_sock: hdev c453c000 len 12
<3>[  524.837951] hci_cmd_complete_evt: hci0 opcode 0x40c
<3>[  524.845306] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  524.853515] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  524.858612] hci_dev_get: 0
<3>[  524.862701] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  524.868377] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  524.873596] hci_dev_get: 0
<3>[  524.876525] hci_sock_create: sock ce8a94e8
<3>[  524.881988] hci_sock_ioctl: cmd 800448d2 arg 14070
<3>[  524.887176] hci_sock_ioctl: cmd 800448d3 arg be90c958
<3>[  524.892456] hci_dev_get: 0
<3>[  524.895355] hci_sock_release: sock ce8a94e8 sk ccbc0000
<3>[  524.901947] hci_sock_ioctl: cmd 800448d4 arg 13f50
<3>[  524.906982] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  524.913146] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  524.918090] ll_device_want_to_sleep: hu c9590d80
<3>[  524.922943] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  524.927825] hci_uart_tx_wakeup: 
<3>[  524.931243] hci_uart_tty_wakeup: 
<3>[  524.934783] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  524.940917] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  524.945495] ll_device_want_to_wakeup: hu c9590d80
<3>[  524.950469] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  524.955322] hci_uart_tx_wakeup: 
<3>[  524.958740] hci_uart_tx_wakeup: 
<3>[  524.962127] ll_recv: hu c9590d80 count 9 rx_state 0 rx_count 0
<3>[  524.968261] ll_recv: Event packet
<3>[  524.971771] ll_recv: Event header: evt 0x16 plen 6
<3>[  524.976837] ll_check_data_len: len 6 room 1078
<3>[  524.981506] ll_recv: Complete data
<3>[  524.985107] hci_rx_task: hci0
<3>[  524.988250] hci_send_to_sock: hdev c453c000 len 8
<3>[  524.993194] hci_pin_code_request_evt: hci0
<3>[  525.001312] hci_dev_get: 0
<3>[  525.007019] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  525.012695] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  525.018859] hci_dev_get: 0
<3>[  525.021850] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  525.027496] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  525.032501] hci_dev_get: 0
<3>[  525.039794] hci_sock_create: sock ce8a94e8
<3>[  525.044372] hci_sock_bind: sock ce8a94e8 sk ccbc0000
<3>[  525.050659] hci_dev_get: 0
<3>[  525.053527] hci_sock_sendmsg: sock ce8a94e8 sk ccbc0000
<3>[  525.059082] hci_cmd_task: hci0 cmd 1
<3>[  525.062866] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  525.069000] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  525.073974] ll_device_want_to_sleep: hu c9590d80
<3>[  525.078826] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  525.083709] hci_uart_tx_wakeup: 
<3>[  525.087127] hci_send_frame: hci0 type 1 len 5
<3>[  525.091735] hci_send_to_sock: hdev c453c000 len 5
<3>[  525.096679] hci_uart_send_frame: hci0: type 1 len 5
<3>[  525.101806] ll_enqueue: hu c9590d80 skb cec595e8
<3>[  525.106689] ll_enqueue: device asleep, waking up and queueing packet
<3>[  525.113342] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  525.118225] hci_uart_tx_wakeup: 
<3>[  525.121673] hci_uart_tty_wakeup: 
<3>[  525.125152] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  525.131286] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  525.135864] ll_device_woke_up: hu c9590d80
<3>[  525.140197] hci_uart_tx_wakeup: 
<3>[  525.143585] hci_uart_tx_wakeup: 
<3>[  525.147003] ll_recv: hu c9590d80 count 18 rx_state 0 rx_count 0
<3>[  525.153228] ll_recv: Event packet
<3>[  525.156738] ll_recv: Event header: evt 0x0f plen 4
<3>[  525.161804] ll_check_data_len: len 4 room 1078
<3>[  525.166442] ll_recv: Complete data
<3>[  525.170043] ll_recv: Event packet
<3>[  525.173553] ll_recv: Event header: evt 0x0c plen 8
<3>[  525.178588] ll_check_data_len: len 8 room 1078
<3>[  525.183288] ll_recv: Complete data
<3>[  525.186859] hci_rx_task: hci0
<3>[  525.189971] hci_send_to_sock: hdev c453c000 len 6
<3>[  525.194946] hci_cmd_status_evt: hci0 opcode 0x41d
<3>[  525.199920] hci_send_to_sock: hdev c453c000 len 10
<3>[  525.204956] hci_remote_version_evt: hci0
<3>[  525.210571] hci_sock_release: sock ce8a94e8 sk ccbc0000
<3>[  525.221984] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  525.232543] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  525.237640] hci_dev_get: 0
<3>[  525.240631] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  525.246276] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  525.252441] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  525.257415] ll_device_want_to_sleep: hu c9590d80
<3>[  525.262268] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  525.267120] hci_uart_tx_wakeup: 
<3>[  525.270599] hci_uart_tty_wakeup: 
<3>[  525.274047] hci_uart_tx_wakeup: 
<3>[  525.288757] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  525.293945] hci_dev_get: 0
<3>[  525.298126] hci_sock_ioctl: cmd 800448d5 arg 13820
<3>[  525.305175] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  525.311065] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  525.316833] hci_dev_get: 0
<3>[  525.319824] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  525.326202] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  525.331878] hci_dev_get: 0
<3>[  525.334777] hci_sock_create: sock ce8a94e8
<3>[  525.339111] hci_sock_ioctl: cmd 800448d2 arg 140e0
<3>[  525.344207] hci_sock_ioctl: cmd 800448d3 arg be90c950
<3>[  525.349517] hci_dev_get: 0
<3>[  525.352416] hci_sock_release: sock ce8a94e8 sk ccbc0000
<3>[  525.358551] hci_sock_ioctl: cmd 800448d4 arg 13fc0
<3>[  525.363647] hci_dev_get: 0
<3>[  525.370086] hci_sock_create: sock ce8a94e8
<3>[  525.374542] hci_sock_bind: sock ce8a94e8 sk ccbc0000
<3>[  525.379852] hci_dev_get: 0
<3>[  525.383331] hci_sock_release: sock ce8a94e8 sk ccbc0000
<3>[  528.473541] hci_sock_create: sock ce8a9980
<3>[  528.477935] hci_sock_bind: sock ce8a9980 sk c900ca00
<3>[  528.483337] hci_dev_get: 0
<3>[  528.486206] hci_sock_sendmsg: sock ce8a9980 sk c900ca00
<3>[  528.491821] hci_cmd_task: hci0 cmd 1
<3>[  528.495666] hci_send_frame: hci0 type 1 len 12
<3>[  528.500305] hci_send_to_sock: hdev c453c000 len 12
<3>[  528.505371] hci_uart_send_frame: hci0: type 1 len 12
<3>[  528.510589] ll_enqueue: hu c9590d80 skb cec59840
<3>[  528.515441] ll_enqueue: device asleep, waking up and queueing packet
<3>[  528.522094] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  528.526977] hci_uart_tx_wakeup: 
<3>[  528.530426] hci_uart_tty_wakeup: 
<3>[  528.533905] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  528.540039] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  528.544647] ll_device_woke_up: hu c9590d80
<3>[  528.548919] hci_uart_tx_wakeup: 
<3>[  528.552368] hci_uart_tx_wakeup: 
<3>[  528.555755] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  528.561920] ll_recv: Event packet
<3>[  528.565399] ll_recv: Event header: evt 0x0e plen 4
<3>[  528.570465] ll_check_data_len: len 4 room 1078
<3>[  528.575134] ll_recv: Complete data
<3>[  528.578735] hci_rx_task: hci0
<3>[  528.581848] hci_send_to_sock: hdev c453c000 len 6
<3>[  528.586791] hci_cmd_complete_evt: hci0 opcode 0x403
<3>[  528.606750] hci_sock_release: sock ce8a9980 sk c900ca00
<3>[  528.640899] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  528.648101] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  528.653350] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  528.659454] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  528.664459] ll_device_want_to_sleep: hu c9590d80
<3>[  528.669311] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  528.674163] hci_uart_tx_wakeup: 
<3>[  528.677612] hci_uart_tty_wakeup: 
<3>[  528.681091] hci_uart_tx_wakeup: 
<3>[  528.713562] hci_dev_get: 0
<3>[  532.001190] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  532.007385] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  532.011962] ll_device_want_to_wakeup: hu c9590d80
<3>[  532.016906] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  532.021820] hci_uart_tx_wakeup: 
<3>[  532.025268] hci_uart_tty_wakeup: 
<3>[  532.028778] ll_recv: hu c9590d80 count 18 rx_state 0 rx_count 0
<3>[  532.035034] ll_recv: Event packet
<3>[  532.038543] ll_recv: Event header: evt 0x22 plen 15
<3>[  532.043670] ll_check_data_len: len 15 room 1078
<3>[  532.048431] ll_recv: Complete data
<3>[  532.052032] hci_uart_tx_wakeup: 
<3>[  532.055419] hci_rx_task: hci0
<3>[  532.058563] hci_send_to_sock: hdev c453c000 len 17
<3>[  532.063598] hci_inquiry_result_with_rssi_evt: hci0 num_rsp 1
<3>[  532.069580] hci_inquiry_cache_update: cache c453c234, A0:33:E7:98:80:00
<3>[  532.076538] hci_inquiry_cache_lookup: cache c453c234, A0:33:E7:98:80:00
<3>[  532.083618] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  532.089233] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  532.100219] hci_dev_get: 0
<3>[  532.126007] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  532.132232] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  532.137207] ll_device_want_to_sleep: hu c9590d80
<3>[  532.142028] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  532.146911] hci_uart_tx_wakeup: 
<3>[  532.150360] hci_uart_tty_wakeup: 
<3>[  532.153869] hci_uart_tx_wakeup: 
<3>[  535.066009] hci_sock_create: sock ce8a91d8
<3>[  535.070404] hci_sock_ioctl: cmd 800448d2 arg d4a8
<3>[  535.075469] hci_sock_ioctl: cmd 800448d3 arg be90ca00
<3>[  535.080780] hci_dev_get: 0
<3>[  535.132354] hci_sock_release: sock ce8a91d8 sk c77dc200
<3>[  535.167297] hci_sock_create: sock ce8a91d8
<3>[  535.198852] hci_sock_bind: sock ce8a91d8 sk c77dc200
<3>[  535.205200] hci_dev_get: 0
<3>[  535.208251] hci_sock_create: sock ce8a9050
<3>[  535.237274] hci_sock_ioctl: cmd 800448d2 arg d4a8
<3>[  535.249450] hci_sock_ioctl: cmd 800448d3 arg be90c990
<3>[  535.279754] hci_dev_get: 0
<3>[  535.304229] hci_sock_release: sock ce8a9050 sk c1c3ce00
<3>[  535.318908] hci_sock_sendmsg: sock ce8a91d8 sk c77dc200
<3>[  535.338592] hci_cmd_task: hci0 cmd 1
<3>[  535.342407] hci_send_frame: hci0 type 1 len 26
<3>[  535.347045] hci_send_to_sock: hdev c453c000 len 26
<3>[  535.352111] hci_uart_send_frame: hci0: type 1 len 26
<3>[  535.357360] ll_enqueue: hu c9590d80 skb cec59840
<3>[  535.362213] ll_enqueue: device asleep, waking up and queueing packet
<3>[  535.368865] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  535.373748] hci_uart_tx_wakeup: 
<3>[  535.377197] hci_uart_tty_wakeup: 
<3>[  535.380706] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  535.386871] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  535.391448] ll_device_woke_up: hu c9590d80
<3>[  535.395751] hci_uart_tx_wakeup: 
<3>[  535.399169] hci_uart_tx_wakeup: 
<3>[  535.403076] ll_recv: hu c9590d80 count 13 rx_state 0 rx_count 0
<3>[  535.409301] ll_recv: Event packet
<3>[  535.412841] ll_recv: Event header: evt 0x0e plen 10
<3>[  535.417968] ll_check_data_len: len 10 room 1078
<3>[  535.422760] ll_recv: Complete data
<3>[  535.426361] hci_rx_task: hci0
<3>[  535.429443] hci_send_to_sock: hdev c453c000 len 12
<3>[  535.434509] hci_cmd_complete_evt: hci0 opcode 0x40d
<3>[  535.453704] hci_sock_release: sock ce8a91d8 sk c77dc200
<3>[  535.473693] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  535.479309] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  535.484527] hci_dev_get: 0
<3>[  535.507385] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  535.513549] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  535.518463] ll_device_want_to_sleep: hu c9590d80
<3>[  535.523345] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  535.528228] hci_uart_tx_wakeup: 
<3>[  535.531677] hci_uart_tty_wakeup: 
<3>[  535.535156] hci_uart_tx_wakeup: 
<3>[  535.591552] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  535.597778] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  535.602386] ll_device_want_to_wakeup: hu c9590d80
<3>[  535.607391] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  535.612335] hci_uart_tx_wakeup: 
<3>[  535.615875] hci_uart_tty_wakeup: 
<3>[  535.619476] ll_recv: hu c9590d80 count 41 rx_state 0 rx_count 0
<3>[  535.625732] ll_recv: Event packet
<3>[  535.629425] ll_recv: Event header: evt 0x18 plen 23
<3>[  535.634582] ll_check_data_len: len 23 room 1078
<3>[  535.639465] ll_recv: Complete data
<3>[  535.643096] ll_recv: ACL packet
<3>[  535.646575] ll_recv: ACL header: dlen 10
<3>[  535.650726] ll_check_data_len: len 10 room 1076
<3>[  535.655578] ll_recv: Complete data
<3>[  535.659240] hci_uart_tx_wakeup: 
<3>[  535.662780] hci_rx_task: hci0
<3>[  535.665924] hci_send_to_sock: hdev c453c000 len 25
<3>[  535.671112] hci_link_key_notify_evt: hci0
<3>[  535.675415] hci_send_to_sock: hdev c453c000 len 14
<3>[  535.680511] hci_rx_task: hci0 ACL data packet
<3>[  535.685180] hci_acldata_packet: hci0 len 10 handle 0x1 flags 0x2
<3>[  535.691589] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  535.697601] l2cap_recv_acldata: conn ccd49940 len 10 flags 0x2
<3>[  535.703857] l2cap_recv_frame: len 6, cid 0x0001
<3>[  535.708679] l2cap_raw_recv: conn ccd49940
<3>[  535.712951] l2cap_sig_channel: code 0x0a len 2 id 0x02
<3>[  535.718475] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  535.724700] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  535.729705] ll_device_want_to_sleep: hu c9590d80
<3>[  535.734649] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  535.739624] hci_uart_tx_wakeup: 
<3>[  535.743103] l2cap_information_req: type 0x0002
<3>[  535.747894] l2cap_build_cmd: conn ccd49940, code 0x0b, ident 0x02, len 8
<3>[  535.755065] l2cap_send_cmd: code 0x0b
<3>[  535.758941] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  535.764465] hci_send_acl: hci0 nonfrag skb cec595e8 len 20
<3>[  535.770355] hci_uart_tty_wakeup: 
<3>[  535.773864] hci_uart_tx_wakeup: 
<3>[  535.777343] hci_tx_task: hci0 acl 4 sco 4
<3>[  535.781646] hci_sched_acl: hci0
<3>[  535.785034] hci_low_sent: conn c900c000 quote 4
<3>[  535.789855] hci_sched_acl: skb cec595e8 len 20
<3>[  535.794586] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  535.800659] hci_send_frame: hci0 type 2 len 20
<3>[  535.805358] hci_send_to_sock: hdev c453c000 len 20
<3>[  535.810485] hci_uart_send_frame: hci0: type 2 len 20
<3>[  535.815765] ll_enqueue: hu c9590d80 skb cec595e8
<3>[  535.820709] ll_enqueue: device asleep, waking up and queueing packet
<3>[  535.827423] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  535.832427] hci_uart_tx_wakeup: 
<3>[  535.835906] hci_low_sent: conn (null) quote 0
<3>[  535.840576] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  535.846832] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  535.851501] ll_device_woke_up: hu c9590d80
<3>[  535.855895] hci_uart_tx_wakeup: 
<3>[  535.859375] hci_sched_sco: hci0
<3>[  535.862731] hci_low_sent: conn (null) quote 0
<3>[  535.867431] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  535.873657] ll_recv: Event packet
<3>[  535.877258] ll_recv: Event header: evt 0x13 plen 5
<3>[  535.882385] ll_check_data_len: len 5 room 1078
<3>[  535.887145] ll_recv: Complete data
<3>[  535.890777] hci_sched_esco: hci0
<3>[  535.894287] ll_recv: hu c9590d80 count 17 rx_state 0 rx_count 0
<3>[  535.900573] ll_recv: ACL packet
<3>[  535.904052] ll_recv: ACL header: dlen 12
<3>[  535.908203] ll_check_data_len: len 12 room 1076
<3>[  535.913055] ll_recv: Complete data
<3>[  535.916687] hci_low_sent: conn (null) quote 0
<3>[  535.921386] hci_uart_tty_wakeup: 
<3>[  535.924896] hci_uart_tx_wakeup: 
<3>[  535.928375] hci_rx_task: hci0
<3>[  535.931549] hci_send_to_sock: hdev c453c000 len 7
<3>[  535.936584] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  535.941711] hci_send_to_sock: hdev c453c000 len 16
<3>[  535.946807] hci_rx_task: hci0 ACL data packet
<3>[  535.951477] hci_acldata_packet: hci0 len 12 handle 0x1 flags 0x2
<3>[  535.957885] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  535.963897] l2cap_recv_acldata: conn ccd49940 len 12 flags 0x2
<3>[  535.970123] l2cap_recv_frame: len 8, cid 0x0001
<3>[  535.974975] l2cap_raw_recv: conn ccd49940
<3>[  535.979217] l2cap_sig_channel: code 0x02 len 4 id 0x03
<3>[  535.984741] l2cap_connect_req: psm 0x01 scid 0x0040
<3>[  535.989990] l2cap_sock_init: sk c77dc200
<3>[  535.994171] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  536.000427] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  536.005462] ll_device_want_to_sleep: hu c9590d80
<3>[  536.010345] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  536.015319] hci_uart_tx_wakeup: 
<3>[  536.018829] __l2cap_chan_add: conn ccd49940, psm 0x01, dcid 0x0040
<3>[  536.025421] l2cap_sock_set_timer: sk c77dc200 state 2 timeout 5120
<3>[  536.032012] l2cap_build_cmd: conn ccd49940, code 0x03, ident 0x03, len 8
<3>[  536.039215] l2cap_send_cmd: code 0x03
<3>[  536.043151] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  536.048583] hci_send_acl: hci0 nonfrag skb cec595e8 len 20
<3>[  536.054473] l2cap_build_cmd: conn ccd49940, code 0x0a, ident 0x01, len 2
<3>[  536.061645] l2cap_send_cmd: code 0x0a
<3>[  536.065521] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  536.071044] hci_send_acl: hci0 nonfrag skb cec599d0 len 14
<3>[  536.076934] hci_tx_task: hci0 acl 4 sco 4
<3>[  536.081176] hci_sched_acl: hci0
<3>[  536.084564] hci_low_sent: conn c900c000 quote 4
<3>[  536.089416] hci_sched_acl: skb cec595e8 len 20
<3>[  536.094146] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  536.100158] hci_send_frame: hci0 type 2 len 20
<3>[  536.104919] hci_send_to_sock: hdev c453c000 len 20
<3>[  536.110046] hci_uart_send_frame: hci0: type 2 len 20
<3>[  536.115325] ll_enqueue: hu c9590d80 skb cec595e8
<3>[  536.120239] ll_enqueue: device asleep, waking up and queueing packet
<3>[  536.126983] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  536.131958] hci_uart_tx_wakeup: 
<3>[  536.135437] hci_sched_acl: skb cec599d0 len 14
<3>[  536.140228] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  536.146453] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  536.151123] ll_device_woke_up: hu c9590d80
<3>[  536.155517] hci_uart_tx_wakeup: 
<3>[  536.158996] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  536.165069] hci_send_frame: hci0 type 2 len 14
<3>[  536.169860] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  536.176086] ll_recv: Event packet
<3>[  536.179687] ll_recv: Event header: evt 0x13 plen 5
<3>[  536.184814] ll_check_data_len: len 5 room 1078
<3>[  536.189544] ll_recv: Complete data
<3>[  536.193237] hci_send_to_sock: hdev c453c000 len 14
<3>[  536.198364] hci_uart_send_frame: hci0: type 2 len 14
<3>[  536.203674] ll_enqueue: hu c9590d80 skb cec599d0
<3>[  536.208618] ll_enqueue: device awake, sending normally
<3>[  536.214050] hci_uart_tx_wakeup: 
<3>[  536.217559] hci_low_sent: conn (null) quote 0
<3>[  536.222259] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  536.228454] ll_recv: Event packet
<3>[  536.232086] ll_recv: Event header: evt 0x13 plen 5
<3>[  536.237152] ll_check_data_len: len 5 room 1078
<3>[  536.241912] ll_recv: Complete data
<3>[  536.245605] hci_sched_sco: hci0
<3>[  536.249023] ll_recv: hu c9590d80 count 10 rx_state 0 rx_count 0
<3>[  536.255371] ll_recv: ACL packet
<3>[  536.258789] ll_recv: ACL header: dlen 16
<3>[  536.262969] ll_check_data_len: len 16 room 1076
<3>[  536.267791] ll_recv: hu c9590d80 count 11 rx_state 4 rx_count 11
<3>[  536.274200] ll_recv: Complete data
<3>[  536.277893] hci_low_sent: conn (null) quote 0
<3>[  536.282501] hci_sched_esco: hci0
<3>[  536.285980] hci_low_sent: conn (null) quote 0
<3>[  536.290618] hci_uart_tty_wakeup: 
<3>[  536.294189] hci_uart_tx_wakeup: 
<3>[  536.297607] hci_rx_task: hci0
<3>[  536.300811] hci_send_to_sock: hdev c453c000 len 7
<3>[  536.305816] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  536.310974] hci_send_to_sock: hdev c453c000 len 7
<3>[  536.316009] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  536.321105] hci_send_to_sock: hdev c453c000 len 20
<3>[  536.326232] hci_rx_task: hci0 ACL data packet
<3>[  536.330841] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  536.337249] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  536.343322] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  536.349548] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  536.355804] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  536.360778] ll_device_want_to_sleep: hu c9590d80
<3>[  536.365722] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  536.370697] hci_uart_tx_wakeup: 
<3>[  536.374206] l2cap_recv_frame: len 12, cid 0x0001
<3>[  536.379119] l2cap_raw_recv: conn ccd49940
<3>[  536.383392] l2cap_sig_channel: code 0x0b len 8 id 0x01
<3>[  536.388885] l2cap_information_rsp: type 0x0002 result 0x00
<3>[  536.394744] l2cap_conn_start: conn ccd49940
<3>[  536.399200] hci_conn_security: conn c900c000
<3>[  536.403778] l2cap_build_cmd: conn ccd49940, code 0x03, ident 0x03, len 8
<3>[  536.410949] l2cap_send_cmd: code 0x03
<3>[  536.414825] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  536.420318] hci_send_acl: hci0 nonfrag skb cec599d0 len 20
<3>[  536.426239] hci_tx_task: hci0 acl 4 sco 4
<3>[  536.430480] hci_sched_acl: hci0
<3>[  536.433868] hci_low_sent: conn c900c000 quote 4
<3>[  536.438659] hci_sched_acl: skb cec599d0 len 20
<3>[  536.443420] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  536.449462] hci_send_frame: hci0 type 2 len 20
<3>[  536.454193] hci_send_to_sock: hdev c453c000 len 20
<3>[  536.459320] hci_uart_send_frame: hci0: type 2 len 20
<3>[  536.464630] ll_enqueue: hu c9590d80 skb cec599d0
<3>[  536.469543] ll_enqueue: device asleep, waking up and queueing packet
<3>[  536.476257] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  536.481231] hci_uart_tx_wakeup: 
<3>[  536.484710] hci_low_sent: conn (null) quote 0
<3>[  536.489410] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  536.495635] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  536.500274] ll_device_woke_up: hu c9590d80
<3>[  536.504638] hci_uart_tx_wakeup: 
<3>[  536.508148] hci_sched_sco: hci0
<3>[  536.511535] hci_low_sent: conn (null) quote 0
<3>[  536.516174] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  536.522399] ll_recv: Event packet
<3>[  536.526031] ll_recv: Event header: evt 0x13 plen 5
<3>[  536.531158] ll_check_data_len: len 5 room 1078
<3>[  536.535919] ll_recv: Complete data
<3>[  536.539520] hci_sched_esco: hci0
<3>[  536.543029] ll_recv: hu c9590d80 count 17 rx_state 0 rx_count 0
<3>[  536.549316] ll_recv: ACL packet
<3>[  536.552764] ll_recv: ACL header: dlen 12
<3>[  536.556915] ll_check_data_len: len 12 room 1076
<3>[  536.561767] ll_recv: Complete data
<3>[  536.565399] hci_low_sent: conn (null) quote 0
<3>[  536.570068] hci_uart_tty_wakeup: 
<3>[  536.573577] hci_uart_tx_wakeup: 
<3>[  536.577087] hci_rx_task: hci0
<3>[  536.580230] hci_send_to_sock: hdev c453c000 len 7
<3>[  536.585266] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  536.590423] hci_send_to_sock: hdev c453c000 len 16
<3>[  536.595520] hci_rx_task: hci0 ACL data packet
<3>[  536.600189] hci_acldata_packet: hci0 len 12 handle 0x1 flags 0x2
<3>[  536.606597] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  536.612609] l2cap_recv_acldata: conn ccd49940 len 12 flags 0x2
<3>[  536.618835] l2cap_recv_frame: len 8, cid 0x0001
<3>[  536.623687] l2cap_raw_recv: conn ccd49940
<3>[  536.627960] l2cap_sig_channel: code 0x04 len 4 id 0x04
<3>[  536.633453] l2cap_config_req: dcid 0x0040 flags 0x00
<3>[  536.638763] l2cap_parse_conf_req: sk c77dc200
<3>[  536.643432] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  536.649658] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  536.654663] ll_device_want_to_sleep: hu c9590d80
<3>[  536.659576] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  536.664550] hci_uart_tx_wakeup: 
<3>[  536.668090] l2cap_add_conf_opt: type 0x01 len 2 val 0x2a0
<3>[  536.673828] l2cap_build_cmd: conn ccd49940, code 0x05, ident 0x04, len 10
<3>[  536.681091] l2cap_send_cmd: code 0x05
<3>[  536.685028] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  536.690490] hci_send_acl: hci0 nonfrag skb cec599d0 len 22
<3>[  536.696350] l2cap_build_conf_req: sk c77dc200
<3>[  536.701019] l2cap_build_cmd: conn ccd49940, code 0x04, ident 0x02, len 4
<3>[  536.708221] l2cap_send_cmd: code 0x04
<3>[  536.712127] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  536.717620] hci_send_acl: hci0 nonfrag skb cec595e8 len 16
<3>[  536.723510] hci_tx_task: hci0 acl 4 sco 4
<3>[  536.727783] hci_sched_acl: hci0
<3>[  536.731170] hci_low_sent: conn c900c000 quote 4
<3>[  536.735961] hci_sched_acl: skb cec599d0 len 22
<3>[  536.740722] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  536.746765] hci_send_frame: hci0 type 2 len 22
<3>[  536.751464] hci_send_to_sock: hdev c453c000 len 22
<3>[  536.756591] hci_uart_send_frame: hci0: type 2 len 22
<3>[  536.761932] ll_enqueue: hu c9590d80 skb cec599d0
<3>[  536.766815] ll_enqueue: device asleep, waking up and queueing packet
<3>[  536.773529] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  536.778533] hci_uart_tx_wakeup: 
<3>[  536.781982] hci_sched_acl: skb cec595e8 len 16
<3>[  536.786773] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  536.792999] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  536.797637] ll_device_woke_up: hu c9590d80
<3>[  536.802032] hci_uart_tx_wakeup: 
<3>[  536.805511] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  536.811553] hci_send_frame: hci0 type 2 len 16
<3>[  536.816345] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  536.822509] ll_recv: Event packet
<3>[  536.826141] ll_recv: Event header: evt 0x13 plen 5
<3>[  536.831298] ll_check_data_len: len 5 room 1078
<3>[  536.836029] ll_recv: Complete data
<3>[  536.839721] hci_send_to_sock: hdev c453c000 len 16
<3>[  536.844787] hci_uart_send_frame: hci0: type 2 len 16
<3>[  536.850128] ll_enqueue: hu c9590d80 skb cec595e8
<3>[  536.855072] ll_enqueue: device awake, sending normally
<3>[  536.860504] hci_uart_tx_wakeup: 
<3>[  536.864044] hci_low_sent: conn (null) quote 0
<3>[  536.868652] hci_sched_sco: hci0
<3>[  536.872070] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  536.878234] ll_recv: Event packet
<3>[  536.881896] ll_recv: Event header: evt 0x13 plen 5
<3>[  536.887023] ll_check_data_len: len 5 room 1078
<3>[  536.891723] ll_recv: Complete data
<3>[  536.895416] hci_low_sent: conn (null) quote 0
<3>[  536.900115] ll_recv: hu c9590d80 count 45 rx_state 0 rx_count 0
<3>[  536.906433] ll_recv: ACL packet
<3>[  536.909881] ll_recv: ACL header: dlen 18
<3>[  536.914031] ll_check_data_len: len 18 room 1076
<3>[  536.918884] ll_recv: Complete data
<3>[  536.922485] ll_recv: ACL packet
<3>[  536.926025] ll_recv: ACL header: dlen 17
<3>[  536.930175] ll_check_data_len: len 17 room 1076
<3>[  536.935028] ll_recv: Complete data
<3>[  536.938690] hci_sched_esco: hci0
<3>[  536.942169] hci_low_sent: conn (null) quote 0
<3>[  536.946777] hci_uart_tty_wakeup: 
<3>[  536.950347] hci_uart_tx_wakeup: 
<3>[  536.953796] hci_rx_task: hci0
<3>[  536.957000] hci_send_to_sock: hdev c453c000 len 7
<3>[  536.961975] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  536.967132] hci_send_to_sock: hdev c453c000 len 7
<3>[  536.972167] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  536.977264] hci_send_to_sock: hdev c453c000 len 22
<3>[  536.982391] hci_rx_task: hci0 ACL data packet
<3>[  536.987030] hci_acldata_packet: hci0 len 18 handle 0x1 flags 0x2
<3>[  536.993438] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  536.999511] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  537.005737] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  537.010711] ll_device_want_to_sleep: hu c9590d80
<3>[  537.015686] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  537.020629] hci_uart_tx_wakeup: 
<3>[  537.024139] l2cap_recv_acldata: conn ccd49940 len 18 flags 0x2
<3>[  537.030364] l2cap_recv_frame: len 14, cid 0x0001
<3>[  537.035308] l2cap_raw_recv: conn ccd49940
<3>[  537.039581] l2cap_sig_channel: code 0x05 len 10 id 0x02
<3>[  537.045166] l2cap_config_rsp: scid 0x0040 flags 0x00 result 0x00
<3>[  537.051574] l2cap_chan_ready: sk c77dc200, parent c4257200
<3>[  537.057403] l2cap_sock_clear_timer: sock c77dc200 state 1
<3>[  537.063171] hci_send_to_sock: hdev c453c000 len 21
<3>[  537.068328] hci_rx_task: hci0 ACL data packet
<3>[  537.072937] hci_acldata_packet: hci0 len 17 handle 0x1 flags 0x2
<3>[  537.079345] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  537.085418] l2cap_recv_acldata: conn ccd49940 len 17 flags 0x2
<3>[  537.091644] l2cap_recv_frame: len 13, cid 0x0040
<3>[  537.096527] l2cap_data_channel: sk c77dc200, len 13
<3>[  537.102355] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  537.108093] hci_tx_task: hci0 acl 4 sco 4
<3>[  537.112335] hci_sched_acl: hci0
<3>[  537.115722] hci_low_sent: conn (null) quote 0
<3>[  537.120361] hci_sched_sco: hci0
<3>[  537.123748] hci_low_sent: conn (null) quote 0
<3>[  537.128356] hci_sched_esco: hci0
<3>[  537.131835] hci_low_sent: conn (null) quote 0
<3>[  537.136535] hci_uart_tty_wakeup: 
<3>[  537.140045] hci_uart_tx_wakeup: 
<3>[  537.208587] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  537.213806] hci_dev_get: 0
<3>[  537.217620] hci_sock_create: sock ce8a9050
<3>[  537.235565] hci_sock_ioctl: cmd 800448d2 arg d4a8
<3>[  537.240753] hci_sock_ioctl: cmd 800448d3 arg be90c940
<3>[  537.246093] hci_dev_get: 0
<3>[  537.248931] hci_sock_release: sock ce8a9050 sk c4257a00
<3>[  537.258850] hci_sock_create: sock ce8a9050
<3>[  537.269653] hci_sock_ioctl: cmd 800448d2 arg d4a8
<3>[  537.274627] hci_sock_ioctl: cmd 800448d3 arg be90c8b0
<3>[  537.279968] hci_dev_get: 0
<3>[  537.282836] hci_sock_release: sock ce8a9050 sk c4257a00
<3>[  537.288360] hci_sock_create: sock ce8a9050
<3>[  537.292724] hci_sock_bind: sock ce8a9050 sk c4257a00
<3>[  537.297912] hci_dev_get: 0
<3>[  537.300781] hci_sock_ioctl: cmd 800448d7 arg be90c978
<3>[  537.306121] hci_sock_release: sock ce8a9050 sk c4257a00
<3>[  537.378845] l2cap_sock_accept: sk c4257200 timeo 2147483647
<3>[  537.384704] l2cap_sock_accept: new socket c77dc200
<3>[  537.455841] l2cap_sock_getname: sock ce8a9050, sk c77dc200
<3>[  537.473144] l2cap_sock_getname: sock ce8a9050, sk c77dc200
<3>[  537.478912] l2cap_sock_getsockopt: sk c77dc200
<3>[  537.495147] l2cap_sock_getsockopt_old: sk c77dc200
<3>[  537.518615] l2cap_sock_getname: sock ce8a9050, sk c77dc200
<3>[  537.525085] l2cap_sock_sendmsg: sock ce8a9050, sk c77dc200
<3>[  537.533264] l2cap_do_send: sk c77dc200 len 10
<3>[  537.540679] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  537.546112] hci_send_acl: hci0 nonfrag skb cec59200 len 18
<3>[  537.551940] hci_tx_task: hci0 acl 4 sco 4
<3>[  537.556152] hci_sched_acl: hci0
<3>[  537.559478] hci_low_sent: conn c900c000 quote 4
<3>[  537.564239] hci_sched_acl: skb cec59200 len 18
<3>[  537.568908] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  537.574859] hci_send_frame: hci0 type 2 len 18
<3>[  537.579528] hci_send_to_sock: hdev c453c000 len 18
<3>[  537.584564] hci_uart_send_frame: hci0: type 2 len 18
<3>[  537.589813] ll_enqueue: hu c9590d80 skb cec59200
<3>[  537.594665] ll_enqueue: device asleep, waking up and queueing packet
<3>[  537.601318] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  537.606201] hci_uart_tx_wakeup: 
<3>[  537.609619] hci_low_sent: conn (null) quote 0
<3>[  537.614227] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  537.620330] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  537.624938] ll_device_woke_up: hu c9590d80
<3>[  537.629272] hci_uart_tx_wakeup: 
<3>[  537.632659] hci_sched_sco: hci0
<3>[  537.635986] hci_low_sent: conn (null) quote 0
<3>[  537.640563] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  537.646728] ll_recv: Event packet
<3>[  537.650238] ll_recv: Event header: evt 0x13 plen 5
<3>[  537.655273] ll_check_data_len: len 5 room 1078
<3>[  537.659973] ll_recv: Complete data
<3>[  537.663543] hci_sched_esco: hci0
<3>[  537.666931] hci_low_sent: conn (null) quote 0
<3>[  537.671539] hci_uart_tty_wakeup: 
<3>[  537.674987] hci_uart_tx_wakeup: 
<3>[  537.678405] hci_rx_task: hci0
<3>[  537.681518] hci_send_to_sock: hdev c453c000 len 7
<3>[  537.686462] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  537.691528] hci_tx_task: hci0 acl 4 sco 4
<3>[  537.695739] hci_sched_acl: hci0
<3>[  537.699035] hci_low_sent: conn (null) quote 0
<3>[  537.703613] hci_sched_sco: hci0
<3>[  537.706909] hci_low_sent: conn (null) quote 0
<3>[  537.711486] hci_sched_esco: hci0
<3>[  537.714904] hci_low_sent: conn (null) quote 0
<3>[  537.743804] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  537.749969] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  537.754943] ll_device_want_to_sleep: hu c9590d80
<3>[  537.759765] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  537.764648] hci_uart_tx_wakeup: 
<3>[  537.768096] hci_uart_tty_wakeup: 
<3>[  537.771575] hci_uart_tx_wakeup: 
<3>[  538.794128] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  538.800354] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  538.804992] ll_device_want_to_wakeup: hu c9590d80
<3>[  538.809967] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  538.814910] hci_uart_tx_wakeup: 
<3>[  538.818542] hci_uart_tty_wakeup: 
<3>[  538.822082] ll_recv: hu c9590d80 count 4 rx_state 0 rx_count 0
<3>[  538.828338] ll_recv: Event packet
<3>[  538.832031] ll_recv: Event header: evt 0x01 plen 1
<3>[  538.837097] ll_check_data_len: len 1 room 1078
<3>[  538.841857] ll_recv: Complete data
<3>[  538.845550] hci_uart_tx_wakeup: 
<3>[  538.849029] hci_rx_task: hci0
<3>[  538.852172] hci_send_to_sock: hdev c453c000 len 3
<3>[  538.857269] hci_inquiry_complete_evt: hci0 status 0
<3>[  538.862457] hci_req_complete: hci0 result 0x00
<3>[  538.867340] hci_conn_check_pending: hdev hci0
<3>[  538.872589] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  538.878295] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  538.889373] hci_dev_get: 0
<3>[  538.898193] hci_sock_create: sock ce8a94e8
<3>[  538.913360] hci_sock_ioctl: cmd 800448d3 arg be90ca60
<3>[  538.918914] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  538.925079] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  538.930145] ll_device_want_to_sleep: hu c9590d80
<3>[  538.935089] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  538.940002] hci_uart_tx_wakeup: 
<3>[  538.943634] hci_uart_tty_wakeup: 
<3>[  538.947174] hci_uart_tx_wakeup: 
<3>[  538.963897] hci_dev_get: 0
<3>[  538.966796] hci_sock_release: sock ce8a94e8 sk c900c800
<3>[  538.972564] hci_sock_create: sock ce8a94e8
<3>[  538.977020] hci_sock_bind: sock ce8a94e8 sk c900c800
<3>[  538.982269] hci_dev_get: 0
<3>[  538.989532] hci_sock_sendmsg: sock ce8a94e8 sk c900c800
<3>[  538.997894] hci_cmd_task: hci0 cmd 1
<3>[  539.001678] hci_send_frame: hci0 type 1 len 3
<3>[  539.006256] hci_send_to_sock: hdev c453c000 len 3
<3>[  539.011230] hci_uart_send_frame: hci0: type 1 len 3
<3>[  539.016326] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  539.021209] ll_enqueue: device asleep, waking up and queueing packet
<3>[  539.027832] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  539.032714] hci_uart_tx_wakeup: 
<3>[  539.036163] hci_uart_tty_wakeup: 
<3>[  539.039672] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  539.045776] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  539.050384] ll_device_woke_up: hu c9590d80
<3>[  539.054656] hci_uart_tx_wakeup: 
<3>[  539.058074] hci_uart_tx_wakeup: 
<3>[  539.061492] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  539.067626] ll_recv: Event packet
<3>[  539.071136] ll_recv: Event header: evt 0x0e plen 4
<3>[  539.076171] ll_check_data_len: len 4 room 1078
<3>[  539.080841] ll_recv: Complete data
<3>[  539.084472] hci_rx_task: hci0
<3>[  539.087585] hci_send_to_sock: hdev c453c000 len 6
<3>[  539.092559] hci_cc_exit_periodic_inq: hci0 status 0x0
<3>[  539.097869] hci_conn_check_pending: hdev hci0
<3>[  539.116699] hci_sock_release: sock ce8a94e8 sk c900c800
<3>[  539.150451] hci_sock_recvmsg: sock cea6cc90, sk c4257e00
<3>[  539.158813] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  539.165039] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  539.170013] ll_device_want_to_sleep: hu c9590d80
<3>[  539.174865] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  539.179748] hci_uart_tx_wakeup: 
<3>[  539.183227] hci_uart_tty_wakeup: 
<3>[  539.186706] hci_uart_tx_wakeup: 
<3>[  539.193847] hci_sock_ioctl: cmd 800448d3 arg 10e28
<3>[  539.206481] hci_dev_get: 0
<3>[  539.972717] l2cap_sock_create: sock ce8a94e8
<3>[  539.977355] l2cap_sock_init: sk c900c800
<3>[  539.985809] l2cap_sock_bind: sk c900c800
<3>[  539.990203] l2cap_sock_connect: sk c900c800
<3>[  539.994659] l2cap_do_connect: DB:D8:AA:D4:23:00 -> A0:33:E7:98:80:00 psm 0x01
<3>[  540.002593] hci_get_route: DB:D8:AA:D4:23:00 -> A0:33:E7:98:80:00
<3>[  540.009765] hci_connect: hci0 dst A0:33:E7:98:80:00
<3>[  540.015075] __l2cap_chan_add: conn ccd49940, psm 0x01, dcid 0x0000
<3>[  540.021697] l2cap_sock_set_timer: sk c900c800 state 5 timeout 5120
<3>[  540.028289] hci_conn_security: conn c900c000
<3>[  540.032867] l2cap_build_cmd: conn ccd49940, code 0x02, ident 0x03, len 4
<3>[  540.040039] l2cap_send_cmd: code 0x02
<3>[  540.043975] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  540.049499] hci_send_acl: hci0 nonfrag skb cec59200 len 16
<3>[  540.055389] hci_tx_task: hci0 acl 4 sco 4
<3>[  540.059783] hci_sched_acl: hci0
<3>[  540.063110] hci_low_sent: conn c900c000 quote 4
<3>[  540.067993] hci_sched_acl: skb cec59200 len 16
<3>[  540.072692] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  540.078735] hci_send_frame: hci0 type 2 len 16
<3>[  540.083526] hci_send_to_sock: hdev c453c000 len 16
<3>[  540.088623] hci_uart_send_frame: hci0: type 2 len 16
<3>[  540.093933] ll_enqueue: hu c9590d80 skb cec59200
<3>[  540.098876] ll_enqueue: device asleep, waking up and queueing packet
<3>[  540.105590] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  540.110626] hci_uart_tx_wakeup: 
<3>[  540.114196] hci_low_sent: conn (null) quote 0
<3>[  540.118865] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  540.125122] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  540.129791] ll_device_woke_up: hu c9590d80
<3>[  540.134155] hci_uart_tx_wakeup: 
<3>[  540.137695] hci_sched_sco: hci0
<3>[  540.141052] hci_low_sent: conn (null) quote 0
<3>[  540.145751] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  540.152008] ll_recv: Event packet
<3>[  540.155639] ll_recv: Event header: evt 0x13 plen 5
<3>[  540.160797] ll_check_data_len: len 5 room 1078
<3>[  540.165527] ll_recv: Complete data
<3>[  540.169219] hci_sched_esco: hci0
<3>[  540.172637] hci_low_sent: conn (null) quote 0
<3>[  540.177368] ll_recv: hu c9590d80 count 21 rx_state 0 rx_count 0
<3>[  540.183715] ll_recv: ACL packet
<3>[  540.187133] ll_recv: ACL header: dlen 16
<3>[  540.191375] ll_check_data_len: len 16 room 1076
<3>[  540.196166] ll_recv: Complete data
<3>[  540.199890] hci_uart_tty_wakeup: 
<3>[  540.203430] hci_uart_tx_wakeup: 
<3>[  540.206909] hci_rx_task: hci0
<3>[  540.210052] hci_send_to_sock: hdev c453c000 len 7
<3>[  540.215087] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  540.220214] hci_send_to_sock: hdev c453c000 len 20
<3>[  540.225341] hci_rx_task: hci0 ACL data packet
<3>[  540.230041] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  540.236419] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  540.242462] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  540.248779] ll_recv: hu c9590d80 count 38 rx_state 0 rx_count 0
<3>[  540.255096] ll_recv: ACL packet
<3>[  540.258514] ll_recv: ACL header: dlen 16
<3>[  540.262725] ll_check_data_len: len 16 room 1076
<3>[  540.267517] ll_recv: Complete data
<3>[  540.271209] ll_recv: ACL packet
<3>[  540.274627] ll_recv: ACL header: dlen 12
<3>[  540.278839] ll_check_data_len: len 12 room 1076
<3>[  540.283630] ll_recv: Complete data
<3>[  540.287322] l2cap_recv_frame: len 12, cid 0x0001
<3>[  540.292236] l2cap_raw_recv: conn ccd49940
<3>[  540.296539] l2cap_sig_channel: code 0x03 len 8 id 0x03
<3>[  540.302032] l2cap_connect_rsp: dcid 0x0041 scid 0x0041 result 0x01 status 0x00
<3>[  540.309753] hci_send_to_sock: hdev c453c000 len 20
<3>[  540.314819] hci_rx_task: hci0 ACL data packet
<3>[  540.319519] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  540.325927] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  540.331970] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  540.338195] l2cap_recv_frame: len 12, cid 0x0001
<3>[  540.343139] l2cap_raw_recv: conn ccd49940
<3>[  540.347442] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  540.353637] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  540.358673] ll_device_want_to_sleep: hu c9590d80
<3>[  540.363616] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  540.368530] hci_uart_tx_wakeup: 
<3>[  540.372100] l2cap_sig_channel: code 0x03 len 8 id 0x03
<3>[  540.377532] l2cap_connect_rsp: dcid 0x0041 scid 0x0041 result 0x00 status 0x00
<3>[  540.385253] l2cap_build_conf_req: sk c900c800
<3>[  540.389953] l2cap_build_cmd: conn ccd49940, code 0x04, ident 0x04, len 4
<3>[  540.397125] l2cap_send_cmd: code 0x04
<3>[  540.401000] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  540.406524] hci_send_acl: hci0 nonfrag skb ce3de668 len 16
<3>[  540.412414] hci_send_to_sock: hdev c453c000 len 16
<3>[  540.417541] hci_rx_task: hci0 ACL data packet
<3>[  540.422180] hci_acldata_packet: hci0 len 12 handle 0x1 flags 0x2
<3>[  540.428588] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  540.434631] l2cap_recv_acldata: conn ccd49940 len 12 flags 0x2
<3>[  540.440826] l2cap_recv_frame: len 8, cid 0x0001
<3>[  540.445678] l2cap_raw_recv: conn ccd49940
<3>[  540.450012] l2cap_sig_channel: code 0x04 len 4 id 0x05
<3>[  540.455474] l2cap_config_req: dcid 0x0041 flags 0x00
<3>[  540.460784] l2cap_parse_conf_req: sk c900c800
<3>[  540.465454] l2cap_add_conf_opt: type 0x01 len 2 val 0x2a0
<3>[  540.471160] l2cap_build_cmd: conn ccd49940, code 0x05, ident 0x05, len 10
<3>[  540.478454] l2cap_send_cmd: code 0x05
<3>[  540.482391] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  540.487884] hci_send_acl: hci0 nonfrag skb cec59200 len 22
<3>[  540.493774] hci_tx_task: hci0 acl 4 sco 4
<3>[  540.498077] hci_sched_acl: hci0
<3>[  540.501434] hci_low_sent: conn c900c000 quote 4
<3>[  540.506286] hci_sched_acl: skb ce3de668 len 16
<3>[  540.510986] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  540.517028] hci_send_frame: hci0 type 2 len 16
<3>[  540.521820] hci_send_to_sock: hdev c453c000 len 16
<3>[  540.526947] hci_uart_send_frame: hci0: type 2 len 16
<3>[  540.532196] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  540.537139] ll_enqueue: device asleep, waking up and queueing packet
<3>[  540.543884] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  540.548858] hci_uart_tx_wakeup: 
<3>[  540.552398] hci_sched_acl: skb cec59200 len 22
<3>[  540.557128] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  540.563385] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  540.568054] ll_device_woke_up: hu c9590d80
<3>[  540.572387] hci_uart_tx_wakeup: 
<3>[  540.575927] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  540.582000] hci_send_frame: hci0 type 2 len 22
<3>[  540.586730] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  540.592987] ll_recv: Event packet
<3>[  540.596557] ll_recv: Event header: evt 0x13 plen 5
<3>[  540.601684] ll_check_data_len: len 5 room 1078
<3>[  540.606445] ll_recv: Complete data
<3>[  540.610107] hci_send_to_sock: hdev c453c000 len 22
<3>[  540.615295] ll_recv: hu c9590d80 count 23 rx_state 0 rx_count 0
<3>[  540.621612] ll_recv: ACL packet
<3>[  540.625061] ll_recv: ACL header: dlen 18
<3>[  540.629272] ll_check_data_len: len 18 room 1076
<3>[  540.634063] ll_recv: Complete data
<3>[  540.637725] hci_uart_send_frame: hci0: type 2 len 22
<3>[  540.643005] ll_enqueue: hu c9590d80 skb cec59200
<3>[  540.647979] ll_enqueue: device awake, sending normally
<3>[  540.653472] hci_uart_tx_wakeup: 
<3>[  540.656921] hci_low_sent: conn (null) quote 0
<3>[  540.661621] hci_sched_sco: hci0
<3>[  540.665008] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  540.671234] ll_recv: Event packet
<3>[  540.674804] ll_recv: Event header: evt 0x13 plen 5
<3>[  540.679962] ll_check_data_len: len 5 room 1078
<3>[  540.684722] ll_recv: Complete data
<3>[  540.688354] hci_low_sent: conn (null) quote 0
<3>[  540.693054] hci_sched_esco: hci0
<3>[  540.696472] hci_low_sent: conn (null) quote 0
<3>[  540.701141] hci_rx_task: hci0
<3>[  540.704284] hci_send_to_sock: hdev c453c000 len 7
<3>[  540.709350] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  540.714477] hci_send_to_sock: hdev c453c000 len 22
<3>[  540.719543] hci_rx_task: hci0 ACL data packet
<3>[  540.724243] hci_acldata_packet: hci0 len 18 handle 0x1 flags 0x2
<3>[  540.730651] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  540.736663] l2cap_recv_acldata: conn ccd49940 len 18 flags 0x2
<3>[  540.742889] l2cap_recv_frame: len 14, cid 0x0001
<3>[  540.747833] l2cap_raw_recv: conn ccd49940
<3>[  540.752075] l2cap_sig_channel: code 0x05 len 10 id 0x04
<3>[  540.757659] l2cap_config_rsp: scid 0x0041 flags 0x00 result 0x00
<3>[  540.764099] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  540.770324] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  540.775299] ll_device_want_to_sleep: hu c9590d80
<3>[  540.780242] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  540.785217] hci_uart_tx_wakeup: 
<3>[  540.788726] l2cap_chan_ready: sk c900c800, parent (null)
<3>[  540.794433] l2cap_sock_clear_timer: sock c900c800 state 1
<3>[  540.800170] hci_send_to_sock: hdev c453c000 len 7
<3>[  540.805206] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  540.810363] hci_uart_tty_wakeup: 
<3>[  540.813873] hci_uart_tx_wakeup: 
<3>[  540.817382] hci_tx_task: hci0 acl 4 sco 4
<3>[  540.821624] hci_sched_acl: hci0
<3>[  540.825012] hci_low_sent: conn (null) quote 0
<3>[  540.829650] hci_sched_sco: hci0
<3>[  540.833038] hci_low_sent: conn (null) quote 0
<3>[  540.837646] hci_sched_esco: hci0
<3>[  540.841125] hci_low_sent: conn (null) quote 0
<3>[  540.862945] l2cap_sock_sendmsg: sock ce8a94e8, sk c900c800
<3>[  540.878448] l2cap_do_send: sk c900c800 len 20
<3>[  540.883026] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  540.888427] hci_send_acl: hci0 nonfrag skb cec59200 len 28
<3>[  540.894226] hci_tx_task: hci0 acl 4 sco 4
<3>[  540.898406] hci_sched_acl: hci0
<3>[  540.901702] hci_low_sent: conn c900c000 quote 4
<3>[  540.906463] hci_sched_acl: skb cec59200 len 28
<3>[  540.911102] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  540.917022] hci_send_frame: hci0 type 2 len 28
<3>[  540.921691] hci_send_to_sock: hdev c453c000 len 28
<3>[  540.926727] hci_uart_send_frame: hci0: type 2 len 28
<3>[  540.931915] ll_enqueue: hu c9590d80 skb cec59200
<3>[  540.936737] ll_enqueue: device asleep, waking up and queueing packet
<3>[  540.943389] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  540.948242] hci_uart_tx_wakeup: 
<3>[  540.951690] hci_low_sent: conn (null) quote 0
<3>[  540.956237] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  540.962371] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  540.966949] ll_device_woke_up: hu c9590d80
<3>[  540.971221] hci_uart_tx_wakeup: 
<3>[  540.974609] hci_sched_sco: hci0
<3>[  540.977905] hci_low_sent: conn (null) quote 0
<3>[  540.982482] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  540.988586] ll_recv: Event packet
<3>[  540.992095] ll_recv: Event header: evt 0x13 plen 5
<3>[  540.997131] ll_check_data_len: len 5 room 1078
<3>[  541.001739] ll_recv: Complete data
<3>[  541.005340] hci_sched_esco: hci0
<3>[  541.008728] hci_low_sent: conn (null) quote 0
<3>[  541.013336] ll_recv: hu c9590d80 count 10 rx_state 0 rx_count 0
<3>[  541.019531] ll_recv: ACL packet
<3>[  541.022857] ll_recv: ACL header: dlen 188
<3>[  541.027069] ll_check_data_len: len 188 room 1076
<3>[  541.031890] ll_recv: hu c9590d80 count 51 rx_state 4 rx_count 183
<3>[  541.038330] ll_recv: hu c9590d80 count 61 rx_state 4 rx_count 132
<3>[  541.044769] ll_recv: hu c9590d80 count 61 rx_state 4 rx_count 71
<3>[  541.051055] ll_recv: hu c9590d80 count 10 rx_state 4 rx_count 10
<3>[  541.057342] ll_recv: Complete data
<3>[  541.060943] hci_uart_tty_wakeup: 
<3>[  541.064392] hci_uart_tx_wakeup: 
<3>[  541.067810] hci_rx_task: hci0
<3>[  541.070892] hci_send_to_sock: hdev c453c000 len 7
<3>[  541.075836] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  541.080841] hci_send_to_sock: hdev c453c000 len 192
<3>[  541.085968] hci_rx_task: hci0 ACL data packet
<3>[  541.090545] hci_acldata_packet: hci0 len 188 handle 0x1 flags 0x2
<3>[  541.096893] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  541.102813] l2cap_recv_acldata: conn ccd49940 len 188 flags 0x2
<3>[  541.109008] l2cap_recv_frame: len 184, cid 0x0041
<3>[  541.113922] l2cap_data_channel: sk c900c800, len 184
<3>[  541.119140] hci_tx_task: hci0 acl 4 sco 4
<3>[  541.123352] hci_sched_acl: hci0
<3>[  541.126617] hci_low_sent: conn (null) quote 0
<3>[  541.131195] hci_sched_sco: hci0
<3>[  541.134490] hci_low_sent: conn (null) quote 0
<3>[  541.139038] hci_sched_esco: hci0
<3>[  541.142425] hci_low_sent: conn (null) quote 0
<3>[  541.146972] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  541.153106] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  541.158020] ll_device_want_to_sleep: hu c9590d80
<3>[  541.162841] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  541.167694] hci_uart_tx_wakeup: 
<3>[  541.171081] hci_uart_tty_wakeup: 
<3>[  541.174530] hci_uart_tx_wakeup: 
<3>[  541.187316] l2cap_sock_sendmsg: sock ce8a94e8, sk c900c800
<3>[  541.193115] l2cap_do_send: sk c900c800 len 20
<3>[  541.198303] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  541.203735] hci_send_acl: hci0 nonfrag skb cec59840 len 28
<3>[  541.209503] hci_tx_task: hci0 acl 4 sco 4
<3>[  541.213684] hci_sched_acl: hci0
<3>[  541.217010] hci_low_sent: conn c900c000 quote 4
<3>[  541.221740] hci_sched_acl: skb cec59840 len 28
<3>[  541.226409] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  541.232299] hci_send_frame: hci0 type 2 len 28
<3>[  541.236968] hci_send_to_sock: hdev c453c000 len 28
<3>[  541.241973] hci_uart_send_frame: hci0: type 2 len 28
<3>[  541.247192] ll_enqueue: hu c9590d80 skb cec59840
<3>[  541.252014] ll_enqueue: device asleep, waking up and queueing packet
<3>[  541.258636] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  541.263519] hci_uart_tx_wakeup: 
<3>[  541.266906] hci_low_sent: conn (null) quote 0
<3>[  541.271514] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  541.277648] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  541.282226] ll_device_woke_up: hu c9590d80
<3>[  541.286529] hci_uart_tx_wakeup: 
<3>[  541.289916] hci_sched_sco: hci0
<3>[  541.293212] hci_low_sent: conn (null) quote 0
<3>[  541.297790] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  541.303894] ll_recv: Event packet
<3>[  541.307373] ll_recv: Event header: evt 0x13 plen 5
<3>[  541.312408] ll_check_data_len: len 5 room 1078
<3>[  541.317047] ll_recv: Complete data
<3>[  541.320617] hci_sched_esco: hci0
<3>[  541.324035] ll_recv: hu c9590d80 count 19 rx_state 0 rx_count 0
<3>[  541.330200] ll_recv: ACL packet
<3>[  541.333526] ll_recv: ACL header: dlen 14
<3>[  541.337646] ll_check_data_len: len 14 room 1076
<3>[  541.342376] ll_recv: Complete data
<3>[  541.345947] hci_low_sent: conn (null) quote 0
<3>[  541.350524] hci_uart_tty_wakeup: 
<3>[  541.354003] hci_uart_tx_wakeup: 
<3>[  541.357391] hci_rx_task: hci0
<3>[  541.360473] hci_send_to_sock: hdev c453c000 len 7
<3>[  541.365417] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  541.370422] hci_send_to_sock: hdev c453c000 len 18
<3>[  541.375457] hci_rx_task: hci0 ACL data packet
<3>[  541.380004] hci_acldata_packet: hci0 len 14 handle 0x1 flags 0x2
<3>[  541.386291] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  541.392211] l2cap_recv_acldata: conn ccd49940 len 14 flags 0x2
<3>[  541.398315] l2cap_recv_frame: len 10, cid 0x0041
<3>[  541.403167] l2cap_data_channel: sk c900c800, len 10
<3>[  541.408294] hci_tx_task: hci0 acl 4 sco 4
<3>[  541.412475] hci_sched_acl: hci0
<3>[  541.415771] hci_low_sent: conn (null) quote 0
<3>[  541.420318] hci_sched_sco: hci0
<3>[  541.423614] hci_low_sent: conn (null) quote 0
<3>[  541.428192] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  541.434295] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  541.439208] ll_device_want_to_sleep: hu c9590d80
<3>[  541.444061] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  541.448944] hci_uart_tx_wakeup: 
<3>[  541.452331] hci_sched_esco: hci0
<3>[  541.455718] hci_low_sent: conn (null) quote 0
<3>[  541.460296] hci_uart_tty_wakeup: 
<3>[  541.463745] hci_uart_tx_wakeup: 
<3>[  541.522674] l2cap_sock_create: sock ce89a7f8
<3>[  541.527252] l2cap_sock_init: sk ccbc0000
<3>[  541.543304] l2cap_sock_bind: sk ccbc0000
<3>[  541.547576] l2cap_sock_connect: sk ccbc0000











<3>[  541.587463] l2cap_do_connect: DB:D8:AA:D4:23:00 -> A0:33:E7:98:80:00 psm 0x19
<3>[  541.604095] hci_get_route: DB:D8:AA:D4:23:00 -> A0:33:E7:98:80:00
<3>[  541.610687] hci_connect: hci0 dst A0:33:E7:98:80:00
<3>[  541.615814] __l2cap_chan_add: conn ccd49940, psm 0x19, dcid 0x0000
<3>[  541.622314] l2cap_sock_set_timer: sk ccbc0000 state 5 timeout 5120
<3>[  541.628814] hci_conn_security: conn c900c000
<3>[  541.633270] l2cap_build_cmd: conn ccd49940, code 0x02, ident 0x05, len 4
<3>[  541.640319] l2cap_send_cmd: code 0x02
<3>[  541.644165] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  541.649536] hci_send_acl: hci0 nonfrag skb cec59200 len 16
<3>[  541.655303] hci_tx_task: hci0 acl 4 sco 4
<3>[  541.659484] hci_sched_acl: hci0
<3>[  541.662780] hci_low_sent: conn c900c000 quote 4
<3>[  541.667541] hci_sched_acl: skb cec59200 len 16
<3>[  541.672180] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  541.678131] hci_send_frame: hci0 type 2 len 16
<3>[  541.682800] hci_send_to_sock: hdev c453c000 len 16
<3>[  541.687805] hci_uart_send_frame: hci0: type 2 len 16
<3>[  541.693023] ll_enqueue: hu c9590d80 skb cec59200
<3>[  541.697845] ll_enqueue: device asleep, waking up and queueing packet
<3>[  541.704467] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  541.709320] hci_uart_tx_wakeup: 
<3>[  541.712738] hci_low_sent: conn (null) quote 0
<3>[  541.717315] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  541.723419] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  541.727996] ll_device_woke_up: hu c9590d80
<3>[  541.732269] hci_uart_tx_wakeup: 
<3>[  541.735687] hci_sched_sco: hci0
<3>[  541.738983] hci_low_sent: conn (null) quote 0
<3>[  541.743560] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  541.749664] ll_recv: Event packet
<3>[  541.753143] ll_recv: Event header: evt 0x13 plen 5
<3>[  541.758178] ll_check_data_len: len 5 room 1078
<3>[  541.762847] ll_recv: Complete data
<3>[  541.766387] hci_sched_esco: hci0
<3>[  541.769775] hci_low_sent: conn (null) quote 0
<3>[  541.774353] hci_uart_tty_wakeup: 
<3>[  541.777832] hci_uart_tx_wakeup: 
<3>[  541.781188] hci_rx_task: hci0
<3>[  541.784301] hci_send_to_sock: hdev c453c000 len 7
<3>[  541.789215] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  541.794250] hci_tx_task: hci0 acl 4 sco 4
<3>[  541.798431] hci_sched_acl: hci0
<3>[  541.801727] hci_low_sent: conn (null) quote 0
<3>[  541.806274] hci_sched_sco: hci0
<3>[  541.809570] hci_low_sent: conn (null) quote 0
<3>[  541.814117] hci_sched_esco: hci0
<3>[  541.817535] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  541.823608] ll_recv: Event packet
<3>[  541.827117] ll_recv: Event header: evt 0x08 plen 4
<3>[  541.832153] ll_check_data_len: len 4 room 1078
<3>[  541.836791] ll_recv: Complete data
<3>[  541.840423] ll_recv: hu c9590d80 count 27 rx_state 0 rx_count 0
<3>[  541.846588] ll_recv: ACL packet
<3>[  541.849945] ll_recv: ACL header: dlen 16
<3>[  541.854034] ll_check_data_len: len 16 room 1076
<3>[  541.858764] ll_recv: Complete data
<3>[  541.862335] ll_recv: ACL packet
<3>[  541.865661] ll_recv: ACL header: dlen 16
<3>[  541.869750] ll_check_data_len: len 16 room 1076
<3>[  541.874481] ll_recv: hu c9590d80 count 32 rx_state 4 rx_count 15
<3>[  541.880798] ll_recv: Complete data
<3>[  541.884338] ll_recv: ACL packet
<3>[  541.887664] ll_recv: ACL header: dlen 12
<3>[  541.891754] ll_check_data_len: len 12 room 1076
<3>[  541.896514] ll_recv: Complete data
<3>[  541.900054] hci_low_sent: conn (null) quote 0
<3>[  541.904632] hci_rx_task: hci0
<3>[  541.907714] hci_send_to_sock: hdev c453c000 len 6
<3>[  541.912658] hci_encrypt_change_evt: hci0 status 0
<3>[  541.917602] l2cap_security_cfm: conn ccd49940
<3>[  541.922149] l2cap_build_cmd: conn ccd49940, code 0x02, ident 0x06, len 4
<3>[  541.929168] l2cap_send_cmd: code 0x02
<3>[  541.933013] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  541.939117] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  541.944030] ll_device_want_to_sleep: hu c9590d80
<3>[  541.948883] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  541.953704] hci_uart_tx_wakeup: 
<3>[  541.957122] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  541.962493] hci_send_acl: hci0 nonfrag skb cec599d0 len 16
<3>[  541.968231] rfcomm_security_cfm: conn c900c000 status 0x00 encrypt 0x01
<3>[  541.975189] hci_send_to_sock: hdev c453c000 len 20
<3>[  541.980224] hci_rx_task: hci0 ACL data packet
<3>[  541.984771] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  541.991058] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  541.996978] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  542.003082] l2cap_recv_frame: len 12, cid 0x0001
<3>[  542.007934] l2cap_raw_recv: conn ccd49940
<3>[  542.012176] l2cap_sig_channel: code 0x03 len 8 id 0x05
<3>[  542.017547] l2cap_connect_rsp: dcid 0x0042 scid 0x0042 result 0x01 status 0x00
<3>[  542.025115] hci_send_to_sock: hdev c453c000 len 20
<3>[  542.030120] hci_rx_task: hci0 ACL data packet
<3>[  542.034698] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  542.040985] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.046905] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  542.053009] l2cap_recv_frame: len 12, cid 0x0001
<3>[  542.057830] l2cap_raw_recv: conn ccd49940
<3>[  542.062042] l2cap_sig_channel: code 0x03 len 8 id 0x05
<3>[  542.067413] l2cap_connect_rsp: dcid 0x0042 scid 0x0042 result 0x00 status 0x00
<3>[  542.074981] l2cap_build_conf_req: sk ccbc0000
<3>[  542.079528] l2cap_build_cmd: conn ccd49940, code 0x04, ident 0x07, len 4
<3>[  542.086578] l2cap_send_cmd: code 0x04
<3>[  542.090423] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  542.095764] hci_send_acl: hci0 nonfrag skb cec59840 len 16
<3>[  542.101531] hci_send_to_sock: hdev c453c000 len 16
<3>[  542.106536] hci_rx_task: hci0 ACL data packet
<3>[  542.111083] hci_acldata_packet: hci0 len 12 handle 0x1 flags 0x2
<3>[  542.117401] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.123321] l2cap_recv_acldata: conn ccd49940 len 12 flags 0x2
<3>[  542.129425] l2cap_recv_frame: len 8, cid 0x0001
<3>[  542.134155] l2cap_raw_recv: conn ccd49940
<3>[  542.138336] l2cap_sig_channel: code 0x04 len 4 id 0x06
<3>[  542.143707] l2cap_config_req: dcid 0x0042 flags 0x00
<3>[  542.148925] l2cap_parse_conf_req: sk ccbc0000
<3>[  542.153503] l2cap_add_conf_opt: type 0x01 len 2 val 0x2a0
<3>[  542.159118] l2cap_build_cmd: conn ccd49940, code 0x05, ident 0x06, len 10
<3>[  542.166259] l2cap_send_cmd: code 0x05
<3>[  542.170104] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  542.175476] hci_send_acl: hci0 nonfrag skb ce3de668 len 22
<3>[  542.181213] hci_uart_tty_wakeup: 
<3>[  542.184692] hci_uart_tx_wakeup: 
<3>[  542.188079] hci_tx_task: hci0 acl 4 sco 4
<3>[  542.192260] hci_sched_acl: hci0
<3>[  542.195556] hci_low_sent: conn c900c000 quote 4
<3>[  542.200317] hci_sched_acl: skb cec599d0 len 16
<3>[  542.204956] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.210876] hci_send_frame: hci0 type 2 len 16
<3>[  542.215545] hci_send_to_sock: hdev c453c000 len 16
<3>[  542.220550] hci_uart_send_frame: hci0: type 2 len 16
<3>[  542.225738] ll_enqueue: hu c9590d80 skb cec599d0
<3>[  542.230560] ll_enqueue: device asleep, waking up and queueing packet
<3>[  542.237213] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  542.242065] hci_uart_tx_wakeup: 
<3>[  542.245452] hci_sched_acl: skb cec59840 len 16
<3>[  542.250122] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  542.256225] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  542.260772] ll_device_woke_up: hu c9590d80
<3>[  542.265075] hci_uart_tx_wakeup: 
<3>[  542.268463] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.274414] hci_send_frame: hci0 type 2 len 16
<3>[  542.279083] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  542.285186] ll_recv: Event packet
<3>[  542.288696] ll_recv: Event header: evt 0x13 plen 5
<3>[  542.293701] ll_check_data_len: len 5 room 1078
<3>[  542.298339] ll_recv: Complete data
<3>[  542.301910] hci_send_to_sock: hdev c453c000 len 16
<3>[  542.306976] ll_recv: hu c9590d80 count 42 rx_state 0 rx_count 0
<3>[  542.313171] ll_recv: ACL packet
<3>[  542.316467] ll_recv: ACL header: dlen 16
<3>[  542.320587] ll_check_data_len: len 16 room 1076
<3>[  542.325317] ll_recv: Complete data
<3>[  542.328857] ll_recv: ACL packet
<3>[  542.332183] ll_recv: ACL header: dlen 16
<3>[  542.336303] ll_check_data_len: len 16 room 1076
<3>[  542.341033] ll_recv: Complete data
<3>[  542.344604] hci_uart_send_frame: hci0: type 2 len 16
<3>[  542.349792] ll_enqueue: hu c9590d80 skb cec59840
<3>[  542.354614] ll_enqueue: device awake, sending normally
<3>[  542.360015] hci_uart_tx_wakeup: 
<3>[  542.363433] hci_sched_acl: skb ce3de668 len 22
<3>[  542.368072] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.373992] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  542.380126] ll_recv: Event packet
<3>[  542.383605] ll_recv: Event header: evt 0x13 plen 5
<3>[  542.388610] ll_check_data_len: len 5 room 1078
<3>[  542.393249] ll_recv: Complete data
<3>[  542.396820] hci_send_frame: hci0 type 2 len 22
<3>[  542.401489] ll_recv: hu c9590d80 count 23 rx_state 0 rx_count 0
<3>[  542.407684] ll_recv: ACL packet
<3>[  542.411041] ll_recv: ACL header: dlen 18
<3>[  542.415130] ll_check_data_len: len 18 room 1076
<3>[  542.419860] ll_recv: Complete data
<3>[  542.423431] hci_send_to_sock: hdev c453c000 len 22
<3>[  542.428466] hci_uart_send_frame: hci0: type 2 len 22
<3>[  542.433654] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  542.438476] ll_enqueue: device awake, sending normally
<3>[  542.443847] hci_uart_tx_wakeup: 
<3>[  542.447235] hci_low_sent: conn (null) quote 0
<3>[  542.451812] hci_sched_sco: hci0
<3>[  542.455108] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  542.461212] ll_recv: Event packet
<3>[  542.464721] ll_recv: Event header: evt 0x13 plen 5
<3>[  542.469726] ll_check_data_len: len 5 room 1078
<3>[  542.474365] ll_recv: Complete data
<3>[  542.477935] hci_low_sent: conn (null) quote 0
<3>[  542.482513] hci_sched_esco: hci0
<3>[  542.485870] hci_low_sent: conn (null) quote 0
<3>[  542.490447] hci_uart_tty_wakeup: 
<3>[  542.493896] hci_uart_tx_wakeup: 
<3>[  542.497314] hci_rx_task: hci0
<3>[  542.500396] hci_send_to_sock: hdev c453c000 len 7
<3>[  542.505340] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  542.510345] hci_send_to_sock: hdev c453c000 len 20
<3>[  542.515350] hci_rx_task: hci0 ACL data packet
<3>[  542.519927] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  542.526184] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.532135] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  542.538238] l2cap_recv_frame: len 12, cid 0x0001
<3>[  542.543090] l2cap_raw_recv: conn ccd49940
<3>[  542.547271] l2cap_sig_channel: code 0x03 len 8 id 0x06
<3>[  542.552642] l2cap_connect_rsp: dcid 0x0043 scid 0x0042 result 0x01 status 0x00
<3>[  542.560211] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  542.566314] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  542.571228] ll_device_want_to_sleep: hu c9590d80
<3>[  542.576080] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  542.580902] hci_uart_tx_wakeup: 
<3>[  542.584320] hci_send_to_sock: hdev c453c000 len 20
<3>[  542.589355] hci_rx_task: hci0 ACL data packet
<3>[  542.593902] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  542.600189] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.606109] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  542.612213] l2cap_recv_frame: len 12, cid 0x0001
<3>[  542.617065] l2cap_raw_recv: conn ccd49940
<3>[  542.621246] l2cap_sig_channel: code 0x03 len 8 id 0x06
<3>[  542.626617] l2cap_connect_rsp: dcid 0x0043 scid 0x0042 result 0x04 status 0x00
<3>[  542.634185] l2cap_sock_clear_timer: sock ccbc0000 state 7
<3>[  542.639831] l2cap_chan_del: sk ccbc0000, conn ccd49940, err 111
<3>[  542.646057] hci_send_to_sock: hdev c453c000 len 7
<3>[  542.650970] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  542.656005] hci_send_to_sock: hdev c453c000 len 22
<3>[  542.661010] hci_rx_task: hci0 ACL data packet
<3>[  542.665557] hci_acldata_packet: hci0 len 18 handle 0x1 flags 0x2
<3>[  542.671844] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.677764] l2cap_recv_acldata: conn ccd49940 len 18 flags 0x2
<3>[  542.683898] l2cap_recv_frame: len 14, cid 0x0001
<3>[  542.688690] l2cap_raw_recv: conn ccd49940
<3>[  542.692932] l2cap_sig_channel: code 0x05 len 10 id 0x07
<3>[  542.698364] l2cap_config_rsp: scid 0x0042 flags 0x00 result 0x00
<3>[  542.704681] hci_send_to_sock: hdev c453c000 len 7
<3>[  542.709594] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  542.714630] hci_tx_task: hci0 acl 4 sco 4
<3>[  542.718811] hci_sched_acl: hci0
<3>[  542.722076] hci_low_sent: conn (null) quote 0
<3>[  542.726654] hci_sched_sco: hci0
<3>[  542.729949] hci_low_sent: conn (null) quote 0
<3>[  542.734497] hci_sched_esco: hci0
<3>[  542.737884] hci_low_sent: conn (null) quote 0
<3>[  542.742462] hci_uart_tty_wakeup: 
<3>[  542.745941] hci_uart_tx_wakeup: 
<3>[  542.867004] l2cap_sock_release: sock ce89a7f8, sk ccbc0000
<3>[  542.917572] l2cap_sock_shutdown: sock ce89a7f8, sk ccbc0000
<3>[  542.923400] l2cap_sock_clear_timer: sock ccbc0000 state 9
<3>[  542.969635] __l2cap_sock_close: sk ccbc0000 state 9 socket ce89a7f8
<3>[  543.011505] l2cap_sock_kill: sk ccbc0000 state 9
<3>[  543.016418] l2cap_sock_destruct: sk ccbc0000
<3>[  543.963562] l2cap_sock_release: sock ce8a94e8, sk c900c800
<3>[  543.969512] l2cap_sock_shutdown: sock ce8a94e8, sk c900c800
<3>[  543.990966] l2cap_sock_clear_timer: sock c900c800 state 1
<3>[  543.996856] __l2cap_sock_close: sk c900c800 state 1 socket ce8a94e8
<3>[  544.004394] l2cap_sock_set_timer: sk c900c800 state 8 timeout 5120
<3>[  544.010894] l2cap_build_cmd: conn ccd49940, code 0x06, ident 0x08, len 4
<3>[  544.017974] l2cap_send_cmd: code 0x06
<3>[  544.021850] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  544.027282] hci_send_acl: hci0 nonfrag skb ce3de668 len 16
<3>[  544.033050] hci_tx_task: hci0 acl 4 sco 4
<3>[  544.037261] hci_sched_acl: hci0
<3>[  544.040557] hci_low_sent: conn c900c000 quote 4
<3>[  544.045318] hci_sched_acl: skb ce3de668 len 16
<3>[  544.049987] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  544.055969] hci_send_frame: hci0 type 2 len 16
<3>[  544.060638] hci_send_to_sock: hdev c453c000 len 16
<3>[  544.065673] hci_uart_send_frame: hci0: type 2 len 16
<3>[  544.070892] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  544.075744] ll_enqueue: device asleep, waking up and queueing packet
<3>[  544.082427] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  544.087310] hci_uart_tx_wakeup: 
<3>[  544.090759] hci_low_sent: conn (null) quote 0
<3>[  544.095336] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  544.101470] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  544.106079] ll_device_woke_up: hu c9590d80
<3>[  544.110351] hci_uart_tx_wakeup: 
<3>[  544.113800] hci_sched_sco: hci0
<3>[  544.117095] hci_low_sent: conn (null) quote 0
<3>[  544.121704] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  544.127807] ll_recv: Event packet
<3>[  544.131347] ll_recv: Event header: evt 0x13 plen 5
<3>[  544.136383] ll_check_data_len: len 5 room 1078
<3>[  544.141052] ll_recv: Complete data
<3>[  544.144622] hci_sched_esco: hci0
<3>[  544.148040] ll_recv: hu c9590d80 count 17 rx_state 0 rx_count 0
<3>[  544.154266] ll_recv: ACL packet
<3>[  544.157592] ll_recv: ACL header: dlen 12
<3>[  544.161712] ll_check_data_len: len 12 room 1076
<3>[  544.166473] ll_recv: Complete data
<3>[  544.170074] hci_low_sent: conn (null) quote 0
<3>[  544.174652] hci_uart_tty_wakeup: 
<3>[  544.178161] hci_uart_tx_wakeup: 
<3>[  544.181518] hci_rx_task: hci0
<3>[  544.184661] hci_send_to_sock: hdev c453c000 len 7
<3>[  544.189605] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  544.194641] hci_send_to_sock: hdev c453c000 len 16
<3>[  544.199707] hci_rx_task: hci0 ACL data packet
<3>[  544.204254] hci_acldata_packet: hci0 len 12 handle 0x1 flags 0x2
<3>[  544.210571] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  544.216552] l2cap_recv_acldata: conn ccd49940 len 12 flags 0x2
<3>[  544.222686] l2cap_recv_frame: len 8, cid 0x0001
<3>[  544.227416] l2cap_raw_recv: conn ccd49940
<3>[  544.231658] l2cap_sig_channel: code 0x07 len 4 id 0x08
<3>[  544.237060] l2cap_disconnect_rsp: dcid 0x0041 scid 0x0041
<3>[  544.242736] l2cap_sock_clear_timer: sock c900c800 state 8
<3>[  544.248413] l2cap_chan_del: sk c900c800, conn ccd49940, err 0
<3>[  544.254486] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  544.260589] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  544.265533] ll_device_want_to_sleep: hu c9590d80
<3>[  544.270416] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  544.275268] hci_uart_tx_wakeup: 
<3>[  544.278717] hci_tx_task: hci0 acl 4 sco 4
<3>[  544.282897] hci_sched_acl: hci0
<3>[  544.286224] hci_low_sent: conn (null) quote 0
<3>[  544.290802] hci_sched_sco: hci0
<3>[  544.294097] hci_low_sent: conn (null) quote 0
<3>[  544.298675] hci_sched_esco: hci0
<3>[  544.302062] hci_low_sent: conn (null) quote 0
<3>[  544.306640] hci_uart_tty_wakeup: 
<3>[  544.310150] hci_uart_tx_wakeup: 
<3>[  544.314605] l2cap_sock_kill: sk c900c800 state 9
<3>[  544.319580] l2cap_sock_destruct: sk c900c800
<3>[  547.656829] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  547.663024] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  547.667663] ll_device_want_to_wakeup: hu c9590d80
<3>[  547.672668] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  547.677581] hci_uart_tx_wakeup: 
<3>[  547.681152] hci_uart_tty_wakeup: 
<3>[  547.684722] ll_recv: hu c9590d80 count 17 rx_state 0 rx_count 0
<3>[  547.691009] ll_recv: ACL packet
<3>[  547.694427] ll_recv: ACL header: dlen 12
<3>[  547.698577] ll_check_data_len: len 12 room 1076
<3>[  547.703369] ll_recv: Complete data
<3>[  547.707031] hci_uart_tx_wakeup: 
<3>[  547.710449] hci_rx_task: hci0
<3>[  547.713592] hci_send_to_sock: hdev c453c000 len 16
<3>[  547.718658] hci_rx_task: hci0 ACL data packet
<3>[  547.723297] hci_acldata_packet: hci0 len 12 handle 0x1 flags 0x2
<3>[  547.729675] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  547.735717] l2cap_recv_acldata: conn ccd49940 len 12 flags 0x2
<3>[  547.741973] l2cap_recv_frame: len 8, cid 0x0001
<3>[  547.746765] l2cap_raw_recv: conn ccd49940
<3>[  547.751007] l2cap_sig_channel: code 0x06 len 4 id 0x07
<3>[  547.756439] l2cap_disconnect_req: scid 0x0040 dcid 0x0040
<3>[  547.762237] l2cap_build_cmd: conn ccd49940, code 0x07, ident 0x07, len 4
<3>[  547.769409] l2cap_send_cmd: code 0x07
<3>[  547.773284] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  547.778808] hci_send_acl: hci0 nonfrag skb ce3de668 len 16
<3>[  547.784698] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  547.790893] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  547.795928] ll_device_want_to_sleep: hu c9590d80
<3>[  547.800872] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  547.805786] hci_uart_tx_wakeup: 
<3>[  547.809356] l2cap_sock_clear_timer: sock c77dc200 state 1
<3>[  547.815063] l2cap_chan_del: sk c77dc200, conn ccd49940, err 104
<3>[  547.821472] hci_uart_tty_wakeup: 
<3>[  547.825073] hci_uart_tx_wakeup: 
<3>[  547.828521] hci_tx_task: hci0 acl 4 sco 4
<3>[  547.832824] hci_sched_acl: hci0
<3>[  547.836151] hci_low_sent: conn c900c000 quote 4
<3>[  547.841003] hci_sched_acl: skb ce3de668 len 16
<3>[  547.845733] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  547.851776] hci_send_frame: hci0 type 2 len 16
<3>[  547.856536] hci_send_to_sock: hdev c453c000 len 16
<3>[  547.861633] hci_uart_send_frame: hci0: type 2 len 16
<3>[  547.866943] ll_enqueue: hu c9590d80 skb ce3de668
<3>[  547.871887] ll_enqueue: device asleep, waking up and queueing packet
<3>[  547.878601] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  547.883636] hci_uart_tx_wakeup: 
<3>[  547.887176] hci_low_sent: conn (null) quote 0
<3>[  547.891815] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  547.898071] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  547.902740] ll_device_woke_up: hu c9590d80
<3>[  547.907073] hci_uart_tx_wakeup: 
<3>[  547.910614] hci_sched_sco: hci0
<3>[  547.913970] hci_low_sent: conn (null) quote 0
<3>[  547.918670] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  547.924896] ll_recv: Event packet
<3>[  547.928588] ll_recv: Event header: evt 0x13 plen 5
<3>[  547.933746] ll_check_data_len: len 5 room 1078
<3>[  547.938476] ll_recv: Complete data
<3>[  547.942138] hci_sched_esco: hci0
<3>[  547.945587] hci_low_sent: conn (null) quote 0
<3>[  547.950256] hci_uart_tty_wakeup: 
<3>[  547.953765] hci_uart_tx_wakeup: 
<3>[  547.957244] hci_rx_task: hci0
<3>[  547.960418] hci_send_to_sock: hdev c453c000 len 7
<3>[  547.965484] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  547.970581] hci_tx_task: hci0 acl 4 sco 4
<3>[  547.974853] hci_sched_acl: hci0
<3>[  547.978210] hci_low_sent: conn (null) quote 0
<3>[  547.982879] hci_sched_sco: hci0
<3>[  547.986206] hci_low_sent: conn (null) quote 0
<3>[  547.990875] hci_sched_esco: hci0
<3>[  547.994323] hci_low_sent: conn (null) quote 0
<3>[  547.999816] l2cap_sock_release: sock ce8a9050, sk c77dc200
<3>[  548.006713] l2cap_sock_shutdown: sock ce8a9050, sk c77dc200
<3>[  548.016662] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  548.022949] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  548.027984] ll_device_want_to_sleep: hu c9590d80
<3>[  548.032897] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  548.037902] hci_uart_tx_wakeup: 
<3>[  548.041412] hci_uart_tty_wakeup: 
<3>[  548.045013] hci_uart_tx_wakeup: 
<3>[  548.049713] l2cap_sock_kill: sk c77dc200 state 9
<3>[  548.054748] l2cap_sock_destruct: sk c77dc200
<3>[  568.126342] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  568.132537] ll_recv: HCILL_WAKE_UP_IND packet
<3>[  568.137145] ll_device_want_to_wakeup: hu c9590d80
<3>[  568.142150] send_hcill_cmd: hu c9590d80 cmd 0x33
<3>[  568.147125] hci_uart_tx_wakeup: 
<3>[  568.150695] hci_uart_tty_wakeup: 
<3>[  568.154266] ll_recv: hu c9590d80 count 17 rx_state 0 rx_count 0
<3>[  568.160552] ll_recv: ACL packet
<3>[  568.163970] ll_recv: ACL header: dlen 12
<3>[  568.168121] ll_check_data_len: len 12 room 1076
<3>[  568.172943] ll_recv: Complete data
<3>[  568.176574] hci_uart_tx_wakeup: 
<3>[  568.179992] hci_rx_task: hci0
<3>[  568.183135] hci_send_to_sock: hdev c453c000 len 16
<3>[  568.188232] hci_rx_task: hci0 ACL data packet
<3>[  568.192871] hci_acldata_packet: hci0 len 12 handle 0x1 flags 0x2
<3>[  568.199218] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  568.205261] l2cap_recv_acldata: conn ccd49940 len 12 flags 0x2
<3>[  568.211517] l2cap_recv_frame: len 8, cid 0x0001
<3>[  568.216308] l2cap_raw_recv: conn ccd49940
<3>[  568.220550] l2cap_sig_channel: code 0x06 len 4 id 0x08
<3>[  568.226013] l2cap_disconnect_req: scid 0x0042 dcid 0x0042
<3>[  568.251312] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  568.257507] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  568.262512] ll_device_want_to_sleep: hu c9590d80
<3>[  568.267395] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  568.272308] hci_uart_tx_wakeup: 
<3>[  568.275848] hci_uart_tty_wakeup: 
<3>[  568.279357] hci_uart_tx_wakeup: 
<6>[  572.793334] request_suspend_state: sleep (0->3) at 564344726360 (2010-02-14 08:33:44.830262692 UTC)

^ permalink raw reply

* What's the idea of security_cfm is called for both hci_proto_auth_cfm and hci_proto_encrypt_cfm? -resend
From: Liejun Tao @ 2010-02-17 21:30 UTC (permalink / raw)
  To: Bluettooth Linux

Hi Marcel,
Beside the l2cap issue with Blackberry 8900, I meet another l2cap
connection failure issue when testing
PTS AVRCP_TC_TG_PTT_BV_01_I.

For 8900, the sequence is:
l2cap_do_start(): send L2CAP_INFO_REQ
security_cfm(): send L2CAP_CONN_REQ
l2cap_information_rsp(): call l2cap_do_start(), send L2CAP_CONN_REQ again

For PTS AVRCP_TC_TG_PTT_BV_01_I, the sequence is:
l2cap_do_start(): send L2CAP_CONN_REQ
security_cfm():send L2CAP_CONN_REQ again
l2cap_conn_rsp(): receive L2CAP_CR_PEND
l2cap_conn_rsp(): receive L2CAP_CR_NO_MEM

In both cases, security_cfm() is called from hci_proto_encrypt_cfm(),
and interrupt the normal sequence of l2cap connection.

security_cfm() is also called in hci_proto_auth_cfm. I feel auth_cfm
and encryption_cfm are for different events, why they call the same
function?

What's your mind to avoid 2 connection request?

Aside, should we set a state bit after send l2CAP_CONN_REQ?

Below is a piece of kernel debug message when testing AVRCP_TC_TG_PTT_BV_01_I,
We can see 2 CONN_REQ.

resend as not sure previous mail got sent.




<3>[  541.587463] l2cap_do_connect: DB:D8:AA:D4:23:00 ->
A0:33:E7:98:80:00 psm 0x19
<3>[  541.604095] hci_get_route: DB:D8:AA:D4:23:00 -> A0:33:E7:98:80:00
<3>[  541.610687] hci_connect: hci0 dst A0:33:E7:98:80:00
<3>[  541.615814] __l2cap_chan_add: conn ccd49940, psm 0x19, dcid 0x0000
<3>[  541.622314] l2cap_sock_set_timer: sk ccbc0000 state 5 timeout 5120
<3>[  541.628814] hci_conn_security: conn c900c000
<3>[  541.633270] l2cap_build_cmd: conn ccd49940, code 0x02, ident 0x05, len 4
<3>[  541.640319] l2cap_send_cmd: code 0x02
<3>[  541.644165] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  541.649536] hci_send_acl: hci0 nonfrag skb cec59200 len 16
<3>[  541.655303] hci_tx_task: hci0 acl 4 sco 4
<3>[  541.659484] hci_sched_acl: hci0
<3>[  541.662780] hci_low_sent: conn c900c000 quote 4
<3>[  541.667541] hci_sched_acl: skb cec59200 len 16
<3>[  541.672180] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  541.678131] hci_send_frame: hci0 type 2 len 16
<3>[  541.682800] hci_send_to_sock: hdev c453c000 len 16
<3>[  541.687805] hci_uart_send_frame: hci0: type 2 len 16
<3>[  541.693023] ll_enqueue: hu c9590d80 skb cec59200
<3>[  541.697845] ll_enqueue: device asleep, waking up and queueing packet
<3>[  541.704467] send_hcill_cmd: hu c9590d80 cmd 0x32
<3>[  541.709320] hci_uart_tx_wakeup:
<3>[  541.712738] hci_low_sent: conn (null) quote 0
<3>[  541.717315] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  541.723419] ll_recv: HCILL_WAKE_UP_ACK packet
<3>[  541.727996] ll_device_woke_up: hu c9590d80
<3>[  541.732269] hci_uart_tx_wakeup:
<3>[  541.735687] hci_sched_sco: hci0
<3>[  541.738983] hci_low_sent: conn (null) quote 0
<3>[  541.743560] ll_recv: hu c9590d80 count 8 rx_state 0 rx_count 0
<3>[  541.749664] ll_recv: Event packet
<3>[  541.753143] ll_recv: Event header: evt 0x13 plen 5
<3>[  541.758178] ll_check_data_len: len 5 room 1078
<3>[  541.762847] ll_recv: Complete data
<3>[  541.766387] hci_sched_esco: hci0
<3>[  541.769775] hci_low_sent: conn (null) quote 0
<3>[  541.774353] hci_uart_tty_wakeup:
<3>[  541.777832] hci_uart_tx_wakeup:
<3>[  541.781188] hci_rx_task: hci0
<3>[  541.784301] hci_send_to_sock: hdev c453c000 len 7
<3>[  541.789215] hci_num_comp_pkts_evt: hci0 num_hndl 1
<3>[  541.794250] hci_tx_task: hci0 acl 4 sco 4
<3>[  541.798431] hci_sched_acl: hci0
<3>[  541.801727] hci_low_sent: conn (null) quote 0
<3>[  541.806274] hci_sched_sco: hci0
<3>[  541.809570] hci_low_sent: conn (null) quote 0
<3>[  541.814117] hci_sched_esco: hci0
<3>[  541.817535] ll_recv: hu c9590d80 count 7 rx_state 0 rx_count 0
<3>[  541.823608] ll_recv: Event packet
<3>[  541.827117] ll_recv: Event header: evt 0x08 plen 4
<3>[  541.832153] ll_check_data_len: len 4 room 1078
<3>[  541.836791] ll_recv: Complete data
<3>[  541.840423] ll_recv: hu c9590d80 count 27 rx_state 0 rx_count 0
<3>[  541.846588] ll_recv: ACL packet
<3>[  541.849945] ll_recv: ACL header: dlen 16
<3>[  541.854034] ll_check_data_len: len 16 room 1076
<3>[  541.858764] ll_recv: Complete data
<3>[  541.862335] ll_recv: ACL packet
<3>[  541.865661] ll_recv: ACL header: dlen 16
<3>[  541.869750] ll_check_data_len: len 16 room 1076
<3>[  541.874481] ll_recv: hu c9590d80 count 32 rx_state 4 rx_count 15
<3>[  541.880798] ll_recv: Complete data
<3>[  541.884338] ll_recv: ACL packet
<3>[  541.887664] ll_recv: ACL header: dlen 12
<3>[  541.891754] ll_check_data_len: len 12 room 1076
<3>[  541.896514] ll_recv: Complete data
<3>[  541.900054] hci_low_sent: conn (null) quote 0
<3>[  541.904632] hci_rx_task: hci0
<3>[  541.907714] hci_send_to_sock: hdev c453c000 len 6
<3>[  541.912658] hci_encrypt_change_evt: hci0 status 0
<3>[  541.917602] l2cap_security_cfm: conn ccd49940
<3>[  541.922149] l2cap_build_cmd: conn ccd49940, code 0x02, ident 0x06, len 4
<3>[  541.929168] l2cap_send_cmd: code 0x02
<3>[  541.933013] ll_recv: hu c9590d80 count 1 rx_state 0 rx_count 0
<3>[  541.939117] ll_recv: HCILL_GO_TO_SLEEP_IND packet
<3>[  541.944030] ll_device_want_to_sleep: hu c9590d80
<3>[  541.948883] send_hcill_cmd: hu c9590d80 cmd 0x31
<3>[  541.953704] hci_uart_tx_wakeup:
<3>[  541.957122] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  541.962493] hci_send_acl: hci0 nonfrag skb cec599d0 len 16
<3>[  541.968231] rfcomm_security_cfm: conn c900c000 status 0x00 encrypt 0x01
<3>[  541.975189] hci_send_to_sock: hdev c453c000 len 20
<3>[  541.980224] hci_rx_task: hci0 ACL data packet
<3>[  541.984771] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  541.991058] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  541.996978] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  542.003082] l2cap_recv_frame: len 12, cid 0x0001
<3>[  542.007934] l2cap_raw_recv: conn ccd49940
<3>[  542.012176] l2cap_sig_channel: code 0x03 len 8 id 0x05
<3>[  542.017547] l2cap_connect_rsp: dcid 0x0042 scid 0x0042 result
0x01 status 0x00
<3>[  542.025115] hci_send_to_sock: hdev c453c000 len 20
<3>[  542.030120] hci_rx_task: hci0 ACL data packet
<3>[  542.034698] hci_acldata_packet: hci0 len 16 handle 0x1 flags 0x2
<3>[  542.040985] hci_conn_enter_active_mode: conn c900c000 mode 0
<3>[  542.046905] l2cap_recv_acldata: conn ccd49940 len 16 flags 0x2
<3>[  542.053009] l2cap_recv_frame: len 12, cid 0x0001
<3>[  542.057830] l2cap_raw_recv: conn ccd49940
<3>[  542.062042] l2cap_sig_channel: code 0x03 len 8 id 0x05
<3>[  542.067413] l2cap_connect_rsp: dcid 0x0042 scid 0x0042 result
0x00 status 0x00
<3>[  542.074981] l2cap_build_conf_req: sk ccbc0000
<3>[  542.079528] l2cap_build_cmd: conn ccd49940, code 0x04, ident 0x07, len 4
<3>[  542.086578] l2cap_send_cmd: code 0x04
<3>[  542.090423] hci_send_acl: hci0 conn c900c000 flags 0x0
<3>[  542.095764] hci_send_acl: hci0 nonfrag skb cec59840 len 16
<3>[  542.101531] hci_send_to_sock: hdev c453c000 len 16

^ permalink raw reply

* Re: [PATCH] Bluetooth: Fix kernel crash on BT stress tests.
From: Gustavo F. Padovan @ 2010-02-17 23:57 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth
In-Reply-To: <508e92ca1002160358g1c6b599bo329f4f51cae18041@mail.gmail.com>

Hi Andrei,

* Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com> [2010-02-16 13:58:34 +0200]:

> On Tue, Feb 16, 2010 at 1:34 PM, Gustavo F. Padovan
> <padovan@profusion.mobi> wrote:
> > Hi Andrei,
> >
> > * Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com> [2010-02-16 12:36:47 +0200]:
> >
> >> From 0135f732cb45e5e91062aca84a61a40b172200a4 Mon Sep 17 00:00:00 2001
> >> From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> >> Date: Tue, 16 Feb 2010 10:52:33 +0200
> >> Subject: [PATCH] Bluetooth: Fix kernel crash on BT stress tests.
> >>
> >> Added very simple check that req buffer has enough space to
> >> fit configuration parameters. Shall be enough to reject packets
> >> with configuration size more than req buffer.
> >>
> >> Crash trace below
> >>
> >> [ 6069.659393] Unable to handle kernel paging request at virtual
> >> address 02000205
> >> [ 6069.673034] Internal error: Oops: 805 [#1] PREEMPT
> >> ...
> >> [ 6069.727172] PC is at l2cap_add_conf_opt+0x70/0xf0 [l2cap]
> >> [ 6069.732604] LR is at l2cap_recv_frame+0x1350/0x2e78 [l2cap]
> >> ...
> >> [ 6070.030303] Backtrace:
> >> [ 6070.032806] [<bf1c2880>] (l2cap_add_conf_opt+0x0/0xf0 [l2cap]) from
> >> [<bf1c6624>] (l2cap_recv_frame+0x1350/0x2e78 [l2cap])
> >> [ 6070.043823]  r8:dc5d3100 r7:df2a91d6 r6:00000001 r5:df2a8000 r4:00000200
> >> [ 6070.050659] [<bf1c52d4>] (l2cap_recv_frame+0x0/0x2e78 [l2cap]) from
> >> [<bf1c8408>] (l2cap_recv_acldata+0x2bc/0x350 [l2cap])
> >> [ 6070.061798] [<bf1c814c>] (l2cap_recv_acldata+0x0/0x350 [l2cap]) from
> >> [<bf0037a4>] (hci_rx_task+0x244/0x478 [bluetooth])
> >> [ 6070.072631]  r6:dc647700 r5:00000001 r4:df2ab740
> >> [ 6070.077362] [<bf003560>] (hci_rx_task+0x0/0x478 [bluetooth]) from
> >> [<c006b9fc>] (tasklet_action+0x78/0xd8)
> >> [ 6070.087005] [<c006b984>] (tasklet_action+0x0/0xd8) from [<c006c160>]
> >
> > Are you using ERTM or Streaming mode? If yes, I have a guess about the
> > source of the problem. On l2cap_parse_conf_rsp we check for:
> >
> >        while (len >= L2CAP_CONF_OPT_SIZE) {
> >                len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
> >
> > But on case L2CAP_CONF_RFC olen is greater than L2CAP_CONF_OPT_SIZE we
> > can exceed the buffer size. So the right fix will be check if len >=
> > olen in that case.
> 
> We use test tool which sends "Configure Response" packet with size 262
> bytes. So "req" buffer gets overwritten. But in the code nobody checks
> that "req" might be overwritten.

So I have found another issue. ;)
Have to fix it.

> 
> -- Andrei
> 
> >
> >
> >>
> >> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> >> ---
> >>  net/bluetooth/l2cap.c |    6 ++++++
> >>  1 files changed, 6 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
> >> index 400efa2..69b7280 100644
> >> --- a/net/bluetooth/l2cap.c
> >> +++ b/net/bluetooth/l2cap.c
> >> @@ -2830,6 +2830,12 @@ static inline int l2cap_config_rsp(struct
> >> l2cap_conn *conn, struct l2cap_cmd_hdr
> >>                       int len = cmd->len - sizeof(*rsp);
> >>                       char req[64];
> >>
> >> +                     if (len > sizeof(req) - sizeof(struct l2cap_conf_req)) {
> >> +                             BT_ERR("Config response is too big");
> >> +                             l2cap_send_disconn_req(conn, sk);
> >> +                             goto done;
> >> +                     }
> >> +
> >>                       /* throw out any old stored conf requests */
> >>                       result = L2CAP_CONF_SUCCESS;
> >>                       len = l2cap_parse_conf_rsp(sk, rsp->data,
> >> --
> >> 1.6.0.4
> >
> >
> > --
> > Gustavo F. Padovan
> > http://padovan.org
> >
> > ProFUSION embedded systems - http://profusion.mobi
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Gustavo F. Padovan
http://padovan.org

ProFUSION embedded systems - http://profusion.mobi

^ permalink raw reply

* Bluez as HID keyboard
From: Robert Siemer @ 2010-02-18  0:31 UTC (permalink / raw)
  To: linux-bluetooth

Hello everyone,

is there an application that turns my computer into a bluetooth 
keyboard? (I.e. the device side of HID.)

If there is not yet, is something missing in the bluez infrastructure to 
write one?


Regards,
Robert


^ permalink raw reply

* [PATCH] Always use "nice abort" in osso-gwobex
From: Bastien Nocera @ 2010-02-18  1:09 UTC (permalink / raw)
  To: BlueZ development

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

Heya,

As discussed on IRC, we should always use the "nice abort" of openobex,
rather than disconnecting from device when cancelling transfers.

The other patch fixes a little typo.

Cheers

[-- Attachment #2: 0001-Fix-typo-in-incomming.patch --]
[-- Type: text/x-patch, Size: 794 bytes --]

>From c1b889e33fc4a40f3164ce4616d59adca149b81e Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 18 Feb 2010 01:05:25 +0000
Subject: [PATCH 1/2] Fix typo in "incomming"

---
 src/obex-priv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/obex-priv.c b/src/obex-priv.c
index a8b12ea..f99740a 100644
--- a/src/obex-priv.c
+++ b/src/obex-priv.c
@@ -371,7 +371,7 @@ static void obex_readstream(GwObex *ctx, obex_object_t *object) {
     int actual;
 
     if (!xfer) {
-        debug("Incomming data even though no xfer active!\n");
+        debug("Incoming data even though no xfer active!\n");
         /* Flush incomming stream */
         actual = OBEX_ObjectReadStream(ctx->handle, object, &buf);
         if (actual > 0)
-- 
1.6.6.1


[-- Attachment #3: 0002-Always-use-nice-abort.patch --]
[-- Type: text/x-patch, Size: 1860 bytes --]

>From 62e697f0cf06dcf22899188e08ef7ebfcf349fc7 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 18 Feb 2010 01:05:37 +0000
Subject: [PATCH 2/2] Always use "nice abort"

So we don't disconnect when cancelling a request.
---
 configure.ac    |    1 -
 src/obex-xfer.c |    8 --------
 2 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7688054..f0dcd53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,6 @@ AC_SUBST(LDFLAGS)
 
 AC_ARG_ENABLE(docs,      [  --enable-docs        build DOXYGEN documentation (requires Doxygen)],enable_docs=$enableval,enable_docs=auto)
 AC_ARG_ENABLE(tracing,   [  --enable-tracing     Enable debuging information],enable_tracing=$enableval,enable_tracing=no)
-AC_ARG_ENABLE(niceabort, [  --enable-niceabort   Enable proper abort],enable_niceabort=$enableval,enable_niceabort=no)
 AC_ARG_ENABLE(localtime, [  --enable-localtime   Send time as local instead of UTC],enable_localtime=$enableval,enable_localtime=no)
 AC_ARG_ENABLE(coverage,  [  --enable-coverage    Enable coverage], enable_coverage=$enableval, enable_coverage=no)
 
diff --git a/src/obex-xfer.c b/src/obex-xfer.c
index 38a2f4f..81ac5dc 100644
--- a/src/obex-xfer.c
+++ b/src/obex-xfer.c
@@ -98,18 +98,10 @@ gboolean gw_obex_xfer_do_abort(struct gw_obex_xfer *xfer) {
 
     xfer->abort = TRUE;
 
-#ifdef USE_NICE_ABORT
     debug("Performing nice abort\n");
     if (OBEX_CancelRequest(xfer->ctx->handle, TRUE) != 0)
         return FALSE;
     return TRUE;
-#else
-    debug("Performing abort through disconnection (without ABORT command)\n");
-    xfer->ctx->done = TRUE;
-    OBEX_CancelRequest(xfer->ctx->handle, FALSE);
-    obex_link_error(xfer->ctx);
-    return FALSE;
-#endif
 }
 
 GwObexXfer *gw_obex_put_async(GwObex *ctx, const char *name, const char *type,
-- 
1.6.6.1


^ permalink raw reply related

* Re: Bluez as HID keyboard
From: Bastien Nocera @ 2010-02-18  1:12 UTC (permalink / raw)
  To: Robert Siemer; +Cc: linux-bluetooth
In-Reply-To: <4B7C8A49.4030904@backsla.sh>

On Thu, 2010-02-18 at 08:31 +0800, Robert Siemer wrote:
> Hello everyone,
> 
> is there an application that turns my computer into a bluetooth 
> keyboard? (I.e. the device side of HID.)
> 
> If there is not yet, is something missing in the bluez infrastructure to 
> write one?

You can probably try that:
http://mulliner.org/bluetooth/xkbdbthid.php

Cheers


^ permalink raw reply

* Kernel panic in rfcomm_run - unbalanced refcount on rfcomm_session
From: Nick Pelly @ 2010-02-18  5:04 UTC (permalink / raw)
  To: Bluettooth Linux

Since 2.6.32 we are seeing kernel panics like:

[10651.110229] Unable to handle kernel paging request at virtual
address 6b6b6b6b
[10651.111968] Internal error: Oops: 5 [#1] PREEMPT
[10651.113952] CPU: 0    Tainted: G        W   (2.6.32-59979-gd0c97db #1)
[10651.114624] PC is at rfcomm_run+0xa04/0xdbc
<...>
[10651.406188] [<c031ad24>] (rfcomm_run+0xa04/0xdbc) from [<c006ce30>]
(kthread+0x78/0x80)
[10651.406585] [<c006ce30>] (kthread+0x78/0x80) from [<c002793c>]
(kernel_thread_exit+0x0/0x8)

(rfcomm_run() is all inlined so theres not much of a stack trace))

This is a use-after-free on struct rfcomm_session s in the call chain
rfcomm_run() -> rfcomm_process_sessions() -> rfcomm_process_dlcs() ->
list_for_each_safe(p, n, &s->dlcs). The only way this can happen is if
there is an unbalanced refcount on the rfcomm session.

We found that reverting the patch
9e726b17422bade75fba94e625cd35fd1353e682 "Bluetooth: Fix rejected
connection not disconnecting ACL link" fixes the issue for us. The
patch itself looks ok, I added some logging to check the new refcounts
in the patch are balanced and they are. However if I remove the new
calls to rfcomm_session_put() and rfcomm_session_hold() the crash is
resolved. I also found that we can crash without hitting
rfcomm_session_timeout(), so its not related to Marcel's recent patch
to remove the scheduling-while-atomic warning.

9e726b17422bade75fba94e625cd35fd1353e682 does lead to a delay in
calling rfcomm_session_del() due to the extra refcount while waiting
for the new timeout. I believe that this delay has revealed some more
subtle problem elsewhere that causes an unbalanced refcount and then
the kernel panic.

I have debug kernel logs and hci logs - they are too large to send to
the list but I can send them directly to anyone interested in
debugging.

We see this crash frequently with a number of headsets since 2.6.32,
but not reliably. I do have a 100% repro case with the Nuvi Garmin,
with these exact steps:
1) Make sure Nuvi is unpaired, Bluez stack is unpaired, and kernel has
been rebooted since unpairing.
2) Initiate device discovery, pairing, and handsfree connection from Nuvi
3) Observe HFP rfcomm connect briefly, then disconnect, and kernel panic

Our short-term solution is unfortunately to revert
9e726b17422bade75fba94e625cd35fd1353e682.

Nick

^ permalink raw reply

* Re: [PATCH] Bluetooth: Allow SCO/eSCO packet type selection for outgoing SCO connections.
From: Ville Tervo @ 2010-02-18  6:49 UTC (permalink / raw)
  To: ext Marcel Holtmann; +Cc: Nick Pelly, linux-bluetooth@vger.kernel.org
In-Reply-To: <1266427894.8849.66.camel@localhost.localdomain>

Hi Marcel and Nick,

ext Marcel Holtmann wrote:
> Hi Nick,
> 
>>>> As a first step, can we get consensus on the userspace API:
>>>>
>>>> --- a/include/net/bluetooth/hci.h
>>>> +++ b/include/net/bluetooth/hci.h
>>>> @@ -139,8 +139,11 @@ enum {
>>>> +#define ALL_SCO_PKTS   (SCO_ESCO_MASK | EDR_ESCO_MASK)
>>>> +#define ALL_ESCO_PKTS  (SCO_ESCO_MASK | ESCO_EV3 | ESCO_EV4 | ESCO_EV5)
>>>>
>>>> --- a/include/net/bluetooth/sco.h
>>>> +++ b/include/net/bluetooth/sco.h
>>>> @@ -37,6 +37,7 @@
>>>> struct sockaddr_sco {
>>>>       sa_family_t     sco_family;
>>>>       bdaddr_t        sco_bdaddr;
>>>> +       __u16           sco_pkt_type;
>>>> };
>>>>
>>>> This will at least unblock my work.
>>> Would it be better to add new sockopt for sco socket?
>> What advantage does that have?
>>

>> Putting it in struct sockaddr_sco seems to make more sense since
>> packet types can only be selected during SCO connection establishment.
>> They can't be changed once the socket is connected.

The idea was to not force user space developers to handle packet type 
decision. And still give opportunity to tune allowed packet types.

> 
> in theory you can change the allowed packet types for ACL, SCO and eSCO
> after the connection is active. However the usefulness here is fairly
> limited. In case of ACL it is purely academical and most link manager
> will just ignore you. Mainly because the host stack can't really make a
> good decision here anyway.
> 
> Personally I think it is a total brain dead concept to give this into
> the control of the host stack anyway. For eSCO packet types this make a
> bit more sense since you might wanna control the bandwidth. However
> changing them later is just pointless. And I don't recall of any profile
> actually mentioning about it. I think they had a great idea behind eSCO
> support, but since it is impossible to get the negotiation parts right,
> everybody sticks with simple eSCO channels and doesn't bother to change
> them.
> 
> And even if we would be going for a setsockopt(), that would be blocking
> and then again pretty much pointless API. The sockaddr is most logical
> thing that fits into what we wanna achieve. Disallow/allow certain
> packet types and essentially force SCO over eSCO.

My idea was to provide same functionality than through sockaddr. IOW 
just provide API to control packet types for connection creation/accept 
and not to change types during the connection.


Sockaddr sounds good. It fulfills current requirements.

-- 
Ville

^ permalink raw reply

* Re: Kernel panic in rfcomm_run - unbalanced refcount on rfcomm_session
From: Ville Tervo @ 2010-02-18  7:15 UTC (permalink / raw)
  To: ext Nick Pelly; +Cc: Bluettooth Linux
In-Reply-To: <35c90d961002172104q3af1ca8p850004f8b93e8af7@mail.gmail.com>

Hi nick,

ext Nick Pelly wrote:
> Since 2.6.32 we are seeing kernel panics like:
> 
> [10651.110229] Unable to handle kernel paging request at virtual
> address 6b6b6b6b
> [10651.111968] Internal error: Oops: 5 [#1] PREEMPT
> [10651.113952] CPU: 0    Tainted: G        W   (2.6.32-59979-gd0c97db #1)
> [10651.114624] PC is at rfcomm_run+0xa04/0xdbc
> <...>
> [10651.406188] [<c031ad24>] (rfcomm_run+0xa04/0xdbc) from [<c006ce30>]
> (kthread+0x78/0x80)
> [10651.406585] [<c006ce30>] (kthread+0x78/0x80) from [<c002793c>]
> (kernel_thread_exit+0x0/0x8)
> 
> (rfcomm_run() is all inlined so theres not much of a stack trace))
> 
> This is a use-after-free on struct rfcomm_session s in the call chain
> rfcomm_run() -> rfcomm_process_sessions() -> rfcomm_process_dlcs() ->
> list_for_each_safe(p, n, &s->dlcs). The only way this can happen is if
> there is an unbalanced refcount on the rfcomm session.
> 

I have seen same traces.

> We found that reverting the patch
> 9e726b17422bade75fba94e625cd35fd1353e682 "Bluetooth: Fix rejected
> connection not disconnecting ACL link" fixes the issue for us. The
> patch itself looks ok, I added some logging to check the new refcounts
> in the patch are balanced and they are. However if I remove the new
> calls to rfcomm_session_put() and rfcomm_session_hold() the crash is
> resolved. I also found that we can crash without hitting
> rfcomm_session_timeout(), so its not related to Marcel's recent patch
> to remove the scheduling-while-atomic warning.
> 
> 9e726b17422bade75fba94e625cd35fd1353e682 does lead to a delay in
> calling rfcomm_session_del() due to the extra refcount while waiting
> for the new timeout. I believe that this delay has revealed some more
> subtle problem elsewhere that causes an unbalanced refcount and then
> the kernel panic.
> 
> I have debug kernel logs and hci logs - they are too large to send to
> the list but I can send them directly to anyone interested in
> debugging.
> 
> We see this crash frequently with a number of headsets since 2.6.32,
> but not reliably. I do have a 100% repro case with the Nuvi Garmin,
> with these exact steps:
> 1) Make sure Nuvi is unpaired, Bluez stack is unpaired, and kernel has
> been rebooted since unpairing.
> 2) Initiate device discovery, pairing, and handsfree connection from Nuvi
> 3) Observe HFP rfcomm connect briefly, then disconnect, and kernel panic
> 

Some OBEX cases also trigger this same problem. I don't have exact steps 
right now. I'll try to dig some more information.

-- 
Ville

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox