2005-03-15 18:48:42

by Pedro Monjo Florit

[permalink] [raw]
Subject: [Bluez-users] Multiple Bluetooth connections

Hi,

In the application that I am developing, I want to send simultaneous
OBEX messages to different OBEX servers over Bluetooth. I am using
OpenOBEX for this purpose. There are two problems I am facing.

On the one hand, it seems that there is only room to establish one
Bluetooth connection at a time. If I start many OBEX pushes
simultaneously, only the first one succeeds. The others fail usually
with error "Device or resource busy" (errno=16); sometimes even with
"Software caused connection abort" (errno=103). Once the first
connection is established and while sending OBEX data, I can establish
another connection.

I just want to make clear that the problem is with the establishment of
the connection. I am fully aware that it is possible to handle various
on-going connections with no problems and I have succeeded with that. Is
there a limitation with Bluetooth or BlueZ that allows only one RFCOMM,
L2CAP or HCI connection establishment?

On the other hand, some connections die before sending the data, but it
seems that the file descriptor of this connection does not receive any
notification (I use select() on all file descriptors, with the file
descriptor in the read mask). I know that this could be due to a problem
with my program, a problem with OpenOBEX or the BlueZ version I am using
(it is not the latest). In any case, to track down the cause, I would
like to know how can I monitor the Bluetooth connections (at any level,
but preferably RFCOMM) that a process (or the whole system) has. What I
am looking for is a tool like netstat.

Thanks & regards,

Pedro Monjo


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2005-03-16 11:44:40

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Multiple Bluetooth connections

Hi Pedro,

> > this is a hardware limit and I don't know of any chip that is capable of
> > establishing two connections at the same time. From what I know this
> > will never be possible, but you should better ask a radio/baseband
> > expert for a correct answer.
> >
> Thank you for the information. Together with the post of Peter
> Stephenson (thank you, Peter), it seems that this problem cannot be
> circumvented as I want to connect to different devices (as I
> understand, various ACL connections; is this right?). I will have to
> live with it. :-(

you can have multiple ACL connections. If this is a CSR chip you need at
least the HCI 16.4 firmware on it. However you can't create them at the
same time. If one is established you can create another one. Up to seven
if you keep the roles (master/slave) correct.

> > > On the other hand, some connections die before sending the data, but it
> > > seems that the file descriptor of this connection does not receive any
> > > notification (I use select() on all file descriptors, with the file
> > > descriptor in the read mask). I know that this could be due to a problem
> > > with my program, a problem with OpenOBEX or the BlueZ version I am using
> > > (it is not the latest). In any case, to track down the cause, I would
> > > like to know how can I monitor the Bluetooth connections (at any level,
> > > but preferably RFCOMM) that a process (or the whole system) has. What I
> > > am looking for is a tool like netstat.
> > >
> >
> > Using poll() or select() is the right way. About what version of the
> > kernel and library/utils are we talking?
> >
> I am using SuSE 9.1 with the latest updates from SuSE: kernel
> 2.6.5-7.147-default, bluez-libs 2.5-43 and bluez-utils 2.4-65. I know
> they are old, so it could perfectly be a problem with them; therefore
> I am planning an upgrade, but I am not quite sure whether I will be
> able to use the latest BlueZ upgrades. The problem with the lost
> established connections does not happen always, so I still have to
> look exactly why this happens. In any case, besides that, everything
> else works as expected. The only thing I am missing is a tool like
> "netstat" for Internet an Unix sockets. "lsof" does not give any
> information either. Is there anything of the like for BlueZ?

We don't have any tool like this. May you wanna check /proc/bluetooth/
and make use of hcidump.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-03-16 11:23:31

by Pedro Monjo Florit

[permalink] [raw]
Subject: Re: [Bluez-users] Multiple Bluetooth connections

Hi Marcel,
>this is a hardware limit and I don't know of any chip that is capable of
>establishing two connections at the same time. From what I know this
>will never be possible, but you should better ask a radio/baseband
>expert for a correct answer.
>
Thank you for the information. Together with the post of Peter
Stephenson (thank you, Peter), it seems that this problem cannot be
circumvented as I want to connect to different devices (as I understand,
various ACL connections; is this right?). I will have to live with it. :-(
>>On the other hand, some connections die before sending the data, but it
>>seems that the file descriptor of this connection does not receive any
>>notification (I use select() on all file descriptors, with the file
>>descriptor in the read mask). I know that this could be due to a problem
>>with my program, a problem with OpenOBEX or the BlueZ version I am using
>>(it is not the latest). In any case, to track down the cause, I would
>>like to know how can I monitor the Bluetooth connections (at any level,
>>but preferably RFCOMM) that a process (or the whole system) has. What I
>>am looking for is a tool like netstat.
>>
>
>Using poll() or select() is the right way. About what version of the
>kernel and library/utils are we talking?
>
I am using SuSE 9.1 with the latest updates from SuSE: kernel
2.6.5-7.147-default, bluez-libs 2.5-43 and bluez-utils 2.4-65. I know
they are old, so it could perfectly be a problem with them; therefore I
am planning an upgrade, but I am not quite sure whether I will be able
to use the latest BlueZ upgrades. The problem with the lost established
connections does not happen always, so I still have to look exactly why
this happens. In any case, besides that, everything else works as
expected. The only thing I am missing is a tool like "netstat" for
Internet an Unix sockets. "lsof" does not give any information either.
Is there anything of the like for BlueZ?

In any, case, thanks for the help.

Pedro

2005-03-16 09:42:10

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Multiple Bluetooth connections

Hi Pedro,

> In the application that I am developing, I want to send simultaneous
> OBEX messages to different OBEX servers over Bluetooth. I am using
> OpenOBEX for this purpose. There are two problems I am facing.
>
> On the one hand, it seems that there is only room to establish one
> Bluetooth connection at a time. If I start many OBEX pushes
> simultaneously, only the first one succeeds. The others fail usually
> with error "Device or resource busy" (errno=16); sometimes even with
> "Software caused connection abort" (errno=103). Once the first
> connection is established and while sending OBEX data, I can establish
> another connection.
>
> I just want to make clear that the problem is with the establishment of
> the connection. I am fully aware that it is possible to handle various
> on-going connections with no problems and I have succeeded with that. Is
> there a limitation with Bluetooth or BlueZ that allows only one RFCOMM,
> L2CAP or HCI connection establishment?

this is a hardware limit and I don't know of any chip that is capable of
establishing two connections at the same time. From what I know this
will never be possible, but you should better ask a radio/baseband
expert for a correct answer.

> On the other hand, some connections die before sending the data, but it
> seems that the file descriptor of this connection does not receive any
> notification (I use select() on all file descriptors, with the file
> descriptor in the read mask). I know that this could be due to a problem
> with my program, a problem with OpenOBEX or the BlueZ version I am using
> (it is not the latest). In any case, to track down the cause, I would
> like to know how can I monitor the Bluetooth connections (at any level,
> but preferably RFCOMM) that a process (or the whole system) has. What I
> am looking for is a tool like netstat.

Using poll() or select() is the right way. About what version of the
kernel and library/utils are we talking?

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-03-15 19:27:10

by sir

[permalink] [raw]
Subject: Re: [Bluez-users] Multiple Bluetooth connections

It is quite as my problem, I can't find any documentation about
bluetooth java and multiple connections,
I create to threads that open a RFCOMM connection on my computer, and
try to connect a mobile phone or a pda,
but only one thread receive the connection and the seconde mobile unit
can't establish the link with the server.


It is not enough documentated.

If somebody can help us....



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users