2004-06-09 16:53:48

by Andreas Gaufer

[permalink] [raw]
Subject: [Bluez-devel] HCI Event: Connect Complete with Status 09

Hi,

I get into situations where the chip returnes a "Connect Complete" event
with status MAX NUMBER OF CONNECTIONS (0X09) without having open handles.

The only way to get this Stick back to a usable state is removing power.

There is no connection listed by "hcitool con".

Is there a (even csr specific) way of listing the acl handles that the chip
thinks are open to drop them properly or a vendor specific hci command
(besides "Reset(0x03|0x0003)") to get a "hard" reset?

Greetigs

Andy


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2004-06-10 14:32:20

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] HCI Event: Connect Complete with Status 09

Hi Andreas,

> Same behaviour w/o CONFIG_BT_HCIUSB_SCO. I disribe it again a bit more percise:
>
> hcitool -i hci1 cc 00:0A:D9:37:11:29
>
> < HCI Command: Create Connection(0x01|0x0005) plen 13
> 29 11 37 D9 0A 00 18 CC 02 00 00 00 00
> > HCI Event: Command Status(0x0f) plen 4
> 00 01 05 04
> > HCI Event: Connect Complete(0x03) plen 11
> 00 29 00 29 11 37 D9 0A 00 01 00
>
> hcitool con
> Connections:
> < ACL 00:0A:D9:37:11:29 handle 41 state 1 lm MASTER
>
> hcitool -i hci1 cc 00:0A:D9:37:11:29
> Can't create connection: Input/output error
>
> < HCI Command: Create Connection(0x01|0x0005) plen 13
> 29 11 37 D9 0A 00 18 CC 02 00 00 00 00
> > HCI Event: Command Status(0x0f) plen 4
> 0B 01 05 04
>
> hcitool con
> Connections:
>
> hcitool -i hci1 dc 00:0A:D9:37:11:29
> Get connection info failed: No such file or directory
>
> hcitool -i hci1 cmd 0x01 0x0006 0x29 0x00 0x13
> < HCI Command: ogf 0x01, ocf 0x0006, plen 3
> 29 00 13
> > HCI Event: 0x0f plen 4
> 00 01 06 04
>
>
> So the entry in the list that "hcitool con" prints gets lost when
> the secound cc is issued and fails. The chip still has the handle
> and it can be disconnected with hcitoom cmd.
>
> Im wondering witch part of the bluez Stack is maintaining the
> list and why the entry is dropped in case of a failed cc. I just
> can imagine that all acl handles are dropped that belong to that mac.
>
> IMHO it would be great if a handle could only be removed from the
> list if there is a successfull disconnect.

whoops, this looks really like a bug in the BlueZ stack. When the second
(in this case negative) command status arrives the stack must think of a
create connection failure and drop the connection from its internal list
without sending a disconnect. Check the hci_*.c kernel files.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2004-06-10 14:01:48

by Andreas Gaufer

[permalink] [raw]
Subject: Re: [Bluez-devel] HCI Event: Connect Complete with Status 09

Hi Marcel,

Same behaviour w/o CONFIG_BT_HCIUSB_SCO. I disribe it again a bit more percise:

hcitool -i hci1 cc 00:0A:D9:37:11:29

< HCI Command: Create Connection(0x01|0x0005) plen 13
29 11 37 D9 0A 00 18 CC 02 00 00 00 00
> HCI Event: Command Status(0x0f) plen 4
00 01 05 04
> HCI Event: Connect Complete(0x03) plen 11
00 29 00 29 11 37 D9 0A 00 01 00

hcitool con
Connections:
< ACL 00:0A:D9:37:11:29 handle 41 state 1 lm MASTER

hcitool -i hci1 cc 00:0A:D9:37:11:29
Can't create connection: Input/output error

< HCI Command: Create Connection(0x01|0x0005) plen 13
29 11 37 D9 0A 00 18 CC 02 00 00 00 00
> HCI Event: Command Status(0x0f) plen 4
0B 01 05 04

hcitool con
Connections:

hcitool -i hci1 dc 00:0A:D9:37:11:29
Get connection info failed: No such file or directory

hcitool -i hci1 cmd 0x01 0x0006 0x29 0x00 0x13
< HCI Command: ogf 0x01, ocf 0x0006, plen 3
29 00 13
> HCI Event: 0x0f plen 4
00 01 06 04


So the entry in the list that "hcitool con" prints gets lost when
the secound cc is issued and fails. The chip still has the handle
and it can be disconnected with hcitoom cmd.

Im wondering witch part of the bluez Stack is maintaining the
list and why the entry is dropped in case of a failed cc. I just
can imagine that all acl handles are dropped that belong to that mac.

IMHO it would be great if a handle could only be removed from the
list if there is a successfull disconnect.

Greetings

Andreas Gaufer



On Thu, 10 Jun 2004 12:20:43 +0200
Marcel Holtmann <[email protected]> wrote:

> Hi Andreas,
>
> > Yes, indeed thats close to what im doing. Not within one secoud but very
> > frequently.
>
> do you enabled CONFIG_BT_HCIUSB_SCO? If yes, disable it and try again.
> Our way of consuming USB bandwith with ISOC URB's wasn't liked by some
> of the BlueCore02 firmwares.
>
> Regards
>
> Marcel
>
>

2004-06-10 10:20:43

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] HCI Event: Connect Complete with Status 09

Hi Andreas,

> Yes, indeed thats close to what im doing. Not within one secoud but very
> frequently.

do you enabled CONFIG_BT_HCIUSB_SCO? If yes, disable it and try again.
Our way of consuming USB bandwith with ISOC URB's wasn't liked by some
of the BlueCore02 firmwares.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2004-06-10 10:18:05

by Andreas Gaufer

[permalink] [raw]
Subject: Re: [Bluez-devel] hcitool con list incomplete (was: Connect Complete with Status 09)

Hi,

I dug in a little bit deeper last night and i think its not a problem of the
chip. The list that is printed out by "hcitool con" is incomplete in certain
situations. This leads to various problems with many tools because they try to
connect again witch fails.

If a "create connection" is issiued while there is already a connection the chip
returnes a Connect Complete with status 0x0B witch is absolutely right. The
problem is that the hanlde of the "hcitool con" list is removed but the chip
still keeps it, witch is good behaviour in my opinion. It can be disconected with
"hcitool cmd".

Who or what is keeping this list?

Greetings

Andreas Gaufer


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2004-06-09 19:25:29

by Andreas Gaufer

[permalink] [raw]
Subject: Re: [Bluez-devel] HCI Event: Connect Complete with Status 09

Hi Steven,

i hoped that you will jump on this ;)

On Wed, 09 Jun 2004 18:54:37 +0100
Steven Singer <[email protected]> wrote:

> Andreas Gaufer wrote:
> > I get into situations where the chip returnes a "Connect Complete" event
> > with status MAX NUMBER OF CONNECTIONS (0X09) without having open handles.
>
> How do you get in to this situation? Are you, for example, connecting
> and disconnecting very rapidly (less than 1 second per connection) or

Yes, indeed thats close to what im doing. Not within one secoud but very
frequently.

> are you resetting the remote end of the link without using a proper
> disconnect?

I dont know the other side and i cant tell more than what im seeing through
bluetooth. An what i see is indeed sometimes far from what the specs say.

> Which CSR firmware version are you using?
>
hci1: Type: USB
BD Address: 00:04:61:81:DD:12 ACL MTU: 192:8 SCO MTU: 64:8
HCI 16.14
Chip version: BlueCore02
Max key size: 56 bit
SCO mapping: HCI

> You might want to grab an HCI log and move this discussion to the CSR
> support newsgroup (access details at http://www.csr.com/forum.htm).
> Read the FAQ for a description of suitable log formats.
>
> A summary of the times of the commands and events associated with
> creating and disconnecting any previous connections (including the
> statuses and connection handles in all the events) might be shorter than
> a full log.
>

Ok, ill set up a test case to create the situation. Im happy to put the facts
in the newsgroup. Witch group would be the best ? csr.public.bluecore.firmware ?

Greetings

Andreas Gaufer




-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2004-06-09 17:54:37

by Steven Singer

[permalink] [raw]
Subject: Re: [Bluez-devel] HCI Event: Connect Complete with Status 09

Andreas Gaufer wrote:
> I get into situations where the chip returnes a "Connect Complete" event
> with status MAX NUMBER OF CONNECTIONS (0X09) without having open handles.

How do you get in to this situation? Are you, for example, connecting
and disconnecting very rapidly (less than 1 second per connection) or
are you resetting the remote end of the link without using a proper
disconnect?

Which CSR firmware version are you using?

You might want to grab an HCI log and move this discussion to the CSR
support newsgroup (access details at http://www.csr.com/forum.htm).
Read the FAQ for a description of suitable log formats.

A summary of the times of the commands and events associated with
creating and disconnecting any previous connections (including the
statuses and connection handles in all the events) might be shorter than
a full log.

- Steven
--



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

http://www.mimesweeper.com
**********************************************************************



-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel