public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] About concurrency sdp_connect
@ 2006-09-14  4:22 Mingfan.Lu
  2006-09-14  9:04 ` Peter Wippich
  0 siblings, 1 reply; 13+ messages in thread
From: Mingfan.Lu @ 2006-09-14  4:22 UTC (permalink / raw)
  To: Bluez-devel


[-- Attachment #1.1: Type: text/plain, Size: 380 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 486 bytes --]

[-- Attachment #2: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-14  4:22 [Bluez-devel] About concurrency sdp_connect Mingfan.Lu
@ 2006-09-14  9:04 ` Peter Wippich
  2006-09-14 11:45   ` Fabrizio Guglielmino
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Wippich @ 2006-09-14  9:04 UTC (permalink / raw)
  To: BlueZ development


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: pewi@gw-instruments.de   |
|       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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-14  9:04 ` Peter Wippich
@ 2006-09-14 11:45   ` Fabrizio Guglielmino
  2006-09-14 12:01     ` Peter Wippich
  0 siblings, 1 reply; 13+ messages in thread
From: Fabrizio Guglielmino @ 2006-09-14 11:45 UTC (permalink / raw)
  To: BlueZ development

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: pewi@gw-instruments.de   |
> |       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
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
>   =



-- =

______________________________
Fabrizio Guglielmino =

Infit Srl
Software Engineering
Tel. +39 11 7410915
Fax. +39 11 7410915
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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-14 11:45   ` Fabrizio Guglielmino
@ 2006-09-14 12:01     ` Peter Wippich
  2006-09-14 12:17       ` Fabrizio Guglielmino
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Wippich @ 2006-09-14 12:01 UTC (permalink / raw)
  To: BlueZ development


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: pewi@gw-instruments.de   |
|       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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-14 12:01     ` Peter Wippich
@ 2006-09-14 12:17       ` Fabrizio Guglielmino
  2006-09-14 12:30         ` Peter Wippich
  0 siblings, 1 reply; 13+ messages in thread
From: Fabrizio Guglielmino @ 2006-09-14 12:17 UTC (permalink / raw)
  To: BlueZ development

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: pewi@gw-instruments.de   |
> |       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
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
>   =



-- =

______________________________
Fabrizio Guglielmino =

