Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-users@lists.sourceforge.net
Subject: Re: [Bluez-users] error on connect
Date: Wed, 20 Apr 2005 00:32:08 +0200	[thread overview]
Message-ID: <1113949928.2469.88.camel@pegasus> (raw)
In-Reply-To: <4265820A.2000400@gmx.ch>

Hi Marco,

> >>- The ACL packet that cause the problem is sent before the connection is 
> >>etablished. This is ok and defined in the specification.
> > 
> > this is not ok and can also not happen since you only get the connection
> > handle from the connect complete event. In BlueZ this is indicated with
> > the hci_proto_connect_cfm() and only at that time the L2CAP layer starts
> > sending out its connect request. Please check the sender side again.
> 
> yes. I got this wrong. this way it makes much more sense...

please do a "hcidump -X -V" for the sender side, too. I like to look how
the Broadcom responds here.

> >>- the broadcom dongle seem to don't handle this correct. they probably 
> >>suffer a race condition. so they may work or may not work.
> > 
> > Maybe the stacks Broadcom tested their dongles with are needing some
> > time before they can send out the first ACL data packet. Or they do
> > other HCI tasks before they start L2CAP. However this is a problem with
> > the dongle, because the ACL data packet is not allowed at that time.
> 
> ok. that leads me to some questions:
> - what would be the behaviour of the listening dongle if you fix the 
> flow control after this error occured?

If this package really corrupts the internal HCI flow control states of
BlueZ then this needs to be fixed. However this will not change anything
of the behavior, because the L2CAP connect request packet will be still
dropped.

> - (just curious) How can you find out that this packet was processed too 
> early? does bluez always know the order of processed packets like the 
> hcidump shows?

The hcidump order should match the kernel queue order. Nobody really
verified this, but I doubt that there is a problem.

> - Are you interested in having this ACL datapacket queue you supposed 
> inside bluez (kernel)? respectively, did you mean to do this in the program?

This must be done inside the kernel and it will be an ugly workaround.

> and two comments:
> - you told bluez might be too fast for ednet. actually bluez looks like 
> it's too fast for the nokia 6230 too. i've to wait 1 second before I 
> close a connection, else the mobile phone doesn't get all packets.
> maybee this is a bigger problem (the speed thing)...

I meant this in comparison to the Windows stacks. We will do the final
setup of the ACL link (packet type etc.) at the same time the L2CAP
layer already sends its first commands. This is because BlueZ is fully
multi-threaded and not one stupid state machine for all layers thing.

> - I made a try with windows. it played the listening part with the 
> broadcom dongle. Unfortunately i haven't a hcidump here, but from more 
> than 100 connection tries, every single one worked...
> but as I said, this is not reliable because I don't know what windows is 
> doing in background...

If this is the Widcomm stack you can look at it with Spylite. For the XP
stack I have no idea how to do that without an USB sniffer.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

  reply	other threads:[~2005-04-19 22:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-15 17:52 [Bluez-users] error on connect Marco Trudel
2005-04-15 23:20 ` Marcel Holtmann
2005-04-16 19:07   ` Marco Trudel
2005-04-16 20:09     ` Marcel Holtmann
2005-04-17  1:33       ` Marco Trudel
2005-04-17  1:46         ` Marcel Holtmann
2005-04-17 10:17           ` Marco Trudel
2005-04-18 18:13             ` Marco Trudel
2005-04-18 18:41               ` Marcel Holtmann
2005-04-19 14:48                 ` Marco Trudel
2005-04-19 15:13                   ` Marcel Holtmann
2005-04-19 15:24                     ` Marco Trudel
2005-04-19 15:47                       ` Marcel Holtmann
2005-04-19 16:00                         ` Marco Trudel
2005-04-19 16:13                           ` Marcel Holtmann
2005-04-19 16:32                             ` Marco Trudel
2005-04-19 16:51                               ` Marcel Holtmann
2005-04-19 22:11                                 ` Marco Trudel
2005-04-19 22:32                                   ` Marcel Holtmann [this message]
2005-04-20 12:17                                     ` Marco Trudel
2005-04-20 12:32                                       ` Marcel Holtmann
2005-04-20 12:44                                         ` Marco Trudel
2005-04-24 12:53                                         ` Marco Trudel
2005-04-24 14:48                                           ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1113949928.2469.88.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox