2006-09-26 06:30:33

by Mingfan.Lu

[permalink] [raw]
Subject: [Bluez-devel] Can I search two services at the same time?

Problem,
I have seen that there is a function named sdp_service_search_req,
So,I append two service uuid such as obexpush's uuid and another
service's uuid into the search list, I want to get the two services' info
only call search func once.
and then set the max_rec_num = 2,
then call
sdp_service_search_req(session,search_list,2,&rsp_list);
but ,I have seen that the func return 0, but the rsp_list is NULL.

My func named getService() which uses sdp_service_search_req

int BTWorker::getService(Device * pDev)
{
int CPS_err;
sdp_list_t *CPS_r,*next;
sdp_record_t *CPS_rec;
sdp_list_t *CPS_proto_list;
bool bFound=false;
uint8_t numoffound=0;
uint8_t rfcommChannel;
uint8_t obexChannel;
char desc[100];

bdaddr_t source;//the source dongle should be saved in the adaptor, you
should config it in the ap.ini
bdaddr_t target;
str2ba(pDev->getDeviceAddress()->getAddress_str().c_str(),&target);
sdp_session_t *session = 0;
str2ba(adaptor->getAddress()->getAddress_str().c_str(),&source);
// connect to the SDP server running on the remote machine
session = sdp_connect_custom(&source,&target,SDP_RETRY_IF_BUSY);
if(session==NULL)
{
return -1;
}

// specify the UUID of the application service(s) we're searching for
uint16_t CPS_svc_uuid_int=CPS_SERV_UUID; // 0x2222
uint16_t OBEX_svc_uuid_int=OBEX_SERV_UUID; // 0x 1105
uuid_t CPS_svc_uuid;
uuid_t OBEX_svc_uuid;
sdp_uuid16_create(&CPS_svc_uuid, CPS_svc_uuid_int);
sdp_uuid16_create(&OBEX_svc_uuid,OBEX_svc_uuid_int);

sdp_list_t * CPS_search_list;
CPS_search_list = sdp_list_append(NULL,&CPS_svc_uuid);
CPS_search_list = sdp_list_append(CPS_search_list,&OBEX_svc_uuid );

// specify that we want a list of all the matching services' attributes

uint16_t rec_num =2;
// get a list of service records that have UUID CPS_SERV_UUID +
OBEX_SERV_UUID
sdp_list_t *CPS_response_list = NULL;

// search

CPS_err =
sdp_service_search_req(session,CPS_search_list,255,&CPS_response_list);

printf("CPS_err is %d\n",CPS_err);
if(CPS_response_list == NULL)
printf("Rsp is NULL\n");
sdp_list_free(CPS_search_list,0);
sdp_close(session);
//...............other..................
}

My program's output is:

CPS_err is -1
Rsp is NULL
NO CPS or OBEX svc founded
Get service failed!00:12:D1:D1:08:47

The HCIDUMP -X -V output is:

.................

< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:12:D1:D1:08:47 ptype 0xcc18 rswitch 0x01 clkoffset 0x40c8
(valid)
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 1 bdaddr 00:12:D1:D1:08:47 type ACL encrypt 0x00
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 1 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK
> HCI Event: Command Complete (0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 1
status 0x00 handle 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Max Slots Change (0x1b) plen 3
handle 1 slots 5
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
status 0x00 handle 1 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> ACL data: handle 1 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Info rsp: type 2 result 1
Not supported
> ACL data: handle 1 flags 0x02 dlen 28
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 2
Connection pending - Authorization pending
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
> ACL data: handle 1 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
Success
MTU 672
< ACL data: handle 1 flags 0x02 dlen 20
L2CAP(d): cid 0x0040 len 16 [psm 1]
SDP SS Req: tid 0x0 len 0xb
pat uuid-16 0x2222 uuid-16 0x1105 (OBEXObjPush)
max 2
cont 00
> ACL data: handle 2 flags 0x02 dlen 14
L2CAP(d): cid 0x0040 len 10 [psm 1]
SDP SS Rsp: tid 0x0 len 0x5
count 0
cont 00
< ACL data: handle 2 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x00bb scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 2 packets 1
> ACL data: handle 2 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x00bb scid 0x0040
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 1 reason 0x13
Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 1 reason 0x16
Reason: Connection Terminated by Local Host
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 2 reason 0x13
Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 2 reason 0x16
Reason: Connection Terminated by Local Host


Who can you tell me why?
thank you.

--
With respects,
Mingfan.Lu


--
With respects,
Mingfan.Lu


Attachments:
(No filename) (5.70 kB)
(No filename) (8.12 kB)
(No filename) (348.00 B)
(No filename) (164.00 B)
Download all attachments

2006-09-27 11:10:54

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Can I search two services at the same time?

Hi,

> Thank you for your nice help.

no problem.

> But I think OR LIST is better :)

