public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] can't establish more than two rfcomm connections
@ 2007-09-18 12:48 David Rehle
  2007-09-20  7:13 ` Marcel Holtmann
  2007-10-08 16:02 ` Olivier Le Pogam
  0 siblings, 2 replies; 3+ messages in thread
From: David Rehle @ 2007-09-18 12:48 UTC (permalink / raw)
  To: bluez-devel

Hi all,

i have built a rfcomm server, using bluez-stack. I created a service 
record containing a service-id 0x1234 on rfcomm port 1.

A client can connect sdpd and establish a connection to my tcplike 
rfcomm-server. rfcomm-server first gets a socket, binds it on 
rfcommchannel 1 and listens on that, accepting incomming requests. 
Incomming connections are handled by sysfunction select().

But only two clients can connect at the same time. It seems that sdpd 
can not handle more than two clients.
I tried to make a "sdptool browse", when two clients are connected, but 
it fails with "Host is down"-msg.
(But on the local machine, where rfcomm-server is running "sdptool 
browse local" gives me the correct servicerecord including my 0x1234 
serviceid)

It's weird, why there can connect two clients on one rfcomm-channel 1 
and not only one client, or more than two???

Is there a secret option to tell sdpd how much clients have to be handled?

The first "solution" in my brain was to build another servicerecord with 
same serviceid 0x1234 and let rfcomm-server bind and listen on more than 
one rfcomm-channel. But clients can not communicate with sdpd when two 
connections are established. On my J2ME client i get a "security block" 
exception when trying to connect as third client.

Does somebody got same issues?
Has anybody an idea why only two connections can be established?


Thank you for any suggestions.


with kind regards

David



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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

* Re: [Bluez-devel] can't establish more than two rfcomm connections
  2007-09-18 12:48 [Bluez-devel] can't establish more than two rfcomm connections David Rehle
@ 2007-09-20  7:13 ` Marcel Holtmann
  2007-10-08 16:02 ` Olivier Le Pogam
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2007-09-20  7:13 UTC (permalink / raw)
  To: BlueZ development

Hi David,

> i have built a rfcomm server, using bluez-stack. I created a service 
> record containing a service-id 0x1234 on rfcomm port 1.
> 
> A client can connect sdpd and establish a connection to my tcplike 
> rfcomm-server. rfcomm-server first gets a socket, binds it on 
> rfcommchannel 1 and listens on that, accepting incomming requests. 
> Incomming connections are handled by sysfunction select().
> 
> But only two clients can connect at the same time. It seems that sdpd 
> can not handle more than two clients.
> I tried to make a "sdptool browse", when two clients are connected, but 
> it fails with "Host is down"-msg.
> (But on the local machine, where rfcomm-server is running "sdptool 
> browse local" gives me the correct servicerecord including my 0x1234 
> serviceid)
> 
> It's weird, why there can connect two clients on one rfcomm-channel 1 
> and not only one client, or more than two???
> 
> Is there a secret option to tell sdpd how much clients have to be handled?
> 
> The first "solution" in my brain was to build another servicerecord with 
> same serviceid 0x1234 and let rfcomm-server bind and listen on more than 
> one rfcomm-channel. But clients can not communicate with sdpd when two 
> connections are established. On my J2ME client i get a "security block" 
> exception when trying to connect as third client.
> 
> Does somebody got same issues?
> Has anybody an idea why only two connections can be established?

Please sort out your actual question. You are mixing SDP and RFCOMM and
I can't tell what's actually your problem.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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

* Re: [Bluez-devel] can't establish more than two rfcomm connections
  2007-09-18 12:48 [Bluez-devel] can't establish more than two rfcomm connections David Rehle
  2007-09-20  7:13 ` Marcel Holtmann
@ 2007-10-08 16:02 ` Olivier Le Pogam
  1 sibling, 0 replies; 3+ messages in thread
From: Olivier Le Pogam @ 2007-10-08 16:02 UTC (permalink / raw)
  To: bluez-devel

Hi David,

I think your problem is not BlueZ related.
When your mobile tries to connect to the RFCOMM server, the mobile is in 
master mode (initiating the connection), thus the bluetooth dongle is in 
slave mode.
When you try to connect a second mobile phone concurrently, it will be the 
same but the bluetooth dongle can't have 2 slaves, it can be master with 7 
devices and slave with 1.
A solution would be a role-switching, i.e. once connected the mobile becomes 
slave & the bluetooth dongle master, however, role-switching is usually not 
implemented in mobile phones.
Basically, you can consider have only one RFCOMM connection per dongle from 
a mobile phone.
BlueZ experts, don't hesitate to flame me if i'm wrong.

Oli 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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:[~2007-10-08 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18 12:48 [Bluez-devel] can't establish more than two rfcomm connections David Rehle
2007-09-20  7:13 ` Marcel Holtmann
2007-10-08 16:02 ` Olivier Le Pogam

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