linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] sdp_connect thread safe?
@ 2006-06-30  8:49 Fabrizio Guglielmino
  2006-06-30  8:53 ` Marcel Holtmann
  0 siblings, 1 reply; 14+ messages in thread
From: Fabrizio Guglielmino @ 2006-06-30  8:49 UTC (permalink / raw)
  To: bluez-devel

Hi all,
using sdp_connect to find services on bluetooth devices I've found a 
problem.
If sdp_connect it's uses in synchronous way  all works but if I use a 
thread for every device found by hci_inquiry
sdp_connect always fails.

Simultaneous multiple sdp_connect would have to be possible, reading 
sdp_connect source I've see it's simply a socket l2cap creation and a 
connection using this.

Can someone suggest something ?

Many thanks
Fabrizio Guglielmino


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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30  8:49 [Bluez-devel] sdp_connect thread safe? Fabrizio Guglielmino
@ 2006-06-30  8:53 ` Marcel Holtmann
  2006-06-30  9:06   ` Fabrizio Guglielmino
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel Holtmann @ 2006-06-30  8:53 UTC (permalink / raw)
  To: BlueZ development

Hi Fabrizio,

> using sdp_connect to find services on bluetooth devices I've found a 
> problem.
> If sdp_connect it's uses in synchronous way  all works but if I use a 
> thread for every device found by hci_inquiry
> sdp_connect always fails.
> 
> Simultaneous multiple sdp_connect would have to be possible, reading 
> sdp_connect source I've see it's simply a socket l2cap creation and a 
> connection using this.

check with "hcidump -X -V", because I think you dongle simply doesn't
support multiple page request at the same time (like all others).

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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30  8:53 ` Marcel Holtmann
@ 2006-06-30  9:06   ` Fabrizio Guglielmino
  2006-06-30  9:12     ` Marcel Holtmann
  0 siblings, 1 reply; 14+ messages in thread
From: Fabrizio Guglielmino @ 2006-06-30  9:06 UTC (permalink / raw)
  To: BlueZ development

Many thanks...I'm going to make some tries.
Is there a list of bluetooth adapters supporting this feature?
Doing hciconfig -a [adapter] is not possible to known if the device =

support multiple simultaneus sdp_connect ?

Fabrizio

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

>> using sdp_connect to find services on bluetooth devices I've found a =

>> problem.
>> If sdp_connect it's uses in synchronous way  all works but if I use a =

>> thread for every device found by hci_inquiry
>> sdp_connect always fails.
>>
>> Simultaneous multiple sdp_connect would have to be possible, reading =

>> sdp_connect source I've see it's simply a socket l2cap creation and a =

>> connection using this.
>>     =

>
> check with "hcidump -X -V", because I think you dongle simply doesn't
> support multiple page request at the same time (like all others).
>
> 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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30  9:06   ` Fabrizio Guglielmino
@ 2006-06-30  9:12     ` Marcel Holtmann
  2006-06-30  9:43       ` Fabrizio Guglielmino
  2006-06-30 10:14       ` Peter Wippich
  0 siblings, 2 replies; 14+ messages in thread
From: Marcel Holtmann @ 2006-06-30  9:12 UTC (permalink / raw)
  To: BlueZ development

Hi Fabrizio,

> Is there a list of bluetooth adapters supporting this feature?
> Doing hciconfig -a [adapter] is not possible to known if the device 
> support multiple simultaneus sdp_connect ?

I think my phrase was not clear. I haven't seen any adapter that is
capable of multiple baseband pages at the same time.

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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30  9:12     ` Marcel Holtmann
@ 2006-06-30  9:43       ` Fabrizio Guglielmino
  2006-06-30 10:06         ` Marcel Holtmann
  2006-06-30 10:25         ` Peter Wippich
  2006-06-30 10:14       ` Peter Wippich
  1 sibling, 2 replies; 14+ messages in thread
From: Fabrizio Guglielmino @ 2006-06-30  9:43 UTC (permalink / raw)
  To: BlueZ development

Ok....I think my question was not so clear (I'm not english so escuse me).
I'm porting a simple application that I have made for Windows using =

Microsoft stack, in this application there is an inquiry and for every =

devices found I'm looking if it's opush capable.

In Microsoft stack I suppose sdp discovery of push service is masked in =

sense I don't have to specify the RFCOMM channel when  I made  the =

connection with device. In the SOCKADDR_BTH struct used by connect I =

simply specify -1 in port field (channel) and all works with 100% of =

opush enabled devices tested.

In conclusion I think in my windows version of this software there are =

multiple simultaneous sdp connections and I have not had problems with =

several types of adapters.

Sorry again for my english


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

>> Is there a list of bluetooth adapters supporting this feature?
>> Doing hciconfig -a [adapter] is not possible to known if the device =

>> support multiple simultaneus sdp_connect ?
>>     =

>
> I think my phrase was not clear. I haven't seen any adapter that is
> capable of multiple baseband pages at the same time.
>
> 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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30  9:43       ` Fabrizio Guglielmino
@ 2006-06-30 10:06         ` Marcel Holtmann
  2006-06-30 10:25         ` Peter Wippich
  1 sibling, 0 replies; 14+ messages in thread
