Description
SDP queries involves transactions between an SDP server and an SDP client. The server maintains a list of service records that describe the characteristics of services associated with the server.
The database interface provides methods to manage local service records(SDP Server). All of the information about a service that is maintained by an SDP server is contained within a single service record. A service record is basically a list of service attributes. Each service attribute describes a single characteristic of a service such as the service type, name, description, ...
Client methods are available at Adapter interface. See GetRemoteService?{handles, record} methods for more information how retrieve remote service handles/records.
Internal SDP mode
Currently the hcid supports an internal SDP server mode. The '-s' option will enable the SDP server. This option is available for BlueZ 3.9 and earlier versions.
Record ownership and life-cycle
This section is applied for record registered by D-Bus methods only.
- Only the record owner can update or remove the record
- If the owner exits, the record is automatically removed from the database
org.bluez.Database
Database hierarchy
==================
Service org.bluez
Interface org.bluez.Database
Object path /org/bluez or /org/bluez/{hci0,hci1,...}
Methods void RegisterService(string identifier, string name, string description) [experimental]
This method registers a new service specified by
its unique identifier. This is only needed for
services that are not started through the
Bluetooth daemon.
void UnregisterService(string identifier) [experimental]
This method unregisters a service specified by
its unique identifier.
uint32 AddServiceRecord(array{byte})
Adds a new service record and returns the assigned
record handle.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.Failed
uint32 AddServiceRecordFromXML(string record)
Adds a new service record and returns the assigned
record handle.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.Failed
void UpdateServiceRecord(uint32 handle, array{byte})
Updates a given service record.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotAvailable
org.bluez.Error.Failed
void RemoveServiceRecord(uint32 handle)
Remove a service record identified by its handle.
It is only possible to remove service records that
where added by the current connection.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotAuthorized
org.bluez.Error.DoesNotExist
org.bluez.Error.Failed
void RequestAuthorization(string address, string uuid) [experimental]
This method gets called when a service wants to check
if a remote device is authorized to perform some
action. The authorization request is forwarded to an
authorization agent.
The address parameter is the Bluetooth address of the
remote device and the uuid is the identifier of the
profile requesting the authorization. This parameter
can also be left blank.
void CancelAuthorizationRequest(string address, string uuid) [experimental]
This method cancels an authorization process requested
by a previous call to RequestAuthorization(). The
address and uuid parameters must match.
Service Registration
TBD: How register/remove/update, binary and XML format
Message Sequence Chart
TBD:
Binary Format
TBD: What is the binary raw format
XML Format
TBD: Describe the service record XML format
Related Documents
- SDP Records? explain how to register/remove/update local SDP records
