2006-09-14 04:22:16

by Mingfan.Lu

[permalink] [raw]
Subject: [Bluez-devel] About concurrency sdp_connect

In my program, I have several concurrent threads to do sdp_connect. Here,
each thead tries to connect to one device while, only one dongle is used.
I find that if the amount of concurrency threads is large, all threads will
time out.
As we all know, sdp use L2cap connection. can't we create concurrent sdp
connections?
Wait for your nice help ;)
--
With respects,
Mingfan.Lu


Attachments:
(No filename) (380.00 B)
(No filename) (486.00 B)
(No filename) (373.00 B)
(No filename) (164.00 B)
Download all attachments

2006-09-29 14:18:48

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect

Hi,

> > I have test the pathc on 2.6.18-mh3
> > When I use the dongle(bluetooth spec. 1.2), it seemed ok.
> > but for the dongle (bluetooth spec. 1.1), it wasn't useful.
>
> show me the "hcidump -X -V" output for the Bluetooth 1.1 dongle.

I tested this on my old HP nc4000 and with a Bluetooth 1.1 chip in it
and it works fine. Maybe your dongle send back the wrong command or is
doing something else wrong. With a CSR dongle however this seems to work
without any problems. Check what "hciconfig -a" tells you about your
dongle.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-27 07:57:12

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect

Hi,

> I have test the pathc on 2.6.18-mh3
> When I use the dongle(bluetooth spec. 1.2), it seemed ok.
> but for the dongle (bluetooth spec. 1.1), it wasn't useful.

show me the "hcidump -X -V" output for the Bluetooth 1.1 dongle.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-27 07:53:01

by Mingfan.Lu

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect

holtman,
I have test the pathc on 2.6.18-mh3
When I use the dongle(bluetooth spec. 1.2), it seemed ok.
but for the dongle (bluetooth spec. 1.1), it wasn't useful.


2006/9/27, Marcel Holtmann <[email protected]>:
>
> Hi Peter,
>
> > my last attempt to make this work actually failed, but I didn't put much
> > energy into it. Feel free to come up with a working version. The path
> > how to handle this is clear.
>
> forget whatever I told you to handle this inside L2CAP. It is nearly
> impossible to get the locking for this right. I crashed my Quad G5
> multiple times today.
>
> So I went back to fix this inside the HCI layer. You can apply the
> attached patch on top of 2.6.18-mh3 and it should give you concurrent
> connect support for all protocols.
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
>
>


--
With respects,
Mingfan.Lu


Attachments:
(No filename) (1.34 kB)
(No filename) (2.25 kB)
(No filename) (348.00 B)
(No filename) (164.00 B)
Download all attachments

2006-09-15 11:37:29

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect


Hi Fabrizio,

On Fri, 15 Sep 2006, Fabrizio Guglielmino wrote:

> Hi,
> in my attempt to understand how the microsoft stack make this possible I
> have tried to find hcidump an equivalent
> on windows to visualize hci command issued to the device. I've found
> only commercial (and not cheap ) software, is
> there a software can I use to dump hci commands on windows?
>
> many thanks
>
I'm not aware of any. As far as I know the Microsoft Stack only supports
USB devices, so you need some sort of USB Monitor (e.g. snoopy) to trace
the HCI traffic. Have not tried it, but snoopy is GPL and it may be
possible to hack it in a way that it gives you something usefull.

Ciao,

Peter

| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-15 09:54:57

by Fabrizio Guglielmino

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect

Hi,
in my attempt to understand how the microsoft stack make this possible I =

have tried to find hcidump an equivalent
on windows to visualize hci command issued to the device. I've found =

only commercial (and not cheap ) software, is
there a software can I use to dump hci commands on windows?

many thanks


Marcel Holtmann ha scritto:
> Hi Peter,
>
> =

>>> I'm not expert in bluez kernel driver programming but I've developed an =

>>> application using socket abstraction
>>> on Windows (microsoft stack) and I can connect simultaneously to many =

>>> devices (7 max) with the same usb dongled
>>> tested with bluez on linux. So I think it can't be a hardware problem, =

>>> or better may be the hardware limitation but I think it's bypassable
>>> in software layers.
>>> bye
>>> Fabrizio
>>> =

>> The problem is not to connect to 7 devices simultaniuous. The problem is =

>> that (on the HCI level) most (or all??) devices gives you an error =

>> response when you start a new connection while there is an outstanding =