The specification says otherwise and that is what counts.

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 11:07:12

by Mingfan.Lu

[permalink] [raw]
Subject: Re: [Bluez-devel] Can I search two services at the same time?

Thank you for your nice help.
But I think OR LIST is better :)

2006/9/27, Marcel Holtmann <[email protected]>:
>
> Hi,
>
> >
> > I have seen that there is a function named sdp_service_search_req,
> > So,I append two service uuid such as obexpush's uuid and another
> > service's uuid into the search list, I want to get the two services'
> > info only call search func once.
>
> I checked with the SDP specification and the UUID list for service
> search is not an OR list of UUIDs. It is an AND list of UUIDs. Which
> means you are looking for service records that contain the first and the
> second UUID. This is per service record and can't be used to find
> service records in the whole database that match either one of these.
> You have to request them sequentially.
>
> 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.35 kB)
(No filename) (1.96 kB)
(No filename) (348.00 B)
(No filename) (164.00 B)
Download all attachments

2006-09-27 09:00:49

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Can I search two services at the same time?

Hi,

>
> I have seen that there is a function named sdp_service_search_req,
> So,I append two service uuid such as obexpush's uuid and another
> service's uuid into the search list, I want to get the two services'
> info only call search func once.

I checked with the SDP specification and the UUID list for service
search is not an OR list of UUIDs. It is an AND list of UUIDs. Which
means you are looking for service records that contain the first and the
second UUID. This is per service record and can't be used to find
service records in the whole database that match either one of these.
You have to request them sequentially.

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:42:13

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Can I search two services at the same time?

Hi,

> My test device is Nokia E61 with bluetooth chip which
> is from Texas Instrument Inc (13)
> LMP version: 1.2 LMP subversion is 0xdb0

since you have the Nokia E61, can you please run "l2test -z <bdaddr>" as
root from the latest bluez-utils-3.5 package.

And take a "hcidump -X -V" from your application searching for the two
records. It might be possible that we have a bug in the library. How is
the CPS record support to look like. Use "sdptool search ..." with the
--raw switch.

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 01:15:28

by Mingfan.Lu

[permalink] [raw]
Subject: Re: [Bluez-devel] Can I search two services at the same time?

My test device is Nokia E61 with bluetooth chip which
is from Texas Instrument Inc (13) LMP version: 1.2 LMP subversion is 0xdb0

