Skip to contentSkip to conversation

Extracting full SDP database from device at once using DBus API

Bluez-devel Pierre-Yves Paulus 2 participants 3 messages Nov 20, 2006 – Nov 21, 2006 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,

At the moment, to perform a full extraction of the SDP database of a device, I first perform a call to

array{uint32} GetRemoteServiceHandles(string address, string match)

with an empty "match" string. It does connect to Public Browse Group, and returns handles for all the ServiceRecords. I then perform a call

array{byte} GetRemoteServiceRecord(string address, uint32 handle)

for each of these handles, and I get all the data in binary form ti interpret myself.

1) Is it the right way to do this, or is there a way to get that all at once?

2) As ServiceRecords are extracted "one at a time", is Bluez connecting and disconnecting to the device each time? Is there a performance penalty in doing so? If I understand the output of hcidump well, it does not close he ACL link each time, but there is a L2CAP connection/disconnection for each ServiceRecord.

Thanks a lot,
Best Regards

Pierre-Yves

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

maintainer
#1 lore raw

Hi Pierre-Yves,

Quoted 8 lines

At the moment, to perform a full extraction of the SDP database of a device, I first perform a call to

array{uint32} GetRemoteServiceHandles(string address, string match)

with an empty "match" string. It does connect to Public Browse Group, and returns handles for all the ServiceRecords. I then perform a call

Quoted 8 lines

array{byte} GetRemoteServiceRecord(string address, uint32 handle)

for each of these handles, and I get all the data in binary form ti interpret myself.

1) Is it the right way to do this, or is there a way to get that all at once?

that is the way to go.

Quoted 5 lines

2) As ServiceRecords are extracted "one at a time", is Bluez connecting and disconnecting to the device each time? Is there a performance penalty in doing so? If I understand the output of hcidump well, it does not close he ACL link each time, but there is a L2CAP connection/disconnection for each ServiceRecord.

We should add a disconnect timeout to our SDP session and re-use it, but that hasn't been done so far.

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

#2 lore raw

Hi Marcel,

Thanks a lot for your kind answer.

Pierre-Yves

Quoted 36 lines · Marcel Holtmann

Hi Pierre-Yves,

Quoted 8 lines

At the moment, to perform a full extraction of the SDP database of a device, I first perform a call to

array{uint32} GetRemoteServiceHandles(string address, string match)

with an empty "match" string. It does connect to Public Browse Group, and returns handles for all the ServiceRecords. I then perform a call

Quoted 8 lines

array{byte} GetRemoteServiceRecord(string address, uint32 handle)

for each of these handles, and I get all the data in binary form ti interpret myself.

1) Is it the right way to do this, or is there a way to get that all at once?

that is the way to go.

Quoted 5 lines

2) As ServiceRecords are extracted "one at a time", is Bluez connecting and disconnecting to the device each time? Is there a performance penalty in doing so? If I understand the output of hcidump well, it does not close he ACL link each time, but there is a L2CAP connection/disconnection for each ServiceRecord.

We should add a disconnect timeout to our SDP session and re-use it, but that hasn't been done so far.

Regards

Marcel

Quoted 9 lines

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

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