>> connection request. Of cause you can come arround this by software on th=
e =

>> upper level. E.g. you can make sure not to send a new connect request to =

>> the device while it has not responeded to the previous one. =

>> =

>
> my last attempt to make this work actually failed, but I didn't put much
> energy into it. Feel free to come up with a working version. The path
> how to handle this is clear.
>
> =

>> Don't know what microsoft is doing here (don't have their source ;-). =

>> =

>
> They will do something similar. If you get a HCI trace, then you can see
> for yourself what they are doing.
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job ea=
sier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
> =



-- =

______________________________
Fabrizio Guglielmino =

Infit Srl
Software Engineering
Tel. +39 11 7410915
Fax. +39 11 7410915
http://www.infitsrl.com
C.so Svizzera, 79/8 - Torino
______________________________

Il presente messaggio ed ogni eventuale allegato hanno natura
confidenziale e sono riservati ai destinatari indicati. La diffusione a
terzi e qualsiasi altro uso non autorizzato sono proibiti. I messaggi ed
i relativi allegati possono essere soggetti ad alterazioni. Il mittente
declina ogni responsabilit=E0 per le eventuali alterazioni, modificazioni
o falsificazioni.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-15 09:44:25

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect

Hi Peter,

> > I'm not expert in bluez kernel driver programming but I've developed an
> > application using socket abstraction
> > on Windows (microsoft stack) and I can connect simultaneously to many
> > devices (7 max) with the same usb dongled
> > tested with bluez on linux. So I think it can't be a hardware problem,
> > or better may be the hardware limitation but I think it's bypassable
> > in software layers.
> > bye
> > Fabrizio
>
> The problem is not to connect to 7 devices simultaniuous. The problem is
> that (on the HCI level) most (or all??) devices gives you an error
> response when you start a new connection while there is an outstanding
> connection request. Of cause you can come arround this by software on the
> upper level. E.g. you can make sure not to send a new connect request to
> the device while it has not responeded to the previous one.

my last attempt to make this work actually failed, but I didn't put much
energy into it. Feel free to come up with a working version. The path
how to handle this is clear.

> Don't know what microsoft is doing here (don't have their source ;-).

They will do something similar. If you get a HCI trace, then you can see
for yourself what they are doing.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-14 12:30:22

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect


Hi Fabrizio,

On Thu, 14 Sep 2006, Fabrizio Guglielmino wrote:

> Hi Peter,
> I'm not expert in bluez kernel driver programming but I've developed an
> application using socket abstraction
> on Windows (microsoft stack) and I can connect simultaneously to many
> devices (7 max) with the same usb dongled
> tested with bluez on linux. So I think it can't be a hardware problem,
> or better may be the hardware limitation but I think it's bypassable
> in software layers.
> bye
> Fabrizio

The problem is not to connect to 7 devices simultaniuous. The problem is
that (on the HCI level) most (or all??) devices gives you an error
response when you start a new connection while there is an outstanding
connection request. Of cause you can come arround this by software on the
upper level. E.g. you can make sure not to send a new connect request to
the device while it has not responeded to the previous one.

Don't know what microsoft is doing here (don't have their source ;-).

Ciao,

Peter



| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-14 12:17:53

by Fabrizio Guglielmino

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect

Hi Peter,
I'm not expert in bluez kernel driver programming but I've developed an =

application using socket abstraction
on Windows (microsoft stack) and I can connect simultaneously to many =

devices (7 max) with the same usb dongled
tested with bluez on linux. So I think it can't be a hardware problem, =

or better may be the hardware limitation but I think it's bypassable
in software layers.

bye
Fabrizio

Peter Wippich ha scritto:
> Hi Fabrizio,
>
> On Thu, 14 Sep 2006, Fabrizio Guglielmino wrote:
>
> =

>> Are You sure it's hardware restriction?
>> sdp_connect internally use the socket abstaction to create a l2cap =

>> socket and make a
>> connection with standard connect.
>> In old threads there is a discussion about actual software limitation of =

>> l2cap layer to make simultaneous
>> connection so I think the problem in sdp_connect is the same..... =

>> bye
>> =

>
> Well, maybe you did not went back far enough. The real problem is that =

> (all ?) Bluetooth hardware devices do not allow a second connect request =

> while another connect request is pending. I remember there was some =

> discussion to solve this in the l2cap layer by serializing connect =

> requests or reacting to the hardware responses proberly (retrying the =

> request when the hardware responds with command disallowed or similar to =

> the connect request). However, I don't know the current state . Get lost =

