logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

l2cap connection problems: msg#00046

Subject: l2cap connection problems
I have written a client and server that need to be able to
communicate over Bluetooth.  I am attempting to use L2CAP, but
am not able to consistently connect to the server.  My
application requires the server socket that accepts L2CAP
connections to be non-blocking.  On the client side, I am
using a non-blocking connect (connect with 2 second timeout).
 However, in trying to debug the connection problem, I have
tried using non-blocking sockets at both ends.  Even in this
situation, my results were the same.  Sometimes the connection
is accepted immediately (roughly half the time), the server
begins streaming data to the client, and everything works
great.  Just as frequently, the connection attempt times out
at the client (when the client uses a blocking connect), or
the connection succeeds after some number (potentially very
many) of non-blocking connect attempts.  Occasionally the
connection attempt appears as if it will never succeed.  I
have attached a file containing hcidump output for 3 cases
which are annotated in the file.  In all 3 cases a blocking
accept is used at the server.  It seems as if the HCI layer
events are identical regardless of whether or not the L2CAP
layer accept (server) and connect (client) succeed.  Any
thoughts as to what the problem might be?  For whatever it's
worth, I am using D-Link DBT120 USB adapters.  Thanks in advance.

Troy K. Becicka
Graduate Student
University of Illinois at Urbana-Champaign
Computer Engineering

Attachment: bt_con_debug
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>