From: Marcel Holtmann @ 2006-06-30 10:06 UTC (permalink / raw)
  To: BlueZ development

Hi Fabrizio,

> Ok....I think my question was not so clear (I'm not english so escuse me).
> I'm porting a simple application that I have made for Windows using 
> Microsoft stack, in this application there is an inquiry and for every 
> devices found I'm looking if it's opush capable.
> 
> In Microsoft stack I suppose sdp discovery of push service is masked in 
> sense I don't have to specify the RFCOMM channel when  I made  the 
> connection with device. In the SOCKADDR_BTH struct used by connect I 
> simply specify -1 in port field (channel) and all works with 100% of 
> opush enabled devices tested.
> 
> In conclusion I think in my windows version of this software there are 
> multiple simultaneous sdp connections and I have not had problems with 
> several types of adapters.

they might use a baseband connection queue and stall additional requests
to create the ACL, but we don't do it this way in BlueZ.

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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30  9:12     ` Marcel Holtmann
  2006-06-30  9:43       ` Fabrizio Guglielmino
@ 2006-06-30 10:14       ` Peter Wippich
  2006-06-30 10:22         ` Fabrizio Guglielmino
  2006-06-30 10:23         ` Marcel Holtmann
  1 sibling, 2 replies; 14+ messages in thread
From: Peter Wippich @ 2006-06-30 10:14 UTC (permalink / raw)
  To: BlueZ development


Hello All, 
> Hi Fabrizio,
> 
> > Is there a list of bluetooth adapters supporting this feature?
> > Doing hciconfig -a [adapter] is not possible to known if the device 
> > support multiple simultaneus sdp_connect ?
> 
> I think my phrase was not clear. I haven't seen any adapter that is
> capable of multiple baseband pages at the same time.

So do I. There's a simple proof: just send a HCI_Create_Connection command 
and than try to send a second Create_Connection before you get the 
connection complete event for the first Create_Connection. 
If the second create connection passes, please tell me what chip it was 
!!!
The normal behaviour is that the chip will reply with an error event (like 
command dissallowed) for the second connection attempt. I think there was 
some discussion about this some time ago. The only way to come around this 
is a complicated buffering for HCI commands inside BlueZ. It will require 
the stack to hold a create connection command in the queue when it gets an 
error response for a create connection command and re-issue it once it 
gets an connection complete or connection fail event.
The real bad thing here is that different chips will behave different so 
there is some kind of hardware dependence here. 

I have not checked but as far as I know BlueZ does not support such a 
mechanism. Feel free to implement this (the less complicated task) and  
make sure it always works correctly (the much more complicated task
because you have to test with a lot of different hardware).  

You may also try something on the upper level. For example synchronize 
your threads in such a way that there is only one outstanding sdp connect. 
For example use a semaphore which must be owned by the thread to issue a 
sdp connect. Once the sdp connect is through (even completed or failed) 
the semaphore is freed and the next thread waiting is allowed to start a 
sdp connection. 

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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30 10:14       ` Peter Wippich
@ 2006-06-30 10:22         ` Fabrizio Guglielmino
  2006-06-30 10:36           ` Peter Wippich
  2006-06-30 10:23         ` Marcel Holtmann
  1 sibling, 1 reply; 14+ messages in thread
From: Fabrizio Guglielmino @ 2006-06-30 10:22 UTC (permalink / raw)
  To: BlueZ development

Thanks to all....
I'm nearly sure that the solution for me is lot more simple. It would =

like to have a tool hcidump-like for windows to verifying what happens.

To obtain the rfcomm channel associated to a service (opush in my case) =

sd_connect and the response inspection it's the only way?
My requirement in the end it's only to find all devices opush enabled in =

a determinate moment and send to all a file (a vcalendar). The problem =

is that send have to be simultaneous (or nearly). If  every opush search =

is blocking  target devices becames like a chain where every one it's =

conditioned by the previouos inquired.

Peter Wippich ha scritto:
> Hello All, =

>   =

>> Hi Fabrizio,
>>
>>     =

>>> Is there a list of bluetooth adapters supporting this feature?
>>> Doing hciconfig -a [adapter] is not possible to known if the device =

>>> support multiple simultaneus sdp_connect ?
>>>       =

>> I think my phrase was not clear. I haven't seen any adapter that is
>> capable of multiple baseband pages at the same time.
>>     =

>
> So do I. There's a simple proof: just send a HCI_Create_Connection comman=
d =

> and than try to send a second Create_Connection before you get the =

> connection complete event for the first Create_Connection. =

> If the second create connection passes, please tell me what chip it was =

> !!!
> The normal behaviour is that the chip will reply with an error event (lik=
e =

> command dissallowed) for the second connection attempt. I think there was =

> some discussion about this some time ago. The only way to come around thi=
s =

> is a complicated buffering for HCI commands inside BlueZ. It will require =

> the stack to hold a create connection command in the queue when it gets a=
n =

> error response for a create connection command and re-issue it once it =

> gets an connection complete or connection fail event.
> The real bad thing here is that different chips will behave different so =

> there is some kind of hardware dependence here. =

>
> I have not checked but as far as I know BlueZ does not support such a =

> mechanism. Feel free to implement this (the less complicated task) and  =

> make sure it always works correctly (the much more complicated task
> because you have to test with a lot of different hardware).  =

>
> You may also try something on the upper level. For example synchronize =

> your threads in such a way that there is only one outstanding sdp connect=
. =

> For example use a semaphore which must be owned by the thread to issue a =

> sdp connect. Once the sdp connect is through (even completed or failed) =

> the semaphore is freed and the next thread waiting is allowed to start a =

> sdp connection. =

>
> 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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30 10:14       ` Peter Wippich
  2006-06-30 10:22         ` Fabrizio Guglielmino
@ 2006-06-30 10:23         ` Marcel Holtmann
  2006-06-30 10:36           ` Peter Wippich
  1 sibling, 1 reply; 14+ messages in thread
From: Marcel Holtmann @ 2006-06-30 10:23 UTC (permalink / raw)
  To: BlueZ development

Hi Peter,

> > > Is there a list of bluetooth adapters supporting this feature?
> > > Doing hciconfig -a [adapter] is not possible to known if the device 
> > > support multiple simultaneus sdp_connect ?
> > 
> > I think my phrase was not clear. I haven't seen any adapter that is
> > capable of multiple baseband pages at the same time.
> 
> So do I. There's a simple proof: just send a HCI_Create_Connection command 
> and than try to send a second Create_Connection before you get the 
> connection complete event for the first Create_Connection. 
> If the second create connection passes, please tell me what chip it was 
> !!!
> The normal behaviour is that the chip will reply with an error event (like 
> command dissallowed) for the second connection attempt. I think there was 
> some discussion about this some time ago. The only way to come around this 
> is a complicated buffering for HCI commands inside BlueZ. It will require 
> the stack to hold a create connection command in the queue when it gets an 
> error response for a create connection command and re-issue it once it 
> gets an connection complete or connection fail event.

if you wanna really support this, then you have to implement it in the
L2CAP layer. Doing it inside HCI would mess up a lot of things and I
would always reject this. However feel free to send in patches to
implement this inside L2CAP.

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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30  9:43       ` Fabrizio Guglielmino
  2006-06-30 10:06         ` Marcel Holtmann
@ 2006-06-30 10:25         ` Peter Wippich
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Wippich @ 2006-06-30 10:25 UTC (permalink / raw)
  To: BlueZ development


Hi Fabrizio,

On Fri, 30 Jun 2006, Fabrizio Guglielmino wrote:

> In Microsoft stack I suppose sdp discovery of push service is masked in 
> sense I don't have to specify the RFCOMM channel when  I made  the 
> connection with device. In the SOCKADDR_BTH struct used by connect I 
> simply specify -1 in port field (channel) and all works with 100% of 
> opush enabled devices tested.

They are doing the SDP just before connecting the device. This normaly is 
save because a device usualy supports only one opush service. You may get 
problems for other service types (like SPP) when a device supports more 
than one. In this case you can not control to which service you realy 
connect. 

I also suppose they are doing some synchronisation on the lower level to 
make sure there is only one outstanding connection attempt, like Marcel 
already wrote. 

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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30 10:23         ` Marcel Holtmann
@ 2006-06-30 10:36           ` Peter Wippich
  2006-06-30 10:55             ` Marcel Holtmann
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Wippich @ 2006-06-30 10:36 UTC (permalink / raw)
  To: BlueZ development



Hi Marcel, 

> > The normal behaviour is that the chip will reply with an error event (like 
> > command dissallowed) for the second connection attempt. I think there was 
> > some discussion about this some time ago. The only way to come around this 
> > is a complicated buffering for HCI commands inside BlueZ. It will require 
> > the stack to hold a create connection command in the queue when it gets an 
> > error response for a create connection command and re-issue it once it 
> > gets an connection complete or connection fail event.
> 
> if you wanna really support this, then you have to implement it in the
> L2CAP layer. Doing it inside HCI would mess up a lot of things and I
> would always reject this. However feel free to send in patches to
> implement this inside L2CAP.

No, I don't want to implement this. We've done this once for a project 
(not BlueZ related) and it was a pain ;-). May be you're right that L2CAP 
is the appropriate layer because it is connection oriented. But 
currently my knowledge about the insides of BlueZ is simply to small to 
comment on this.  

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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30 10:22         ` Fabrizio Guglielmino
@ 2006-06-30 10:36           ` Peter Wippich
  2006-06-30 10:49             ` Fabrizio Guglielmino
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Wippich @ 2006-06-30 10:36 UTC (permalink / raw)
  To: BlueZ development


Hi Fabrizio, 

On Fri, 30 Jun 2006, Fabrizio Guglielmino wrote:

> To obtain the rfcomm channel associated to a service (opush in my case) 
> sd_connect and the response inspection it's the only way?
Yes !

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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30 10:36           ` Peter Wippich
@ 2006-06-30 10:49             ` Fabrizio Guglielmino
  0 siblings, 0 replies; 14+ messages in thread
From: Fabrizio Guglielmino @ 2006-06-30 10:49 UTC (permalink / raw)
  To: BlueZ development

Ok ....the last question otherwise risk to be insulted ;-)

sdp_connect block for long time (also without SDP_RETRY_IF_BUSY flag), =

is there a ioctl on the
l2cap socket or a command to reduce this time?

Ciao
Fabrizio

Peter Wippich ha scritto:
> Hi Fabrizio, =

>
> On Fri, 30 Jun 2006, Fabrizio Guglielmino wrote:
>
>   =

>> To obtain the rfcomm channel associated to a service (opush in my case) =

>> sd_connect and the response inspection it's the only way?
>>     =

> Yes !
>
> 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] 14+ messages in thread

* Re: [Bluez-devel] sdp_connect thread safe?
  2006-06-30 10:36           ` Peter Wippich
@ 2006-06-30 10:55             ` Marcel Holtmann
  0 siblings, 0 replies; 14+ messages in thread
From: Marcel Holtmann @ 2006-06-30 10:55 UTC (permalink / raw)
  To: BlueZ development

Hi Peter,

> > > The normal behaviour is that the chip will reply with an error event (like 
> > > command dissallowed) for the second connection attempt. I think there was 
> > > some discussion about this some time ago. The only way to come around this 
> > > is a complicated buffering for HCI commands inside BlueZ. It will require 
> > > the stack to hold a create connection command in the queue when it gets an 
> > > error response for a create connection command and re-issue it once it 
> > > gets an connection complete or connection fail event.
> > 
> > if you wanna really support this, then you have to implement it in the
> > L2CAP layer. Doing it inside HCI would mess up a lot of things and I
> > would always reject this. However feel free to send in patches to
> > implement this inside L2CAP.
> 
> No, I don't want to implement this. We've done this once for a project 
> (not BlueZ related) and it was a pain ;-). May be you're right that L2CAP 
> is the appropriate layer because it is connection oriented. But 
> currently my knowledge about the insides of BlueZ is simply to small to 
> comment on this.  

doing it on HCI level can easily mess up things and as I said, I would
reject any attempt to push such thing into the mainline kernel.

However I am open for a L2CAP based solution. Actually is not that
complex. Take a look at l2cap_connect_cfm() and in case of a specific
error you need to issue l2cap_do_connect() again. Now you only need to
take care of the correct timeout handling and stop after for example
three failed attempts to avoid an endless loop.

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] 14+ messages in thread

end of thread, other threads:[~2006-06-30 10:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30  8:49 [Bluez-devel] sdp_connect thread safe? Fabrizio Guglielmino
2006-06-30  8:53 ` Marcel Holtmann
2006-06-30  9:06   ` Fabrizio Guglielmino
2006-06-30  9:12     ` Marcel Holtmann
2006-06-30  9:43       ` Fabrizio Guglielmino
2006-06-30 10:06         ` Marcel Holtmann
2006-06-30 10:25         ` Peter Wippich
2006-06-30 10:14       ` Peter Wippich
2006-06-30 10:22         ` Fabrizio Guglielmino
2006-06-30 10:36           ` Peter Wippich
2006-06-30 10:49             ` Fabrizio Guglielmino
2006-06-30 10:23         ` Marcel Holtmann
2006-06-30 10:36           ` Peter Wippich
2006-06-30 10:55             ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).