linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] SDP without results
@ 2006-05-30 10:02 Götz Issel
  2006-05-30 10:40 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Götz Issel @ 2006-05-30 10:02 UTC (permalink / raw)
  To: bluez-devel

Hi, 

I am trying to discover services of a device, looking for the SAP
service. In my understanding this is the hex ID for uuid  0x112d .

I have been trying to use the sample of Albert Huang
(http://people.csail.mit.edu/albert/bluez-intro/)   section 4.4 .

The service id is defined as
    uint32_t svc_uuid_int[] = { 0x0, 0x0, 0x0, 0x112d };

The line
    session = sdp_connect( BDADDR_ANY, &target, SDP_RETRY_IF_BUSY );

results in (checked via printf)
	session->state=0, 
	session->flags=1, 
	session->sock=3, 
	session->local=0,
	session->tid=0

The line 
err = sdp_service_search_attr_req( session, search_list, \
            SDP_ATTR_REQ_RANGE, attrid_list, &response_list);

gives err = 0 , so all is fine up to there.

The following FOR-loop is never entered ( for (; r; r = r->next ) {....  ) !

Any ideas ? 
My source code under : http://www.goetzi.de/try1.html

Using the command line tool "sdptool search 0x112d" gives perfect
results by the way.

Goetz


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

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

* Re: [Bluez-devel] SDP without results
  2006-05-30 10:02 [Bluez-devel] SDP without results Götz Issel
@ 2006-05-30 10:40 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2006-05-30 10:40 UTC (permalink / raw)
  To: BlueZ development

Hi Goetz,

> I am trying to discover services of a device, looking for the SAP
> service. In my understanding this is the hex ID for uuid  0x112d .
> 
> I have been trying to use the sample of Albert Huang
> (http://people.csail.mit.edu/albert/bluez-intro/)   section 4.4 .
> 
> The service id is defined as
>     uint32_t svc_uuid_int[] = { 0x0, 0x0, 0x0, 0x112d };

you use of sdp_uuid128_create() is wrong and also not needed at all. It
is enough to add the UUID16 identifier for this kind of search. The
bluez-utils source packages contains enough examples on how to search
for specific services.

Regards

Marcel




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

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-30 10:02 [Bluez-devel] SDP without results Götz Issel
2006-05-30 10:40 ` 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).