Linux bluetooth development
 help / color / mirror / Atom feed
* Re: wi2wi bluecore4
From: Brad Midgley @ 2010-11-30  5:24 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <AANLkTi=VPn1k=kLdo7QbM4epc88fdcW2XsbLyFeYt9y4@mail.gmail.com>

Hey

I think I am a little closer, just wanted to see if anyone has any ideas.

I rebuilt bccmd so it would connect at 115k instead of 38k. Not sure
why it's hardcoded if the chip cares (this chip refuses to respond at
38k). In any case, now bccmd can set and reset the chip apparently:

# cat pskey.psr
// PSKEY_UART_BAUDRATE
&01be = 0ebf
// PSKEY_SCO_MAPPING
&01ab = 0
# bccmd.115 -t H4 -d /dev/ttyS1 psload -r pskey.psr
Loading PSKEY_UART_BAUDRATE ... done
Loading PSKEY_HOSTIO_MAP_SCO_PCM ... done
#

But the hciattach still fails with "Initialization timed out.". The
chip returns a single byte...

# strace -s 64 hciattach ttyS1 csr 921600 noflow
...
open("/dev/ttyS1", O_RDWR|O_NOCTTY)     = 3
ioctl(3, TCFLSH, 0x2)                   = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 -opost -isig -icanon
-echo ...}) = 0
ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon
-echo ...}) = 0
ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon
-echo ...}) = 0
ioctl(3, TCFLSH, 0x2)                   = 0
write(3, "\1\0\374\27\302\0\0\t\0\0\0\31(\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 27) = 27
read(3, "\374", 1)                      = 1
read(3, 0xbed819dc, 1)                  = ? ERESTARTSYS (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---

What is the chip saying to us when we read \374? Why is hciattach
initializing at 115k when i told it to use 921k? So I tried setting
the init speed too:

# strace -s 64 hciattach -s 921600 ttyS1 csr 921600 noflow
...
open("/dev/ttyS1", O_RDWR|O_NOCTTY)     = 3
ioctl(3, TCFLSH, 0x2)                   = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 -opost -isig -icanon
-echo ...}) = 0
ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon
-echo ...}) = 0
ioctl(3, SNDCTL_TMR_START or TCSETS, {B921600 -opost -isig -icanon
-echo ...}) = 0
ioctl(3, TCFLSH, 0x2)                   = 0
write(3, "\1\0\374\27\302\0\0\t\0\0\0\31(\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 27) = 27
read(3, 0xbeebf9cc, 1)                  = ? ERESTARTSYS (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---

this time it didn't even get one junk byte. Is there anything else I can check?

Brad

^ permalink raw reply

* Re: [PATCH] ath3k: reduce memory usage
From: Gustavo F. Padovan @ 2010-11-30  1:52 UTC (permalink / raw)
  To: Alexander Holler
  Cc: Marcel Holtmann, Alicke Xu, Luis R. Rodriguez, Vikram Kandukuri,
	linux-bluetooth
In-Reply-To: <1290456541-3812-1-git-send-email-holler@ahsoftware.de>

Hi Alexander,

* Alexander Holler <holler@ahsoftware.de> [2010-11-22 21:09:01 +0100]:

> There is no need to hold the firmware in memory.
> 
> Signed-off-by: Alexander Holler <holler@ahsoftware.de>
> ---
>  drivers/bluetooth/ath3k.c |   75 ++++++++++++---------------------------------
>  1 files changed, 20 insertions(+), 55 deletions(-)
> 
> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> index 128cae4..81cd1ed 100644
> --- a/drivers/bluetooth/ath3k.c
> +++ b/drivers/bluetooth/ath3k.c
> @@ -43,46 +43,40 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
>  #define USB_REQ_DFU_DNLOAD	1
>  #define BULK_SIZE		4096
>  
> -struct ath3k_data {
> -	struct usb_device *udev;
> -	u8 *fw_data;
> -	u32 fw_size;
> -	u32 fw_sent;
> -};
> -
> -static int ath3k_load_firmware(struct ath3k_data *data,
> -				unsigned char *firmware,
> -				int count)
> +static int ath3k_load_firmware(struct usb_device *udev,
> +				const struct firmware *firmware)
>  {
>  	u8 *send_buf;
>  	int err, pipe, len, size, sent = 0;
> +	int count = firmware->size;
>  
> -	BT_DBG("ath3k %p udev %p", data, data->udev);
> +	BT_DBG("udev %p", udev);
>  
> -	pipe = usb_sndctrlpipe(data->udev, 0);
> +	pipe = usb_sndctrlpipe(udev, 0);
>  
> -	if ((usb_control_msg(data->udev, pipe,
> +	send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
> +	if (!send_buf) {
> +		BT_ERR("Can't allocate memory chunk for firmware");
> +		return -ENOMEM;
> +	}
> +
> +	memcpy(send_buf, firmware->data, 20);
> +	if ((err = usb_control_msg(udev, pipe,
>  				USB_REQ_DFU_DNLOAD,
>  				USB_TYPE_VENDOR, 0, 0,
> -				firmware, 20, USB_CTRL_SET_TIMEOUT)) < 0) {
> +				send_buf, 20, USB_CTRL_SET_TIMEOUT)) < 0) {
>  		BT_ERR("Can't change to loading configuration err");
> -		return -EBUSY;
> +		goto error;
>  	}
>  	sent += 20;
>  	count -= 20;

Patch looks good to me,  but I have a question here: what's 20 here? I
didn't figured out.

Vikram, what's your opinion on this patch? Can you ack/nack it?

-- 
Gustavo F. Padovan
http://profusion.mobi

^ permalink raw reply

* Re: [RFC] Interface to set LE connection parameters
From: Gustavo F. Padovan @ 2010-11-30  1:37 UTC (permalink / raw)
  To: Ville Tervo; +Cc: ext tim.howes@accenture.com, linux-bluetooth@vger.kernel.org
In-Reply-To: <20101115151739.GD16464@null>

Hi Ville,

* Ville Tervo <ville.tervo@nokia.com> [2010-11-15 17:17:39 +0200]:

> Hi Tim,
> 
> Please stop top posting on this ml.
> 
> On Mon, Nov 15, 2010 at 03:24:29PM +0100, ext tim.howes@accenture.com wrote:
> > Hi Ville,
> > 
> > As you note the different profiles would likely have different connection parameters.  The different profiles may be running on the same LE link (indeed the same L2CAP [fixed] channel).
> > 
> 
> I guess the latency should override power requirements. Low power profile can
> operate on low latency link but low latency profile fails on high latency. Of
> course this gets much more complicated if there are more requirements.
> 
> Are these (latency and power) the only characteristics we need to deal with.
> There might be some also. I'm not too familiar with profile drafts.
> 
> > Do you have a view on how the different profiles - on the same link - would have different requests arbitrated, and where that arbitration would be done?  I'd imagine that the API towards the profiles should be of the abstract form - such as you mention (eg BT_LE_LOW_LAT).  This would make it easier to arbitrate the different requests, as compared to if the profiles see an API of the "numerical" form (eg interval = N ms).  I guess the arbitration could happen in user or kernel space; as long as there is something with singleton-like semantics to do it.
> > 
> 
> I think I need to get more details from profile specs and try to find out the
> requirements from them.
> 
> Right now I'm trying to find out what would be the right interface from kernel
> to user space. 

If you go with the abstraction in userspace (inside bluetoothd) will be easy to
create usage profiles on top of it or even do a fine tune of the parameters
for a specific usage. New profiles should be created in the future and we
can't foresee its requirements. And I'm seeing that we will have many
many different use cases for LE in the future.  It can be hard to extend
the API if we do the abstraction in the kernel because we can't break
the API that we are going to create.

We also have to check if we really need all the parameters you are
proposing, maybe we can simplify that API. What about you send a e-mail
explaining why we should add each parameter to the API?

-- 
Gustavo F. Padovan
http://profusion.mobi

^ permalink raw reply

* Re: [RFC 2/4] Bluetooth: clean up rfcomm code
From: Gustavo F. Padovan @ 2010-11-30  1:09 UTC (permalink / raw)
  To: Emeltchenko Andrei; +Cc: linux-bluetooth, marcel
In-Reply-To: <1290784965-4508-3-git-send-email-Andrei.Emeltchenko.news@gmail.com>

Hi Andrei,

* Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com> [2010-11-26 17:22:43 +0200]:

> From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> 
> Remove extra spaces, assignments in if statement, zeroing static
> variables.
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> ---
>  include/net/bluetooth/rfcomm.h |   18 +++++++++---------
>  net/bluetooth/rfcomm/core.c    |    8 ++++----
>  net/bluetooth/rfcomm/sock.c    |    5 +++--
>  net/bluetooth/rfcomm/tty.c     |   28 ++++++++++++++++------------
>  4 files changed, 32 insertions(+), 27 deletions(-)
> 
> diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
> index 71047bc..6eac4a7 100644
> --- a/include/net/bluetooth/rfcomm.h
> +++ b/include/net/bluetooth/rfcomm.h
> @@ -1,5 +1,5 @@
> -/* 
> -   RFCOMM implementation for Linux Bluetooth stack (BlueZ).
> +/*
> +   RFCOMM implementation for Linux Bluetooth stack (BlueZ)
>     Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>
>     Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org>
>  
> @@ -11,13 +11,13 @@
>     OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
>     IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
> -   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 
> -   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
> -   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
> +   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
> +   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> +   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
>     OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  
> -   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 
> -   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 
> +   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
> +   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
>     SOFTWARE IS DISCLAIMED.

Marcel refused a patch from me in the past because its was touching legal
stuff, so or you remove these changes for your patches or wait for
Marcel's comments here.

-- 
Gustavo F. Padovan
http://profusion.mobi

^ permalink raw reply

* Re: [PATCH v3] Bluetooth: Fix error handling for l2cap_init()
From: Gustavo F. Padovan @ 2010-11-30  1:05 UTC (permalink / raw)
  To: Anderson Lizardo; +Cc: linux-bluetooth
In-Reply-To: <1291047350-32126-1-git-send-email-anderson.lizardo@openbossa.org>

Hi Anderson,

* Anderson Lizardo <anderson.lizardo@openbossa.org> [2010-11-29 12:15:50 -0400]:

> create_singlethread_workqueue() may fail with errors such as -ENOMEM. If
> this happens, the return value is not set to a negative value and the
> module load will succeed. It will then crash on module unload because of
> a destroy_workqueue() call on a NULL pointer.
> 
> Additionally, the _busy_wq workqueue is not being destroyed if any
> errors happen on l2cap_init().
> 
> Signed-off-by: Anderson Lizardo <anderson.lizardo@openbossa.org>

Patch has been applied, thanks a lot.

-- 
Gustavo F. Padovan
http://profusion.mobi

^ permalink raw reply

* Re: sdptool hanging remote
From: Grahame Jordan @ 2010-11-29 21:19 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <AANLkTi=Yzpo-CuhgdOuD1T8ByAV=4sse93XZt55eo+b7@mail.gmail.com>


On 25/11/10 09:55, Vinicius Gomes wrote:
>>     handle 256 packets 1
>> 2000-01-02 07:35:12.430756>  ACL data: handle 256 flags 0x02 dlen 12
>>     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
>> 2000-01-02 07:35:12.430979<  ACL data: handle 256 flags 0x02 dlen 12
>>     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
>> 2000-01-02 07:35:12.440583>  HCI Event: Number of Completed Packets (0x13)
>> plen 5
>>     handle 256 packets 1
>> 2000-01-02 07:35:12.460651>  ACL data: ha
>> # Hang here
>>
>> # Resumed after about 10 seconds
>> ndle 256 flags 0x02 dlen 12
>>     L2CAP(s): Connect req: psm 1 scid 0x0042
>> 2000-01-02 07:35:12.460904<  ACL data: handle 256 flags 0x02 dlen 16
>>     L2CAP(s)i2c: error: timeout
>>
> This ("i2c: error: timeout") looks strange. But could be unrelated.

Mmmm? I have another problem that the whole thing locks up usually when 
BT disconnects.
There is a daemon that is using the I2C bus. When it is not running the 
lockup issue goes away?
Not sure if it is I2C causing the lockup or not. It just locks up 
silently and sometimes gets a dump from SOFT_LOCK.
Anyway weather the daemon is running or not we still get this ping of 
death from sdptool.

> Another thing that could be interesting to have is the hcidump of an
> attempt using Ubuntu 8.04 (that you said that had no problems).

Please see below

> The output of "sdptool browse local", from the gumstix would be also useful.

root@test:~# sdptool browse local
Browsing FF:FF:FF:00:00:00 ...
Service Name: Group Network Service
Service RecHandle: 0x10000
Service Class ID List:
    "PAN Group Network" (0x1117)
Protocol Descriptor List:
    "L2CAP" (0x0100)
      PSM: 15
    "BNEP" (0x000f)
      Version: 0x0100
Profile Descriptor List:
    "PAN Group Network" (0x1117)
      Version: 0x0100

Thanks
>> 2000-01-02 07:35:34.250696>  HCI Event: Number of Completed Packets (0x13)
>> plen 5
>>     handle 256 packets 1
>> 2000-01-02 07:35:34.250733>  ACL data: handle 256 flags 0x02 dlen 12
>>     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
>> 2000-01-02 07:35:34.250962<  ACL data: handle 256 flags 0x02 dlen 12
>>     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
>> 2000-01-02
>> # Hang here
>>
>> # Pressed CTL-C on remote "sdptool records 00:80:37:2F:5A:77"
>> 07:35:34.260581>  HCI Event: Number of Completed Packets (0x13) plen 5
>>     handle 256 packets 1
>> 2000-01-02 07:35:34.280679>  ACL data: handle 256 flags 0x02 dlen 12
>>     L2CAP(s): Connect req: psm 1 scid 0x0042
>> 2000-01-02 07:35:34.280930<  ACL data: handle 256 flags 0x02 dlen 16
>>     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
>>       Connection successful
>> 2000-01-02 07:35:34.300522>  HCI Event: Number of Completed Packets (0x13)
>> plen 5
>>     handle 256 packets 1
>>
>> ...
>>
>>
>> Thanks
>>
>> Grahame Jordan
>>
>>
>> On 24/11/10 04:51, Vinicius Costa Gomes wrote:
>>
>>> On 16:37 Tue 23 Nov     , Grahame Jordan wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> I am using bluez-4.77 on a Gumstix Verdex kernel 2.4.32 patch 21
>>>>
>>>> When I run:
>>>> sdptool records 00:80:37:2F:06:08"
>>>> from the Workstation Ubuntu 10.04 Bluez-4.6? to the Gumstix the Gumstix
>>>> hangs.
>>>> It does not hang completely but is very busy. It hangs for about 20
>>>> seconds and then releases for about 1 second
>>>> before it locks up again.
>>>>
>>>>
>>> I couldn't find anything that could solve this kind of problem in the logs
>>> between 4.6 and the git head. But anyway, could you give a try to 4.80, or
>>> better yet, the git head[1]? and see if the problem still happens?
>>>
>>>
>>>
>>>> I have tried this on several different Gumstix with the same issue.
>>>>
>>>> Changing workstations from Ubuntu 10.04 to Ubuntu 8.04 does make a
>>>> difference.
>>>>   From Ubuntu 8.04 there seems to be no problem. blue-utils 3.26?
>>>>
>>>>
>>>>
>>> A really helpful piece of information that you could provide is the
>>> hcidump[2]
>>> logs of both cases, just be sure to give hcidump the options "-V" (verbose
>>> output) and "-t" (timestamps, to see where the hang happens).
>>>
>>>
>>>
>>>> Appreciate help
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Grahame Jordan
>>>> --
>>>> 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
>>>>
>>>>
>>> Cheers,
>>>
>>>
>>
>>
>>
>> --
>> 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
>>
>>
>
> Cheers,
>

# sdptool records from Ubuntu 8.04
HCI sniffer - Bluetooth packet analyzer ver 1.42
device: hci0 snap_len: 1028 filter: 0xffffffff
 > ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo rsp: dlen 44
 > ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 229
     L2CAP(d): cid 0x0040 len 225 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo req: dlen 44
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo rsp: dlen 44
< ACL data: handle 256 flags 0x02 dlen 269
     L2CAP(d): cid 0x0040 len 265 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0041 result 4 status 0
       Connection refused - no resources available
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo req: dlen 44
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo rsp: dlen 44
 > ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 229
     L2CAP(d): cid 0x0040 len 225 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 269
     L2CAP(d): cid 0x0040 len 265 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0041 result 4 status 0
       Connection refused - no resources available
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo req: dlen 44
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo rsp: dlen 44
 > ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 229
     L2CAP(d): cid 0x0040 len 225 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0041 result 4 status 0
       Connection refused - no resources available
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 269
     L2CAP(d): cid 0x0040 len 265 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo req: dlen 44
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo rsp: dlen 44
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10000
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 98
     L2CAP(d): cid 0x0041 len 94 [psm 1]
         SDP SA Rsp: tid 0x0 len 0x59
           count 86
           aid 0x0000 (SrvRecHndl)
              uint 0x10000
           aid 0x0001 (SrvClassIDList)
              < uuid-16 0x1117 (GN) >
           aid 0x0004 (ProtocolDescList)
              < < uuid-16 0x0100 (L2CAP) uint 0xf > <
              uuid-16 0x000f (BNEP) uint 0x100 > >
           aid 0x0005 (BrwGrpList)
              < uuid-16 0x1002 (PubBrwsGrp) >
           aid 0x0009 (BTProfileDescList)
              < < uuid-16 0x1117 (GN) uint 0x100 > >
           aid 0x0100 (SrvName)
              str "Group Network Service"
           cont 00
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10001
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0042 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10002
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0041 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
       Connection successful
< ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
 > ACL data: handle 256 flags 0x02 dlen 229
     L2CAP(d): cid 0x0040 len 225 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10003
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0042 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 269
     L2CAP(d): cid 0x0040 len 265 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10004
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0041 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
       Connection successful
< ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo req: dlen 44
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
 > ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo rsp: dlen 44
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10005
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0042 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10006
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0041 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10007
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0042 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10008
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0041 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10009
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0042 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x1000a
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0041 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x1000b
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0042 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x1000c
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0041 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x1000d
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0042 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo req: dlen 44
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 52
     L2CAP(s): Echo rsp: dlen 44
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x1000e
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0041 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 0 status 0
       Connection successful
< ACL data: handle 256 flags 0x02 dlen 67
     L2CAP(d): cid 0x0040 len 63 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0042 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0042 flags 0x00 clen 0
 > ACL data: handle 256 flags 0x02 dlen 229
     L2CAP(d): cid 0x0040 len 225 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x1000f
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00
< ACL data: handle 256 flags 0x02 dlen 11
     L2CAP(d): cid 0x0042 len 7 [psm 1]
         SDP Error Rsp: tid 0x0 len 0x2
           code 0x2 info none
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn req: dcid 0x0041 scid 0x0042
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Connect req: psm 1 scid 0x0041
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0042
< ACL data: handle 256 flags 0x02 dlen 16
     L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
       Connection successful
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
< ACL data: handle 256 flags 0x02 dlen 269
     L2CAP(d): cid 0x0040 len 265 [psm 0]
< ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
< ACL data: handle 256 flags 0x02 dlen 12
     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > HCI Event: Number of Completed Packets (0x13) plen 5
 > ACL data: handle 256 flags 0x02 dlen 59
     L2CAP(d): cid 0x0040 len 55 [psm 0]
 > ACL data: handle 256 flags 0x02 dlen 18
     L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
       MTU 672
 > ACL data: handle 256 flags 0x02 dlen 23
     L2CAP(d): cid 0x0041 len 19 [psm 1]
         SDP SA Req: tid 0x0 len 0xe
           handle 0x10010
           max 65535
           aid(s) 0x0000 - 0xffff
           cont 00



^ permalink raw reply

* Re: [PATCH v2] Emit Connect signal for LE capable devices
From: Johan Hedberg @ 2010-11-29 20:22 UTC (permalink / raw)
  To: Sheldon Demario; +Cc: linux-bluetooth
In-Reply-To: <1291055789-3733-1-git-send-email-sheldon.demario@openbossa.org>

Hi Sheldon,

On Mon, Nov 29, 2010, Sheldon Demario wrote:
> ---
>  plugins/hciops.c |   61 +++++++++++++++++++++++++++++++++++++++++++++++------
>  1 files changed, 54 insertions(+), 7 deletions(-)

Pushed upstream. Thanks.

Johan

^ permalink raw reply

* [PATCH v2] Emit Connect signal for LE capable devices
From: Sheldon Demario @ 2010-11-29 18:36 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sheldon Demario
In-Reply-To: <20101129125208.GA15399@jh-x301>

---
 plugins/hciops.c |   61 +++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 54 insertions(+), 7 deletions(-)

diff --git a/plugins/hciops.c b/plugins/hciops.c
index e5678d7..c446fd0 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -1266,6 +1266,42 @@ static inline void conn_complete(int index, void *ptr)
 		free(str);
 }
 
+static inline void le_conn_complete(int index, void *ptr)
+{
+	evt_le_connection_complete *evt = ptr;
+	char filename[PATH_MAX];
+	char local_addr[18], peer_addr[18], *str;
+	struct btd_adapter *adapter;
+
+	adapter = manager_find_adapter(&BDADDR(index));
+	if (!adapter) {
+		error("Unable to find matching adapter");
+		return;
+	}
+
+	btd_event_conn_complete(&BDADDR(index), evt->status,
+					btohs(evt->handle), &evt->peer_bdaddr);
+
+	if (evt->status)
+		return;
+
+	update_lastused(&BDADDR(index), &evt->peer_bdaddr);
+
+	/* check if the remote version needs be requested */
+	ba2str(&BDADDR(index), local_addr);
+	ba2str(&evt->peer_bdaddr, peer_addr);
+
+	create_name(filename, sizeof(filename), STORAGEDIR, local_addr,
+							"manufacturers");
+
+	str = textfile_get(filename, peer_addr);
+	if (!str)
+		btd_adapter_get_remote_version(adapter, btohs(evt->handle),
+									TRUE);
+	else
+		free(str);
+}
+
 static inline void disconn_complete(int index, void *ptr)
 {
 	evt_disconn_complete *evt = ptr;
@@ -1306,17 +1342,11 @@ static inline void conn_request(int index, void *ptr)
 	btd_event_remote_class(&BDADDR(index), &evt->bdaddr, class);
 }
 
-static inline void le_metaevent(int index, void *ptr)
+static inline void le_advertising_report(int index, evt_le_meta_event *meta)
 {
-	evt_le_meta_event *meta = ptr;
 	le_advertising_info *info;
 	uint8_t num, i;
 
-	DBG("hci%d LE Meta Event %u", index, meta->subevent);
-
-	if (meta->subevent != EVT_LE_ADVERTISING_REPORT)
-		return;
-
 	num = meta->data[0];
 	info = (le_advertising_info *) (meta->data + 1);
 
@@ -1326,6 +1356,23 @@ static inline void le_metaevent(int index, void *ptr)
 	}
 }
 
+static inline void le_metaevent(int index, void *ptr)
+{
+	evt_le_meta_event *meta = ptr;
+
+	DBG("hci%d LE Meta Event %u", index, meta->subevent);
+
+	switch (meta->subevent) {
+	case EVT_LE_ADVERTISING_REPORT:
+		le_advertising_report(index, meta);
+		break;
+
+	case EVT_LE_CONN_COMPLETE:
+		le_conn_complete(index, meta->data);
+		break;
+	}
+}
+
 static void stop_hci_dev(int index)
 {
 	GIOChannel *chan = CHANNEL(index);
-- 
1.7.3.2


^ permalink raw reply related

* Re: [PATCH] Attrib server should truncate attribute value to pdu length
From: Johan Hedberg @ 2010-11-29 17:25 UTC (permalink / raw)
  To: Sheldon Demario; +Cc: linux-bluetooth
In-Reply-To: <1291034662-6138-1-git-send-email-sheldon.demario@openbossa.org>

Hi Sheldon,

On Mon, Nov 29, 2010, Sheldon Demario wrote:
> When the size of attribute value is greater than pdu size, it should be
> truncated to the pdu length - 2
> ---
>  attrib/att.c |   15 +++++++--------
>  1 files changed, 7 insertions(+), 8 deletions(-)

Pushed upstream. Thanks.

Johan

^ permalink raw reply

* Re: [PATCH 1/5] Implements primary service search when creating a device
From: Johan Hedberg @ 2010-11-29 17:21 UTC (permalink / raw)
  To: Claudio Takahasi; +Cc: linux-bluetooth
In-Reply-To: <1290565847-17382-1-git-send-email-claudio.takahasi@openbossa.org>

Hi Claudio,

On Wed, Nov 24, 2010, Claudio Takahasi wrote:
> Discover primary services implemented inside the device entity to allow
> proper integration of attribute plugin. Implements a single entry point
> to the attribute plugin no matter the transport(BR/EDR or LE), the device
> probe callback is called for both types.
> 
> Add a new function to discover all primary services without additional
> calls to fetch the remaining primary services, sub-procedure iterations
> is handled inside this function.
> 
> The next action are: clean the attribute client removing implicity service
> and characteristics discovery, issue the Discover Primary Service based on
> the remote properties and fetch the characteristic on demand.
> ---
>  attrib/manager.c  |   27 +++-------
>  src/device.c      |  106 +++++++++++++++++++++++++++++++-------
>  src/glib-helper.c |  147 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  src/glib-helper.h |    5 ++
>  4 files changed, 246 insertions(+), 39 deletions(-)

All five patches have been pushed upstream. Thanks.

Johan

^ permalink raw reply

* [PATCH v3] Bluetooth: Fix error handling for l2cap_init()
From: Anderson Lizardo @ 2010-11-29 16:15 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

create_singlethread_workqueue() may fail with errors such as -ENOMEM. If
this happens, the return value is not set to a negative value and the
module load will succeed. It will then crash on module unload because of
a destroy_workqueue() call on a NULL pointer.

Additionally, the _busy_wq workqueue is not being destroyed if any
errors happen on l2cap_init().

Signed-off-by: Anderson Lizardo <anderson.lizardo@openbossa.org>
---
 net/bluetooth/l2cap.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 12b4aa2..a1c7ae8 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -4871,8 +4871,10 @@ static int __init l2cap_init(void)
 		return err;
 
 	_busy_wq = create_singlethread_workqueue("l2cap");
-	if (!_busy_wq)
-		goto error;
+	if (!_busy_wq) {
+		proto_unregister(&l2cap_proto);
+		return -ENOMEM;
+	}
 
 	err = bt_sock_register(BTPROTO_L2CAP, &l2cap_sock_family_ops);
 	if (err < 0) {
@@ -4900,6 +4902,7 @@ static int __init l2cap_init(void)
 	return 0;
 
 error:
+	destroy_workqueue(_busy_wq);
 	proto_unregister(&l2cap_proto);
 	return err;
 }
-- 
1.7.0.4


^ permalink raw reply related

* Re: [PATCH] Removed unused define
From: Johan Hedberg @ 2010-11-29 15:02 UTC (permalink / raw)
  To: Claudio Takahasi; +Cc: linux-bluetooth
In-Reply-To: <1291037054-22247-1-git-send-email-claudio.takahasi@openbossa.org>

Hi Claudio,

On Mon, Nov 29, 2010, Claudio Takahasi wrote:
> ---
>  src/device.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/src/device.c b/src/device.c
> index 77353a4..65acc08 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -57,7 +57,6 @@
>  #include "storage.h"
>  #include "btio.h"
>  
> -#define DEFAULT_XML_BUF_SIZE	1024
>  #define DISCONNECT_TIMER	2
>  #define DISCOVERY_TIMER		2

Pushed upstream. Thanks.

Johan

^ permalink raw reply

* Re: [PATCH] Fix problem with fetching 0.vcf vCard entry
From: Johan Hedberg @ 2010-11-29 14:13 UTC (permalink / raw)
  To: Rafal Michalski; +Cc: linux-bluetooth
In-Reply-To: <1291038716-7244-1-git-send-email-michalski.raf@gmail.com>

Hi Rafal,

On Mon, Nov 29, 2010, Rafal Michalski wrote:
> Previously after attempting to get single 0.vcf vCard entry from phonebook
> ("telecom/pb/0.vcf") "Not Found" status was received and this entry wasn't
> downloaded. Now "OK" status is received and valid 0.vcf vCard entry is
> downloaded.
> ---
>  plugins/phonebook-tracker.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Pushed upstream. Thanks.

Johan

^ permalink raw reply

* Re: [PATCH] Emit Connect signal for LE capable devices
From: Johan Hedberg @ 2010-11-29 14:05 UTC (permalink / raw)
  To: Sheldon Demario; +Cc: linux-bluetooth
In-Reply-To: <4CF3ABD4.6080809@openbossa.org>

Hi Sheldon,

On Mon, Nov 29, 2010, Sheldon Demario wrote:
> On 11/29/2010 07:52 AM, Johan Hedberg wrote:
> >Hi Sheldon,
> >
> >On Thu, Nov 25, 2010, Sheldon Demario wrote:
> >>+	if (le) {
> >>+		evt_le_connection_complete *evt = ptr;
> >>+		evt_bdaddr =&evt->peer_bdaddr;
> >>+		evt_handle = evt->handle;
> >>+		evt_status = evt->status;
> >>+	}  else {
> >>+		evt_conn_complete *evt = ptr;
> >>+		evt_bdaddr =&evt->bdaddr;
> >>+		evt_handle = evt->handle;
> >>+		evt_status = evt->status;
> >>+
> >>+		if (evt->link_type != ACL_LINK)
> >>+			return;
> >>+	}
> >Instead of this kind of trickery, I have a feeling that the code would
> >be easier to read if you had a separate function for the LE connect
> >complete. Could try try to come up with a patch that does it like that?
> 
> For sure, but don't you think that doing this way there will be a
> lot of duplicated code?

There will be more code, but not a lot (I'm guessing 10 lines or so
more). In the end readability & maintainability wins over that. It's
also possible that we'll need more special casing for the LE events
(e.g. wrt. random addresses) in the future so having it separate will
help there too.

Johan

^ permalink raw reply

* [PATCH] Fix problem with fetching 0.vcf vCard entry
From: Rafal Michalski @ 2010-11-29 13:51 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Rafal Michalski

Previously after attempting to get single 0.vcf vCard entry from phonebook
("telecom/pb/0.vcf") "Not Found" status was received and this entry wasn't
downloaded. Now "OK" status is received and valid 0.vcf vCard entry is
downloaded.
---
 plugins/phonebook-tracker.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 20053f6..a6b9e72 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -943,7 +943,7 @@
 	"nco:phoneNumber(?t) \"NOTACALL\" \"false\" \"false\" <%s> "	\
 	"WHERE { "							\
 		"<%s> a nco:Contact . "					\
-		"<%s> nco:hasPhoneNumber ?t . "				\
+		"OPTIONAL { <%s> nco:hasPhoneNumber ?t . } "		\
 	"} "
 
 #define CONTACTS_COUNT_QUERY						\
-- 
1.6.3.3


^ permalink raw reply related

* Re: [PATCH] hcid header cleanup
From: Johan Hedberg @ 2010-11-29 13:35 UTC (permalink / raw)
  To: Claudio Takahasi; +Cc: linux-bluetooth
In-Reply-To: <1291037054-22247-2-git-send-email-claudio.takahasi@openbossa.org>

Hi Claudio,

On Mon, Nov 29, 2010, Claudio Takahasi wrote:
> ---
>  src/hcid.h |    5 -----
>  1 files changed, 0 insertions(+), 5 deletions(-)

Applied. Thanks.

Johan

^ permalink raw reply

* Re: [PATCH] Emit Connect signal for LE capable devices
From: Sheldon Demario @ 2010-11-29 13:34 UTC (permalink / raw)
  To: linux-bluetooth, Johan Hedberg
In-Reply-To: <20101129125208.GA15399@jh-x301>

On 11/29/2010 07:52 AM, Johan Hedberg wrote:
> Hi Sheldon,
>
> On Thu, Nov 25, 2010, Sheldon Demario wrote:
>> +	if (le) {
>> +		evt_le_connection_complete *evt = ptr;
>> +		evt_bdaddr =&evt->peer_bdaddr;
>> +		evt_handle = evt->handle;
>> +		evt_status = evt->status;
>> +	}  else {
>> +		evt_conn_complete *evt = ptr;
>> +		evt_bdaddr =&evt->bdaddr;
>> +		evt_handle = evt->handle;
>> +		evt_status = evt->status;
>> +
>> +		if (evt->link_type != ACL_LINK)
>> +			return;
>> +	}
> Instead of this kind of trickery, I have a feeling that the code would
> be easier to read if you had a separate function for the LE connect
> complete. Could try try to come up with a patch that does it like that?

For sure, but don't you think that doing this way there will be a lot of 
duplicated code?

Sheldon.

^ permalink raw reply

* [PATCH] hcid header cleanup
From: Claudio Takahasi @ 2010-11-29 13:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Claudio Takahasi
In-Reply-To: <1291037054-22247-1-git-send-email-claudio.takahasi@openbossa.org>

---
 src/hcid.h |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/src/hcid.h b/src/hcid.h
index a9484a6..2e16328 100644
--- a/src/hcid.h
+++ b/src/hcid.h
@@ -23,9 +23,6 @@
  *
  */
 
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-
 /*
  * Scanning modes, used by DEV_SET_MODE
  * off: remote devices are not allowed to find or connect to this device
@@ -62,8 +59,6 @@ struct main_opts {
 	uint8_t		mode;
 	uint8_t		discov_interval;
 	char		deviceid[15]; /* FIXME: */
-
-	int		sock;
 };
 
 enum {
-- 
1.7.3.2


^ permalink raw reply related

* [PATCH] Removed unused define
From: Claudio Takahasi @ 2010-11-29 13:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Claudio Takahasi

---
 src/device.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/device.c b/src/device.c
index 77353a4..65acc08 100644
--- a/src/device.c
+++ b/src/device.c
@@ -57,7 +57,6 @@
 #include "storage.h"
 #include "btio.h"
 
-#define DEFAULT_XML_BUF_SIZE	1024
 #define DISCONNECT_TIMER	2
 #define DISCOVERY_TIMER		2
 
-- 
1.7.3.2


^ permalink raw reply related

* Re: [PATCH] Emit Connect signal for LE capable devices
From: Johan Hedberg @ 2010-11-29 12:52 UTC (permalink / raw)
  To: Sheldon Demario; +Cc: linux-bluetooth
In-Reply-To: <1290705769-15487-1-git-send-email-sheldon.demario@openbossa.org>

Hi Sheldon,

On Thu, Nov 25, 2010, Sheldon Demario wrote:
> +	if (le) {
> +		evt_le_connection_complete *evt = ptr;
> +		evt_bdaddr = &evt->peer_bdaddr;
> +		evt_handle = evt->handle;
> +		evt_status = evt->status;
> +	}  else {
> +		evt_conn_complete *evt = ptr;
> +		evt_bdaddr = &evt->bdaddr;
> +		evt_handle = evt->handle;
> +		evt_status = evt->status;
> +
> +		if (evt->link_type != ACL_LINK)
> +			return;
> +	}

Instead of this kind of trickery, I have a feeling that the code would
be easier to read if you had a separate function for the LE connect
complete. Could try try to come up with a patch that does it like that?

Johan

^ permalink raw reply

* [PATCH] Attrib server should truncate attribute value to pdu length
From: Sheldon Demario @ 2010-11-29 12:44 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sheldon Demario

When the size of attribute value is greater than pdu size, it should be
truncated to the pdu length - 2
---
 attrib/att.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/attrib/att.c b/attrib/att.c
index 8655e5e..445b192 100644
--- a/attrib/att.c
+++ b/attrib/att.c
@@ -379,7 +379,7 @@ uint16_t dec_read_by_type_req(const uint8_t *pdu, int len, uint16_t *start,
 uint16_t enc_read_by_type_resp(struct att_data_list *list, uint8_t *pdu, int len)
 {
 	uint8_t *ptr;
-	int i, w;
+	int i, w, l;
 
 	if (list == NULL)
 		return 0;
@@ -387,17 +387,16 @@ uint16_t enc_read_by_type_resp(struct att_data_list *list, uint8_t *pdu, int len
 	if (pdu == NULL)
 		return 0;
 
-	if (len < list->len + 2)
-		return 0;
+	l = MIN(len - 2, list->len);
 
 	pdu[0] = ATT_OP_READ_BY_TYPE_RESP;
-	pdu[1] = list->len;
+	pdu[1] = l;
 	ptr = &pdu[2];
 
-	for (i = 0, w = 2; i < list->num && w + list->len <= len; i++) {
-		memcpy(ptr, list->data[i], list->len);
-		ptr += list->len;
-		w += list->len;
+	for (i = 0, w = 2; i < list->num && w + l <= len; i++) {
+		memcpy(ptr, list->data[i], l);
+		ptr += l;
+		w += l;
 	}
 
 	return w;
-- 
1.7.3.2


^ permalink raw reply related

* Re: [PATCH] Bluetooth: Add new PID for Atheros 3011
From: Alexander Holler @ 2010-11-29 11:28 UTC (permalink / raw)
  To: Bala Shanmugam
  Cc: Shanmugamkamatchi Balashanmugam, Marcel Holtmann,
	linux-bluetooth@vger.kernel.org
In-Reply-To: <4CF343A1.8010606@atheros.com>

Am 29.11.2010 07:09, schrieb Bala Shanmugam:

> This patch is for Atheros 3011 with sflash firmware.
> This device gets identified Generic bluetooth USB device when plugged in.
> We are blacklisting 3002 in btusb to load actual firmware in ath3k.
> Latest firmware comes up with PID 3005 and not 3002.

Thanks for the explanation. Is there a place in the web where the latest 
firmware could be found?

The only place I've found to look at was the linux-firmware repository 
and that repo currently has no new firmware for the ath3k.

Btw., did you have a look at the small patch for ath3k I posted lately:

http://marc.info/?l=linux-bluetooth&m=129045856314243

This avoids storing the firmware in RAM (I don't see a reason to do 
that, it is never used again) and simplifies the small driver a bit.

Regards,

Alexander

^ permalink raw reply

* Re: [PATCH] Bluetooth: Add new PID for Atheros 3011
From: Bala Shanmugam @ 2010-11-29  6:09 UTC (permalink / raw)
  To: Alexander Holler
  Cc: Shanmugamkamatchi Balashanmugam, Marcel Holtmann,
	linux-bluetooth@vger.kernel.org
In-Reply-To: <4CEFD855.6000503@ahsoftware.de>

Alexander Holler wrote:
> Am 26.11.2010 16:40, schrieb Alexander Holler:
>   
>> Hello,
>>
>> Am 26.11.2010 13:10, schrieb Bala Shanmugam:
>>     
>>> Marcel Holtmann wrote:
>>>       
>>>> Hi Bala,
>>>>
>>>>         
>>>>> Atheros 3011 has small sflash firmware and needs to be
>>>>> blacklisted in transport driver to load actual firmware
>>>>> in DFU driver.
>>>>>           
>>>> please add an empty line here. The signed-off line should always be
>>>> separated from the commit message. The git am takes it literal as it is
>>>> and does not modify it.
>>>>
>>>>         
>>>>> Signed-off-by: Bala Shanmugam <sbalashanmugam@atheros.com>
>>>>> ---
>>>>> drivers/bluetooth/ath3k.c | 2 ++
>>>>> drivers/bluetooth/btusb.c | 3 +++
>>>>> 2 files changed, 5 insertions(+), 0 deletions(-)
>>>>>
>>>>> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
>>>>> index 128cae4..c70fb0b 100644
>>>>> --- a/drivers/bluetooth/ath3k.c
>>>>> +++ b/drivers/bluetooth/ath3k.c
>>>>> @@ -35,6 +35,8 @@
>>>>> static struct usb_device_id ath3k_table[] = {
>>>>> /* Atheros AR3011 */
>>>>> { USB_DEVICE(0x0CF3, 0x3000) },
>>>>>           
>>>> For the sake of readability add another empty line here as well.
>>>>
>>>>         
>>>>> + /* Atheros AR3011 with sflash firmware*/
>>>>> + { USB_DEVICE(0x0CF3, 0x3002) },
>>>>>           
>> I don't understand this patch and starting bluetooth will fail here,
>> when that patch is applied (to 2.6.36.1):
>>
>> -----------
>> [ 118.395793] usb 1-1.3: new full speed USB device using orion-ehci and
>> address 4
>> [ 118.506262] usb 1-1.3: New USB device found, idVendor=0cf3,
>> idProduct=3000
>> [ 118.506280] usb 1-1.3: New USB device strings: Mfr=0, Product=0,
>> SerialNumber=0
>> [ 118.654973] Bluetooth: Atheros AR30xx firmware driver ver 1.0
>> [ 119.072139] usbcore: registered new interface driver ath3k
>> [ 119.184499] usb 1-1.3: USB disconnect, address 4
>> [ 120.695642] usb 1-1.3: new full speed USB device using orion-ehci and
>> address 5
>> [ 120.806394] usb 1-1.3: New USB device found, idVendor=0cf3,
>> idProduct=3002
>> [ 120.806410] usb 1-1.3: New USB device strings: Mfr=0, Product=0,
>> SerialNumber=0
>> [ 125.815007] ath3k_load_firmware: Can't change to loading configuration
>> err
>> [ 125.815096] ath3k: probe of 1-1.3:1.0 failed with error -5
>> -----------
>>
>> As I've understood it, the pid 0x3002 will only come up, when the
>> firmwire was already uploaded. So adding 0x3002 to ath3k seems to be wrong.
>>     
>
> I assume bluetooth will fail here, because of the second part of that 
> patch which adds BTUSB_IGNORE to btusb.c:
>
> ------------
> +    /* Atheros 3011 with sflash firmware */
> +    { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
> ------------
>
> This means when the firmware was uploaded and the device identifies 
> itself afterwards with the pid 0x3002, btusb will ignore it.
>
> Regards,
>
> Alexander
>   
Alex,

This patch is for Atheros 3011 with sflash firmware.
This device gets identified Generic bluetooth USB device when plugged in.
We are blacklisting 3002 in btusb to load actual firmware in ath3k.
Latest firmware comes up with PID 3005 and not 3002.

Regards,
Bala.

^ permalink raw reply

* Re: wi2wi bluecore4
From: Brad Midgley @ 2010-11-28 16:22 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <AANLkTi=k=Dvsm6fySREejtP3sf7Cch3G2KYr4sYpg2Q4@mail.gmail.com>

forgot to mention... just doing the most straightforward hciattach
also won't work

# hciattach -s 115200 ttyS1 csr 921600
CSR build ID 0x0C-0x5C
Device setup complete
root@omap3-multi:~# hciconfig
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
        DOWN
        RX bytes:0 acl:0 sco:0 events:0 errors:0
        TX bytes:4 acl:0 sco:0 commands:1 errors:0

root@omap3-multi:~# hciconfig hci0 up
Can't init device hci0: Connection timed out (110)
root@omap3-multi:~# hciconfig hci0 revision
Can't read version info for hci0: Network is down (100)

-- 
Brad Midgley

^ permalink raw reply

* wi2wi bluecore4
From: Brad Midgley @ 2010-11-28 16:12 UTC (permalink / raw)
  To: linux-bluetooth

Hey

The gumstix overo comes with a wi2wi chip with a bluecore4-rom. I have
been unable to switch it to a baud rate other than 115k or to change
its SCO mapping. Any ideas?

I tried using bccmd before hciattaching the device but I can't find
any settings that get past a timeout. Once a timeout is reported, I
have to reset the board to try anything else.

# bccmd -t BCSP -d /dev/ttyS1 psset -r baudrate 0xEBF
Initialization timed out

I can hciattach it first, then use bccmd over hci, but as soon as I
try to change the baud then the chip won't talk to me any more.

# hciattach ttyS1 csr 115200
CSR build ID 0x0C-0x5C
Device setup complete
# bccmd psget baudrate
UART Baud rate: 0x01d8 (472)
# bccmd psset -r baudrate 0xEBF
# killall hciattach
# hciattach ttyS1 csr 921600 # also tried with "-s 115200"
Initialization timed out.

and fwiw, checking the SCO mapping gives me a strange result.

# bccmd psget mapsco
Can't execute command: No such device or address (6)

I tried changing the hardcoded 38k baud to 115k in csr_bsp.c just in
case that was why it won't talk directly to the chip, no luck.

fwiw, the chip reports

# hciconfig hci0 revision
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 00:19:88:0A:77:65  ACL MTU: 310:10  SCO MTU: 64:8
        Unified 21e
        Chip version: BlueCore4-ROM
        Max key size: 128 bit
        SCO mapping:  PCM

Is there anything else I could try here?

-- 
Brad Midgley

^ 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