public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] SDP limiting connections?
@ 2008-02-06  7:29 Pooyan McSporran
  2008-02-06  9:21 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Pooyan McSporran @ 2008-02-06  7:29 UTC (permalink / raw)
  To: BlueZ development

I'm having a strange problem with a BlueZ application.

My application advertises a service via SDP (using dbus etc).
Bluetooth clients scan the area for computers providing this service,
and then connect via SPP to my application, and can then exchange
data.  The connections are handled in the normal socket/bind/listen
method, each connection forks a thread to handle that connection.
(Using BTPROTO_RFCOMM on the socket)

This is working fine, but with one significant problem.  If we have no
connections, clients can scan and connect without problems.  If there
is one current connection, this is still the case.  But if there are
two current connections, then no clients can see the service via SDP.
If another machine tries to (eg) do "sdptool browse <bdaddr>", it gets
a "server is down" message.

But if either of those two connections then are terminated, all is
well once again.  It's as if SDP is refusing to talk to clients once
there are two SPP connections, but is ok with one or zero connections.
 (Doing "sdptool browse local" on the server itself still shows the
service that is advertised, so it is still visible locally, but not
remotely.)

I'm using BlueZ 3.25 on a gentoo system, I've had this problem also with 3.24.

I've tried starting hcid with the -d flag (for debug info), and I can
see the SDP queries with no obvious problems there.  I've also tried
doing "hcidump -X -V" whilst two clients are connected, and if a
remote machine tries to do a "sdptool browse" against my application,
there is no HCI data visible at all.  But if the system is in the
"healthy" state (ie, less than two connections), this does show the
expected HCI traffic.

(The 'backlog' value for listen() is set to 30, so I don't think
that's the problem)

I've tried the same bluetooth adapters on windows, and they do work
with up to seven SPP connections, but obviously with very different
application software.  I've tried two different brands of adapters
with the same result.

In short, it looks as if the BlueZ SDP server is not responding at all
whilst my application has two current SPP connections.  I don't know
if that's what's actually happening, but that's how the symptoms
appear.

Any suggestions?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-06 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-06  7:29 [Bluez-devel] SDP limiting connections? Pooyan McSporran
2008-02-06  9:21 ` Marcel Holtmann
2008-02-06 23:34   ` Pooyan McSporran

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