The Bluetooth Service Discovery Protocol (SDP) component enables you to register services to the SDP database and query the database for available services.
The Symbian platform Bluetooth Service Discovery Protocol (SDP) component provides APIs that allow you to register services to the SDP database or query the database for available services. This functionality is provided by the two SDP APIs:
You need to be familiar with the following:
The Bluetooth Service Discovery Protocol specification, Volume 3 Part C of the Specification of the Bluetooth System, available at www.bluetooth.com/
UUID Values for SDP services.
The following terms are used frequently throughout the SDP Overviews and Tutorials.
This is the database that stores information about available services. If you are writing an application to advertise a specific service you will use the SDP Database APIs to register your service and if you are writing an application that needs to search for available services on other devices you will use the SDP Agent APIs.
A data record for an individual service in the service discovery database.
An attribute of the service that is stored in the service record. We will discuss service record attributes in greater detail in "SDP Service records and attributes ".
Universally Unique Identifier - See the Service Discovery Protocol Assigned Numbers listing from the Bluetooth SIG for a current list of default UUIDs.
Data element alternative - A sequence of data elements of which one must be selected.
Data element sequence - A sequence of data elements.
A service wishing to advertise on the SDP server must create a session with the SDP server using RSdp. A subsession must be created through RSdpDatabase to access the database. A subsession allows service records and their attributes to be added, deleted and updated in the database. The application uses CSdpAgent to query the services and has to implement MSdpAgentNotifier or MSdpElementBuilder interfaces to handle and organize responses from the server.
SDP Database
The SDP database maintains a list of service records that describe the characteristics of services on the local device that may be used by a remote device via Bluetooth. Each service record contains information about a single service.
SDP Agent
The SDP agent retrieves information from a service record in the SDP database by issuing an SDP request. If an application chooses to use a service, it opens a separate connection with the service provider. For example;
if you need to print a document on your Symbian platform phone you could:
do an SDP search for devices offering a print service.
Should a device be found offering the print service you would further query it for connection details.
With that information your application would then create a Bluetooth connection to the device in question using the connection configuration required and print the document.
The Bluetooth SDP component has two published libraries. The DLLs that provides the functionality and the libraries to which your code must link are identified below.
DLL | LIB | Short description |
---|---|---|
sdpdatabase.dll |
sdpdatabase.lib |
Allows a local service to register itself to a local Bluetooth service database. |
sdpagent.dll |
sdpagent.lib |
Enables a Bluetooth device to discover the Bluetooth services, and the attributes of those services, that are available on a remote Bluetooth device. |
The following are typical uses for the SDP Database and SDP Agent APIs:
SDP Database
The SDP Database API provides access to the database for creating and maintaining records of services and setting the service attributes.
For more information see:
The typical uses for the SDP Database are:
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.