Infit Srl
Software Engineering
Tel. +39 11 7410915
Fax. +39 11 7410915
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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-14 12:17       ` Fabrizio Guglielmino
@ 2006-09-14 12:30         ` Peter Wippich
  2006-09-15  9:44           ` Marcel Holtmann
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Wippich @ 2006-09-14 12:30 UTC (permalink / raw)
  To: BlueZ development


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: pewi@gw-instruments.de   |
|       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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-14 12:30         ` Peter Wippich
@ 2006-09-15  9:44           ` Marcel Holtmann
  2006-09-15  9:54             ` Fabrizio Guglielmino
  2006-09-26 21:09             ` Marcel Holtmann
  0 siblings, 2 replies; 13+ messages in thread
From: Marcel Holtmann @ 2006-09-15  9:44 UTC (permalink / raw)
  To: BlueZ development

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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-15  9:44           ` Marcel Holtmann
@ 2006-09-15  9:54             ` Fabrizio Guglielmino
  2006-09-15 11:37               ` Peter Wippich
  2006-09-26 21:09             ` Marcel Holtmann
  1 sibling, 1 reply; 13+ messages in thread
From: Fabrizio Guglielmino @ 2006-09-15  9:54 UTC (permalink / raw)
  To: BlueZ development

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
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
>   =



-- =

______________________________
Fabrizio Guglielmino =

Infit Srl
Software Engineering
Tel. +39 11 7410915
Fax. +39 11 7410915
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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-15  9:54             ` Fabrizio Guglielmino
@ 2006-09-15 11:37               ` Peter Wippich
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Wippich @ 2006-09-15 11:37 UTC (permalink / raw)
  To: BlueZ development


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: pewi@gw-instruments.de   |
|       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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-15  9:44           ` Marcel Holtmann
  2006-09-15  9:54             ` Fabrizio Guglielmino
@ 2006-09-26 21:09             ` Marcel Holtmann
  2006-09-27  7:53               ` Mingfan.Lu
  1 sibling, 1 reply; 13+ messages in thread
From: Marcel Holtmann @ 2006-09-26 21:09 UTC (permalink / raw)
  To: BlueZ development

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

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


[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 2322 bytes --]

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index df22efc..0ace40b 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -289,6 +289,22 @@ static inline struct hci_conn *hci_conn_
 	return NULL;
 }
 
+static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
+					__u8 type, __u16 state)
+{
+	struct hci_conn_hash *h = &hdev->conn_hash;
+	struct list_head *p;
+	struct hci_conn  *c;
+
+	list_for_each(p, &h->list) {
+		c = list_entry(p, struct hci_conn, list);
+		if (c->type == type && c->state == state)
+			return c;
+	}
+	return NULL;
+}
+
+void hci_acl_connect(struct hci_conn *conn);
 void hci_acl_disconn(struct hci_conn *conn, __u8 reason);
 void hci_add_sco(struct hci_conn *conn, __u16 handle);
 
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 90e3a28..8d0c7e7 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -51,7 +51,7 @@ #undef  BT_DBG
 #define BT_DBG(D...)
 #endif
 
-static void hci_acl_connect(struct hci_conn *conn)
+void hci_acl_connect(struct hci_conn *conn)
 {
 	struct hci_dev *hdev = conn->hdev;
 	struct inquiry_entry *ie;
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index d5693ef..b1b9f12 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -414,9 +414,12 @@ static inline void hci_cs_create_conn(st
 
 	if (status) {
 		if (conn && conn->state == BT_CONNECT) {
-			conn->state = BT_CLOSED;
-			hci_proto_connect_cfm(conn, status);
-			hci_conn_del(conn);
+			if (status != 0x0c) {
+				conn->state = BT_CLOSED;
+				hci_proto_connect_cfm(conn, status);
+				hci_conn_del(conn);
+			} else
+				conn->state = BT_CONNECT2;
 		}
 	} else {
 		if (!conn) {
@@ -728,7 +731,7 @@ static inline void hci_conn_request_evt(
 static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
 {
 	struct hci_ev_conn_complete *ev = (struct hci_ev_conn_complete *) skb->data;
-	struct hci_conn *conn;
+	struct hci_conn *conn, *pend;
 
 	BT_DBG("%s", hdev->name);
 
@@ -782,6 +785,10 @@ static inline void hci_conn_complete_evt
 		}
 
 		hci_conn_put(conn);
+
+		pend = hci_conn_hash_lookup_state(hdev, ACL_LINK, BT_CONNECT2);
+		if (pend)
+			hci_acl_connect(pend);
 	} else
 		conn->state = BT_CLOSED;
 

[-- Attachment #3: Type: text/plain, Size: 348 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-26 21:09             ` Marcel Holtmann
@ 2006-09-27  7:53               ` Mingfan.Lu
  2006-09-27  7:57                 ` Marcel Holtmann
  0 siblings, 1 reply; 13+ messages in thread
From: Mingfan.Lu @ 2006-09-27  7:53 UTC (permalink / raw)
  To: BlueZ development


[-- Attachment #1.1: Type: text/plain, Size: 1374 bytes --]

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 <marcel@holtmann.org>:
>
> 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
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>
>
>


-- 
With respects,
   Mingfan.Lu

[-- Attachment #1.2: Type: text/html, Size: 2303 bytes --]

[-- Attachment #2: Type: text/plain, Size: 348 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-27  7:53               ` Mingfan.Lu
@ 2006-09-27  7:57                 ` Marcel Holtmann
  2006-09-29 14:18                   ` Marcel Holtmann
  0 siblings, 1 reply; 13+ messages in thread
From: Marcel Holtmann @ 2006-09-27  7:57 UTC (permalink / raw)
  To: BlueZ development

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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] About concurrency sdp_connect
  2006-09-27  7:57                 ` Marcel Holtmann
@ 2006-09-29 14:18                   ` Marcel Holtmann
  0 siblings, 0 replies; 13+ messages in thread
From: Marcel Holtmann @ 2006-09-29 14:18 UTC (permalink / raw)
  To: BlueZ development

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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2006-09-29 14:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-14  4:22 [Bluez-devel] About concurrency sdp_connect Mingfan.Lu
2006-09-14  9:04 ` Peter Wippich
2006-09-14 11:45   ` Fabrizio Guglielmino
2006-09-14 12:01     ` Peter Wippich
2006-09-14 12:17       ` Fabrizio Guglielmino
2006-09-14 12:30         ` Peter Wippich
2006-09-15  9:44           ` Marcel Holtmann
2006-09-15  9:54             ` Fabrizio Guglielmino
2006-09-15 11:37               ` Peter Wippich
2006-09-26 21:09             ` Marcel Holtmann
2006-09-27  7:53               ` Mingfan.Lu
2006-09-27  7:57                 ` Marcel Holtmann
2006-09-29 14:18                   ` Marcel Holtmann

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