When I used kbluetoothd to browse 00:12:D1:D1:08:47 ,
we found the OBEX push(record# 9) and CPS (record# 13).
so the remote device has the records.
HCIDUMP -X -V :
HCI sniffer - Bluetooth packet analyzer ver 1.32
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:12:D1:D1:08:47 ptype 0xcc18 rswitch 0x01 clkoffset 0x35a7
(valid)
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 1 bdaddr 00:12:D1:D1:08:47 type ACL encrypt 0x00
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 1 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK
> HCI Event: Command Complete (0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 1
status 0x00 handle 1
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 00:12:D1:D1:08:47 mode 2 clkoffset 0x0000
> ACL data: handle 1 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Info rsp: type 2 result 1
Not supported
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Max Slots Change (0x1b) plen 3
handle 1 slots 5
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
status 0x00 handle 1 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 28
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 2
Connection pending - Authorization pending
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> ACL data: handle 1 flags 0x02 dlen 26
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
Success
MTU 672
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
< ACL data: handle 1 flags 0x02 dlen 38
L2CAP(d): cid 0x0040 len 34 [psm 1]
SDP SSA Req: tid 0x0 len 0x1d
pat uuid-128 00000000-0000-0000-0000-000000000000
max 65535
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 00:12:D1:D1:08:47 name 'hehe'
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 14
L2CAP(d): cid 0x0040 len 10 [psm 1]
SDP SSA Rsp: tid 0x0 len 0x5
count 2
cont 00
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> ACL data: handle 1 flags 0x02 dlen 36
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 1 status 2
Connection pending - Authorization pending
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
Connection successful
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 1 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
Success
MTU 672
< ACL data: handle 1 flags 0x02 dlen 26
L2CAP(d): cid 0x0041 len 22 [psm 1]
SDP SSA Req: tid 0x0 len 0x11
pat uuid-32 0x0100 (L2CAP)
max 65535
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 676
L2CAP(d): cid 0x0041 len 672 [psm 1]
SDP SSA Rsp: tid 0x0 len 0x29b
count 654
cont 0A 00 00 02 8E 00 00 06 82 00 00
< ACL data: handle 1 flags 0x02 dlen 36
L2CAP(d): cid 0x0041 len 32 [psm 1]
SDP SSA Req: tid 0x1 len 0x1b
pat uuid-32 0x0100 (L2CAP)
max 65535
aid(s) 0x0000 - 0xffff
cont 0A 00 00 02 8E 00 00 06 82 00 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 676
L2CAP(d): cid 0x0041 len 672 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x29b
count 654
cont 0A 00 00 05 1C 00 00 06 82 00 00
< ACL data: handle 1 flags 0x02 dlen 36
L2CAP(d): cid 0x0041 len 32 [psm 1]
SDP SSA Req: tid 0x2 len 0x1b
pat uuid-32 0x0100 (L2CAP)
max 65535
aid(s) 0x0000 - 0xffff
cont 0A 00 00 05 1C 00 00 06 82 00 00
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 370
L2CAP(d): cid 0x0041 len 366 [psm 1]
SDP SSA Rsp: tid 0x2 len 0x169
count 358
record #0
aid 0x0000 (SrvRecHndl)
uint 0x0
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1000 (SDServer) >
aid 0x0002 (SrvRecState)
uint 0x0
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1000 (SDServer) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x656e uint 0x6a uint 0x100 >
aid 0x0007 (SrvInfoTimeToLive)
uint 0x4b0
aid 0x0008 (SrvAvail)
uint 0xff
aid 0x0100 (SrvName)
str "SDP Server"
aid 0x0101 (SrvDesc)
str "Provides local service information for remote
devices."
aid 0x0102 (ProviderName)
str "Symbian Ltd."
aid 0x0200 (VersionNumList)
< uint 0x100 uint 0x101 >
aid 0x0201 (SrvDBState)
uint 0x23
record #1
aid 0x0000 (SrvRecHndl)
uint 0x10000
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110e (AVRemote) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x17 > <
uuid-16 0x0017 (AVCTP) uint 0x100 uint 0xf00 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0100 (SrvName)
str "AVRCP Target"
aid 0x0101 (SrvDesc)
str "Audio Video Remote Control"
aid 0x0102 (ProviderName)
str "Symbian Software Ltd."
record #2
aid 0x0000 (SrvRecHndl)
uint 0x1000c
aid 0x0001 (SrvClassIDList)
< uuid-16 0x111f (Handsfree AG) uuid-16 0x1203 (Audio) >
aid 0x0002 (SrvRecState)
uint 0x8
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0x1c > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x111f (Handsfree AG) uint 0x101 > >
aid 0x0100 (SrvName)
str "Hands-Free Audio Gateway"
aid 0x0301 (SuppDataStoresList)
uint 0x1
aid 0x0311 (SuppFeatures)
uint 0xf
record #3
aid 0x0000 (SrvRecHndl)
uint 0x1000d
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1112 (Headset AG) uuid-16 0x1203 (Audio) >
aid 0x0002 (SrvRecState)
uint 0x6
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0x1d > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x1108 (Headset) uint 0x100 > >
aid 0x0100 (SrvName)
str "Headset Audio Gateway"
record #4
aid 0x0000 (SrvRecHndl)
uint 0x1000e
aid 0x0001 (SrvClassIDList)
< uuid-128 00000002-0000-1000-8000-0002ee000002 >
aid 0x0002 (SrvRecState)
uint 0x6
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0xa > <
uuid-16 0x0008 (OBEX) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-128 00000002-0000-1000-8000-0002ee000002 uint
0x100 > >
aid 0x0100 (SrvName)
str "SyncMLClient"
record #5
aid 0x0000 (SrvRecHndl)
uint 0x1000f
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1106 (OBEXObjTrnsf) >
aid 0x0002 (SrvRecState)
uint 0x6
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0xb > <
uuid-16 0x0008 (OBEX) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x1106 (OBEXObjTrnsf) uint 0x100 > >
aid 0x0100 (SrvName)
str "OBEX File Transfer"
record #6
aid 0x0000 (SrvRecHndl)
uint 0x10010
aid 0x0001 (SrvClassIDList)
< uuid-128 00005005-0000-1000-8000-0002ee000001 >
aid 0x0002 (SrvRecState)
uint 0x6
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0xc > <
uuid-16 0x0008 (OBEX) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-128 00005005-0000-1000-8000-0002ee000001 uint
0x100 > >
aid 0x0100 (SrvName)
str "Nokia OBEX PC Suite Services"
record #7
aid 0x0000 (SrvRecHndl)
uint 0x10011
aid 0x0001 (SrvClassIDList)
< uuid-128 00000004-0000-1000-8000-0002ee000002 >
aid 0x0002 (SrvRecState)
uint 0x6
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0xd > <
uuid-16 0x0008 (OBEX) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-128 00000004-0000-1000-8000-0002ee000002 uint
0x100 > >
aid 0x0100 (SrvName)
str "SyncML DM Client"
record #8
aid 0x0000 (SrvRecHndl)
uint 0x10012
aid 0x0001 (SrvClassIDList)
< uuid-128 00005601-0000-1000-8000-0002ee000001 >
aid 0x0002 (SrvRecState)
uint 0x6
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0xe > <
uuid-16 0x0008 (OBEX) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-128 00005601-0000-1000-8000-0002ee000001 uint
0x100 > >
aid 0x0100 (SrvName)
str "Nokia SyncML Server"
record #9
aid 0x0000 (SrvRecHndl)
uint 0x10013
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1105 (OBEXObjPush) >
aid 0x0002 (SrvRecState)
uint 0x7
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0x9 > <
uuid-16 0x0008 (OBEX) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x1105 (OBEXObjPush) uint 0x100 > >
aid 0x0100 (SrvName)
str "OBEX Object Push"
aid 0x0303 (SuppFormatsList)
< uint 0xff >
record #10
aid 0x0000 (SrvRecHndl)
uint 0x10014
aid 0x0001 (SrvClassIDList)
< uuid-16 0x1103 (DUN) >
aid 0x0002 (SrvRecState)
uint 0x6
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0x2 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x1103 (DUN) uint 0x100 > >
aid 0x0100 (SrvName)
str "Dial-Up Networking"
record #11
aid 0x0000 (SrvRecHndl)
uint 0x10015
aid 0x0001 (SrvClassIDList)
< < uuid-128 00005557-0000-1000-8000-0002ee000001 > >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0x1 > >
aid 0x0005 (BrwGrpList)
< < uuid-16 0x1002 (PubBrwsGrp) > >
record #12
aid 0x0000 (SrvRecHndl)
uint 0x10016
aid 0x0001 (SrvClassIDList)
< uuid-16 0x111b (ImagingResp) >
aid 0x0002 (SrvRecState)
uint 0xa
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0xf > <
uuid-16 0x0008 (OBEX) > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x454e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x111a (Imaging) uint 0x100 > >
aid 0x0100 (SrvName)
str "Imaging"
aid 0x0310 (SuppCapabilities)
uint 0x1
aid 0x0311 (SuppFeatures)
uint 0x1
aid 0x0312 (SuppFunctions)
uint 0xb
aid 0x0313 (SuppTotalCapacity)
uint 0x400000400000000
record #13
aid 0x0000 (SrvRecHndl)
uint 0x10017
aid 0x0001 (SrvClassIDList)
< uuid-16 0x2222 >
aid 0x0002 (SrvRecState)
uint 0x2
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0x3 > >
aid 0x0008 (SrvAvail)
uint 0xff
aid 0x0100 (SrvName)
str "CPS"
aid 0x0101 (SrvDesc)
str "Symbian91#2#1#320#240#"
cont 00
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 1 reason 0x13
Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 1 reason 0x16
Reason: Connection Terminated by Local Host



2006/9/26, Marcel Holtmann <[email protected]>:

> Hi,
>
> >
> > I have seen that there is a function named sdp_service_search_req,
> > So,I append two service uuid such as obexpush's uuid and another
> > service's uuid into the search list, I want to get the two services'
> > info only call search func once.
> > and then set the max_rec_num = 2,
> > then call
> > sdp_service_search_req(session,search_list,2,&rsp_list);
> > but ,I have seen that the func return 0, but the rsp_list is NULL.
>
> this works, but your remote device does not contain any of these records
> and so it reports non back to you. What kind of remote device is it you
> are testing with.
>
> 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) (18.81 kB)
(No filename) (43.58 kB)
(No filename) (348.00 B)
(No filename) (164.00 B)
Download all attachments

2006-09-26 08:39:16

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Can I search two services at the same time?

Hi,

>
> I have seen that there is a function named sdp_service_search_req,
> So,I append two service uuid such as obexpush's uuid and another
> service's uuid into the search list, I want to get the two services'
> info only call search func once.
> and then set the max_rec_num = 2,
> then call
> sdp_service_search_req(session,search_list,2,&rsp_list);
> but ,I have seen that the func return 0, but the rsp_list is NULL.

this works, but your remote device does not contain any of these records
and so it reports non back to you. What kind of remote device is it you
are testing with.

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