> somewhere .... =

>
> Ciao, =

> Peter =

>
>
>
> | Peter Wippich Voice: +49 30 46776411 |
> | G&W Instruments GmbH fax: +49 30 46776419 |
> | Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
> | D-13355 Berlin / Germany |
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job ea=
sier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
> =



-- =

______________________________
Fabrizio Guglielmino =

Infit Srl
Software Engineering
Tel. +39 11 7410915
Fax. +39 11 7410915
http://www.infitsrl.com
C.so Svizzera, 79/8 - Torino
______________________________

Il presente messaggio ed ogni eventuale allegato hanno natura
confidenziale e sono riservati ai destinatari indicati. La diffusione a
terzi e qualsiasi altro uso non autorizzato sono proibiti. I messaggi ed
i relativi allegati possono essere soggetti ad alterazioni. Il mittente
declina ogni responsabilit=E0 per le eventuali alterazioni, modificazioni
o falsificazioni.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-14 12:01:43

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect


Hi Fabrizio,

On Thu, 14 Sep 2006, Fabrizio Guglielmino wrote:

> Are You sure it's hardware restriction?
> sdp_connect internally use the socket abstaction to create a l2cap
> socket and make a
> connection with standard connect.
> In old threads there is a discussion about actual software limitation of
> l2cap layer to make simultaneous
> connection so I think the problem in sdp_connect is the same.....
> bye

Well, maybe you did not went back far enough. The real problem is that
(all ?) Bluetooth hardware devices do not allow a second connect request
while another connect request is pending. I remember there was some
discussion to solve this in the l2cap layer by serializing connect
requests or reacting to the hardware responses proberly (retrying the
request when the hardware responds with command disallowed or similar to
the connect request). However, I don't know the current state . Get lost
somewhere ....

Ciao,
Peter



| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-14 11:45:32

by Fabrizio Guglielmino

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect

Are You sure it's hardware restriction?
sdp_connect internally use the socket abstaction to create a l2cap =

socket and make a
connection with standard connect.
In old threads there is a discussion about actual software limitation of =

l2cap layer to make simultaneous
connection so I think the problem in sdp_connect is the same.....

bye

Peter Wippich ha scritto:
> Hello Mingfan, =

>
> On Thu, 14 Sep 2006, Mingfan.Lu wrote:
>
> =

>> In my program, I have several concurrent threads to do sdp_connect. Here,
>> each thead tries to connect to one device while, only one dongle is used.
>> I find that if the amount of concurrency threads is large, all threads w=
ill
>> time out.
>> As we all know, sdp use L2cap connection. can't we create concurrent sdp
>> connections?
>> Wait for your nice help ;)
>> =

>
> Concurrent connection setup is not possible on the HCI level due to =

> hardware restrictions. This issue has been discussed several times here. =

> Check the archives. =

>
> Ciao, =

>
> Peter =

>
>
>
> | Peter Wippich Voice: +49 30 46776411 |
> | G&W Instruments GmbH fax: +49 30 46776419 |
> | Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
> | D-13355 Berlin / Germany |
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job ea=
sier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
> =



-- =

______________________________
Fabrizio Guglielmino =

Infit Srl
Software Engineering
Tel. +39 11 7410915
Fax. +39 11 7410915
http://www.infitsrl.com
C.so Svizzera, 79/8 - Torino
______________________________

Il presente messaggio ed ogni eventuale allegato hanno natura
confidenziale e sono riservati ai destinatari indicati. La diffusione a
terzi e qualsiasi altro uso non autorizzato sono proibiti. I messaggi ed
i relativi allegati possono essere soggetti ad alterazioni. Il mittente
declina ogni responsabilit=E0 per le eventuali alterazioni, modificazioni
o falsificazioni.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-09-14 09:04:57

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] About concurrency sdp_connect


Hello Mingfan,

On Thu, 14 Sep 2006, Mingfan.Lu wrote:

> In my program, I have several concurrent threads to do sdp_connect. Here,
> each thead tries to connect to one device while, only one dongle is used.
> I find that if the amount of concurrency threads is large, all threads will
> time out.
> As we all know, sdp use L2cap connection. can't we create concurrent sdp
> connections?
> Wait for your nice help ;)

Concurrent connection setup is not possible on the HCI level due to
hardware restrictions. This issue has been discussed several times here.
Check the archives.

Ciao,

Peter



| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel