linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] Problems with sdp_connect()
@ 2005-10-05  7:07 lax
  2005-10-05 11:24 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: lax @ 2005-10-05  7:07 UTC (permalink / raw)
  To: bluez-devel


Hi to all! I am writing my thesis on Bluetooth programming under Linux and I would be grateful to you if you could give me hints to solve this problem. I have two bt devices on my laptop, both of them run the same program and register the same SDP service. When I register the service I call sdp_connect(&src, BDADDR_LOCAL, RETRY_IF_BUSY). It works but when I try to search the service from a device outside my laptop I discover the same service twice for each device. Resuming:
- Bluetooth device A register a service C on my laptop --- sdp_connect(&srcA, BDADDR_LOCAL, ...) 
- Bluetooth device B register a service C on my laptop --- sdp_connect(&srcB, BDADDR_LOCAL, ...)
- Searching service C on device A will find it twice instead of once

I thought the problem was in BDADDR_LOCAL, which is defined as {0, 0, 0, 0xff, 0xff, 0xff} but if I try to register the service connecting with SDP server as sdp_connect(&srcA, &srcA, ...) it returns error "Host is down". I don't know where to hurt my head...

Thanks

-------------------------------------------------------------------------
Visita http://domini.interfree.it, il sito di Interfree dove trovare
soluzioni semplici e complete che soddisfano le tue esigenze in Internet,
ecco due esempi di offerte:

-  Registrazione Dominio: un dominio con 1 MB di spazio disco +  2 caselle
   email a soli 18,59 euro
-  MioDominio: un dominio con 20 MB di spazio disco + 5 caselle email 
   a soli 51,13 euro

Vieni a trovarci!

Lo Staff di Interfree 
-------------------------------------------------------------------------



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] Problems with sdp_connect()
  2005-10-05  7:07 [Bluez-devel] Problems with sdp_connect() lax
@ 2005-10-05 11:24 ` Marcel Holtmann
  0 siblings, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2005-10-05 11:24 UTC (permalink / raw)
  To: bluez-devel

Hi,

> I am writing my thesis on Bluetooth programming under Linux and I would be grateful to you if you could give me hints to solve this problem. I have two bt devices on my laptop, both of them run the same program and register the same SDP service. When I register the service I call sdp_connect(&src, BDADDR_LOCAL, RETRY_IF_BUSY). It works but when I try to search the service from a device outside my laptop I discover the same service twice for each device. Resuming:
> - Bluetooth device A register a service C on my laptop --- sdp_connect(&srcA, BDADDR_LOCAL, ...) 
> - Bluetooth device B register a service C on my laptop --- sdp_connect(&srcB, BDADDR_LOCAL, ...)
> - Searching service C on device A will find it twice instead of once
> 
> I thought the problem was in BDADDR_LOCAL, which is defined as {0, 0, 0, 0xff, 0xff, 0xff} but if I try to register the service connecting with SDP server as sdp_connect(&srcA, &srcA, ...) it returns error "Host is down". I don't know where to hurt my head...

use the latest bluez-libs package and then you can register per device
services. Look at sdp_device_* functions or use the -i switch of
sdptool.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] Problems with sdp_connect()
@ 2005-10-05 13:31 lax
  0 siblings, 0 replies; 3+ messages in thread
From: lax @ 2005-10-05 13:31 UTC (permalink / raw)
  To: bluez-devel


Now it works properly. I think I need to watch more frequently BlueZ updates. 

Thank you so much Marcel,
Andrea

-------------------------------------------------------------------------
Visita http://domini.interfree.it, il sito di Interfree dove trovare
soluzioni semplici e complete che soddisfano le tue esigenze in Internet,
ecco due esempi di offerte:

-  Registrazione Dominio: un dominio con 1 MB di spazio disco +  2 caselle
   email a soli 18,59 euro
-  MioDominio: un dominio con 20 MB di spazio disco + 5 caselle email 
   a soli 51,13 euro

Vieni a trovarci!

Lo Staff di Interfree 
-------------------------------------------------------------------------



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2005-10-05 13:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-05  7:07 [Bluez-devel] Problems with sdp_connect() lax
2005-10-05 11:24 ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2005-10-05 13:31 lax

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