The Bluetooth Service Discovery Protocol (SDP) component enables you to register services with the SDP database, and to query the database for available services.
The Symbian platform Bluetooth Service Discovery Protocol (SDP) component provides APIs that allow you to register services with the SDP database or to 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/Bluetooth/Learn/Technology/Specifications/
UUID Values for SDP services, which are defined in Service Discovery Protocol Assigned Numbers.
The following terms are used frequently throughout the SDP Overviews and Tutorials.
This database 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. 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 "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. You will need to be logged in to the Bluetooth SIG website to see this document
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:
iI you need to print a document on your Symbian platform device you could:
Perform an SDP search for devices offering a print service.
If a device is found offering the print service, you then query it for connection details.
With that information your application creates a Bluetooth connection to the device found using the required connection configuration and prints the document.
The Bluetooth SDP component has the following published libraries. The DLLs that provides the functionality and the libraries to which your code must link are identified below.
DLL | LIB | Short description |
---|---|---|
|
|
Allows a local service to register itself to a local Bluetooth service database. |
|
|
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: