2006-02-23 07:42:09 +08:00
|
|
|
D-Bus API description for BlueZ
|
|
|
|
*******************************
|
|
|
|
|
|
|
|
Copyright (C) 2004-2006 Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
|
|
2006-03-08 05:43:21 +08:00
|
|
|
Error hierarchy
|
|
|
|
===============
|
2006-02-27 00:23:16 +08:00
|
|
|
|
|
|
|
Interface org.bluez.Error
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Errors Failed
|
2006-02-27 00:23:16 +08:00
|
|
|
|
|
|
|
An unknown error occured. The error messages is
|
|
|
|
taken from the strerror(errno) function.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
InvalidArguments
|
|
|
|
|
|
|
|
Error returned when the argument list is invalid or
|
|
|
|
out of specification for the method.
|
|
|
|
|
2006-03-08 22:11:41 +08:00
|
|
|
NotAuthorized
|
|
|
|
|
|
|
|
Error returned when the caller of a method is not
|
|
|
|
authorized. This might happen if a caller tries to
|
|
|
|
terminate a connection that it hasn't created.
|
|
|
|
|
2006-02-27 00:23:16 +08:00
|
|
|
OutOfMemory
|
|
|
|
|
|
|
|
Error returned when a memory allocation via malloc()
|
|
|
|
fails. This error is similar to ENOMEM.
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
NoSuchAdapter
|
2006-02-27 00:23:16 +08:00
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Error returned when the requested adapter doesn't
|
2006-02-27 00:23:16 +08:00
|
|
|
exists. This error is similar to ENODEV.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
UnknownAddress
|
|
|
|
|
|
|
|
Error returned when the remote address haven't been
|
|
|
|
seen by a discovery procedure so far.
|
|
|
|
|
|
|
|
NotAvailable
|
|
|
|
|
|
|
|
Error returned when a specified record is not
|
|
|
|
available.
|
|
|
|
|
|
|
|
NotConnected
|
|
|
|
|
|
|
|
Error returned when the remote device isn't connected
|
|
|
|
at the moment.
|
|
|
|
|
|
|
|
ConnectionAttemptFailed
|
|
|
|
|
|
|
|
BondingAlreadyExists
|
|
|
|
|
|
|
|
BondingDoesNotExists
|
|
|
|
|
|
|
|
BondingInProgress
|
|
|
|
|
|
|
|
AuthenticationFailed
|
|
|
|
|
|
|
|
AuthenticationTimeout
|
|
|
|
|
|
|
|
AuthenticationRejected
|
|
|
|
|
|
|
|
AuthenticationCanceled
|
|
|
|
|
|
|
|
UnsupportedMajorClass
|
|
|
|
|
2006-02-27 00:23:16 +08:00
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
Manager hierarchy
|
|
|
|
=================
|
|
|
|
|
|
|
|
Service org.bluez
|
|
|
|
Interface org.bluez.Manager
|
|
|
|
Object path /org/bluez/Manager/
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Methods uint32 InterfaceVersion()
|
|
|
|
|
|
|
|
Returns the current interface version. At the moment
|
|
|
|
only version 0 is supported.
|
|
|
|
|
|
|
|
array{string} ListAdapters()
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Returns list of object paths under /org/bluez/Adapter/
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
string DefaultAdapter()
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Returns object path for the default adapter.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Signals void AdapterAdded(string path)
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Parameter is object path of added adapter.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
void AdapterRemoved(string path)
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Parameter is object path of removed adapter.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Adapter hierarchy
|
2006-03-07 03:48:23 +08:00
|
|
|
=================
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
Service org.bluez
|
2006-02-27 16:48:24 +08:00
|
|
|
Interface org.bluez.Adapter
|
|
|
|
Object path /org/bluez/Adapter/{hci0,hci1,...}/
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
Methods string GetAddress()
|
|
|
|
|
|
|
|
Returns the device address for a given path.
|
|
|
|
|
|
|
|
Example: "00:11:22:33:44:55"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetVersion()
|
|
|
|
|
|
|
|
Returns the version of the Bluetooth chip. This version
|
|
|
|
is compiled from the LMP version. In case of EDR the
|
|
|
|
features attribute must be checked.
|
|
|
|
|
|
|
|
Example: "Bluetooth 2.0 + EDR"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetRevision()
|
|
|
|
|
|
|
|
Returns the revision of the Bluetooth chip. This is a
|
|
|
|
vendor specific value and in most cases it represents
|
|
|
|
the firmware version. This might derive from the HCI
|
|
|
|
revision and LMP subversion values or via extra vendor
|
|
|
|
specific commands.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
In case the revision of a chip is not available. This
|
|
|
|
method should return the LMP subversion value as a
|
|
|
|
string.
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
Example: "HCI 19.2"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetManufacturer()
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Returns the manufacturer of the Bluetooth chip. If
|
|
|
|
the company id is not know the sting "Company ID %d"
|
|
|
|
where %d should be replaced with the numeric value
|
|
|
|
from the manufacturer field.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
Example: "Cambridge Silicon Radio"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetCompany()
|
|
|
|
|
|
|
|
Returns the company name from the OUI database of the
|
|
|
|
Bluetooth device address. This function will need a
|
|
|
|
valid and up-to-date oui.txt from the IEEE. This value
|
|
|
|
will be different from the manufacturer string in the
|
|
|
|
most cases.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
If the oui.txt file is not present or the OUI part of
|
|
|
|
the BD_ADDR is not listed, it should return the
|
|
|
|
string "OUI %s" where %s is the actual OUI.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Example: "Apple Computer"
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
string GetMode()
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Returns the current mode of a adapter.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
Valid modes: "off", "connectable", "discoverable"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
void SetMode(string mode)
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Sets mode of the adapter. See GetMode for valid strings
|
2006-02-23 07:42:09 +08:00
|
|
|
for the mode parameter.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.Failed
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
uint32 GetDiscoverableTimeout()
|
|
|
|
|
|
|
|
Returns the discoverable timeout in seconds. A value
|
|
|
|
of zero means that the timeout is disabled and it will
|
|
|
|
stay in discoverable mode forever.
|
|
|
|
|
|
|
|
The default value for the discoverable timeout should
|
|
|
|
be 180 seconds (3 minutes).
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
void SetDiscoverableTimeout(uint32 timeout)
|
|
|
|
|
|
|
|
Sets the discoverable timeout in seconds. A value of
|
2006-02-27 16:48:24 +08:00
|
|
|
zero disables the timeout and the adapter would be
|
2006-02-23 07:42:09 +08:00
|
|
|
always discoverable.
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Changing this value doesn't set the adapter into
|
2006-02-23 07:42:09 +08:00
|
|
|
discoverable mode. The SetMode method must be used.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.Failed
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
boolean IsConnectable()
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Returns true if the local adapter is connectable and
|
2006-02-23 07:42:09 +08:00
|
|
|
false if it is switched off.
|
|
|
|
|
|
|
|
It is also possible to use GetMode to retrieve this
|
|
|
|
information.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
boolean IsDiscoverable()
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Returns true if the local adapter is discoverable and
|
2006-02-23 07:42:09 +08:00
|
|
|
false if it is only connectable or switched off.
|
|
|
|
|
|
|
|
It is also possible to use GetMode to retrieve this
|
|
|
|
information.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-03-09 02:03:38 +08:00
|
|
|
boolean IsConnected(string address)
|
|
|
|
|
|
|
|
Return true if the local adapter is connected to
|
|
|
|
the remote device.
|
|
|
|
|
|
|
|
Possible errors: none
|
|
|
|
|
|
|
|
array{string} ListConnections()
|
|
|
|
|
|
|
|
Returns a list with addresses of currently connected
|
|
|
|
remote devices.
|
|
|
|
|
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetMajorClass()
|
|
|
|
|
|
|
|
Returns the current major class value for this
|
|
|
|
system. This value is set to "computer" for now.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
If the major class can't be matched by a string
|
|
|
|
the decimal value as string should be returned.
|
|
|
|
|
|
|
|
Possible errors: none
|
|
|
|
|
|
|
|
array{string} ListAvailableMinorClasses()
|
|
|
|
|
|
|
|
Returns a list of available minor classes for the
|
|
|
|
currently used major class. At the moment this should
|
|
|
|
only return a list of minor classes if the major
|
|
|
|
class is set to "computer".
|
|
|
|
|
|
|
|
If the major class is not "computer" an error should
|
|
|
|
be returned.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.UnsupportedMajorClass
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetMinorClass()
|
|
|
|
|
|
|
|
Returns the current minor class value for this
|
|
|
|
system where the default major class is "computer".
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
If the major class is not "computer" an error should
|
|
|
|
be returned.
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
Valid values: "uncategorized", "desktop", "server",
|
|
|
|
"laptop", "handheld", "palm", "wearable"
|
|
|
|
|
|
|
|
The default value is "uncategorized".
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnsupportedMajorClass
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
void SetMinorClass(string minor)
|
|
|
|
|
|
|
|
Sets the local minor class and on success it sends
|
|
|
|
a MinorClassChanged signal.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
If the major class is not "computer" an error should
|
|
|
|
be returned.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.UnsupportedMajorClass
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
array{string} GetServiceClasses()
|
|
|
|
|
|
|
|
Returns the current set of service classes.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
In the case no service classes are set (when no
|
|
|
|
service has been registered) an empty list should
|
|
|
|
be returned.
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
Valid values: "positioning", "networking", "rendering",
|
|
|
|
"capturing", "object transfer", "audio",
|
|
|
|
"telephony", "information"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetName()
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Returns the local adapter name (friendly name) in UTF-8.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: none
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
void SetName(string name)
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Sets the local adapter name. If EIR is supported by
|
|
|
|
the local hardware this modifies also the extended
|
|
|
|
response data value.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.Failed
|
|
|
|
|
|
|
|
Questions: What to do (in case of EIR) if one
|
|
|
|
low-level API call fails.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-02-25 01:26:28 +08:00
|
|
|
string GetRemoteVersion(string address)
|
|
|
|
|
|
|
|
Get the version info for a remote device. This request
|
|
|
|
returns always this information based on its cached
|
|
|
|
data. The base for this string is the LMP version
|
|
|
|
value and the features for EDR support.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
In case the remote address is unknown, it should
|
|
|
|
return the error UnkownAddress and if the data is
|
|
|
|
not available it should return NotAvailable.
|
|
|
|
|
2006-02-25 01:26:28 +08:00
|
|
|
Example: "Bluetooth 2.0 + EDR"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.NotAvailable
|
|
|
|
|
2006-02-25 01:26:28 +08:00
|
|
|
string GetRemoteRevision(string address)
|
|
|
|
|
|
|
|
Get the revision of the Bluetooth chip. This is a
|
|
|
|
vendor specific value and in most cases it represents
|
|
|
|
the firmware version. This derives only from the LMP
|
|
|
|
subversion value.
|
|
|
|
|
|
|
|
Example: "HCI 19.2"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.NotAvailable
|
|
|
|
|
2006-02-25 01:26:28 +08:00
|
|
|
string GetRemoteManufacturer(string address)
|
|
|
|
|
|
|
|
Get the manufacturer of the chip for a remote device.
|
|
|
|
|
|
|
|
Example: "Nokia Mobile Phones"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.NotAvailable
|
|
|
|
|
2006-02-25 01:26:28 +08:00
|
|
|
string GetRemoteCompany(string address)
|
|
|
|
|
|
|
|
Get the company name from the OUI database of the
|
|
|
|
Bluetooth device address. This function will need a
|
|
|
|
valid and up-to-date oui.txt from the IEEE. This value
|
|
|
|
will be different from the manufacturer string in the
|
|
|
|
most cases.
|
|
|
|
|
|
|
|
Example: "Microsoft Corporation"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.NotAvailable
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetRemoteName(string address)
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Get adapter name for a remote device. This request
|
2006-02-23 07:42:09 +08:00
|
|
|
returns always a cached name. The service daemon is
|
|
|
|
responsible for updating the cache.
|
|
|
|
|
2006-03-08 03:31:24 +08:00
|
|
|
If no remote name is available, then this function
|
|
|
|
will return RequestDeferred. In this case the service
|
|
|
|
daemon will try to resolve the name at the next
|
|
|
|
possible opportunity. On success a RemoteNameUpdated
|
|
|
|
signal will be send and if a failure happens it will
|
|
|
|
be indicated by a RemoteNameFailed signal.
|
|
|
|
|
2006-03-08 05:19:18 +08:00
|
|
|
If this is an empty string, the UI might want to
|
2006-03-07 03:48:23 +08:00
|
|
|
display the BD_ADDR instead.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
Example: "00:11:22:33:44:55", "Nokia 770"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.NotAvailable
|
2006-03-08 03:31:24 +08:00
|
|
|
org.bluez.Error.RequestDeferred
|
2006-03-07 03:48:23 +08:00
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string GetRemoteAlias(string address)
|
|
|
|
|
|
|
|
Returns alias name for remote device. If this is
|
2006-03-07 03:48:23 +08:00
|
|
|
an empty string value, the UI should show the
|
2006-02-23 07:42:09 +08:00
|
|
|
remote name instead.
|
|
|
|
|
|
|
|
An alias should supersede the remote name.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.NotAvailable
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
void SetRemoteAlias(string address, string alias)
|
|
|
|
|
|
|
|
Sets alias name for remote device. If alias name is
|
|
|
|
empty, then no alias is set.
|
|
|
|
|
|
|
|
On success the SetRemoteAlias method will produce a
|
|
|
|
RemoteAliasChanged signal which applications can use
|
|
|
|
to update their current display of the remote device
|
|
|
|
name.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.Failed
|
|
|
|
org.bluez.Error.UnknownAddress
|
|
|
|
|
|
|
|
void ClearRemoteAlias(string address)
|
|
|
|
|
|
|
|
Resets alias name for remote device. If there is no
|
|
|
|
alias set for the device this method will silently
|
|
|
|
succeed, but no RemoteAliasCleared signal has to be
|
|
|
|
sent in this case.
|
|
|
|
|
|
|
|
On success the ClearRemoteAlias method will produce
|
|
|
|
a RemoteAliasCleared signal.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.Failed
|
|
|
|
org.bluez.Error.UnknownAddress
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string LastSeen(string address)
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
Returns the date and time when the adapter has been
|
2006-02-23 07:42:09 +08:00
|
|
|
seen by a discover procedure.
|
|
|
|
|
|
|
|
Example: "2006-02-08 12:00:00 GMT"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Question: Can we find a better name?
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
string LastUsed(string address)
|
|
|
|
|
|
|
|
Returns the date and time of the last time when the
|
2006-02-27 16:48:24 +08:00
|
|
|
adapter has been connected.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
Example: "2006-02-08 12:00:00 GMT"
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Question: Can we find a better name?
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
void CreateBonding(string address)
|
|
|
|
|
|
|
|
This method creates a bonding with a remote device.
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
If a link key for this adapter already exists, this
|
2006-02-23 07:42:09 +08:00
|
|
|
procedure should fail instead of trying to create a
|
|
|
|
new pairing.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
If no connection to the remote device exists, a
|
|
|
|
low-level ACL connection must be created.
|
|
|
|
|
|
|
|
This function will block and the calling application
|
|
|
|
should take care of setting are higher timeout. This
|
|
|
|
might be needed in case of a page timeout from the
|
|
|
|
low-level HCI commands.
|
|
|
|
|
|
|
|
In case of success it will send a BondingCreated
|
|
|
|
signal.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.Failed
|
|
|
|
org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.BondingAlreadyExists
|
|
|
|
org.bluez.Error.BondingInProgress
|
|
|
|
org.bluez.Error.ConnectionAttemptFailed
|
|
|
|
org.bluez.Error.AuthenticationFailed
|
|
|
|
org.bluez.Error.AuthenticationTimeout
|
|
|
|
org.bluez.Error.AuthenticationRejected
|
|
|
|
org.bluez.Error.AuthenticationCanceled
|
|
|
|
|
|
|
|
void CancelBondingProcess(string address)
|
|
|
|
|
|
|
|
This method will cancel the CreateBonding process.
|
|
|
|
|
2006-03-08 05:19:18 +08:00
|
|
|
The CreateBonding method will return
|
|
|
|
AuthenticationCanceled to signal that an attempt to
|
|
|
|
create a bonding has been canceled.
|
2006-03-07 03:48:23 +08:00
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
void RemoveBonding(string address)
|
|
|
|
|
|
|
|
This method removes the bonding with a remote device.
|
|
|
|
|
|
|
|
For security reasons this includes removing the actual
|
|
|
|
link key and also disconnecting any open connections
|
|
|
|
for the remote device.
|
|
|
|
|
|
|
|
If the link key was stored on the Bluetooth chip, it
|
|
|
|
must be removed from there, too.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
After deleting the link key this method will send a
|
|
|
|
BondingRemoved signal.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.BondingDoesNotExists
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
boolean HasBonding(string address)
|
|
|
|
|
|
|
|
Returns true if the remote device is bonded and false
|
|
|
|
if no link key is available.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
array{string} ListBondings()
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
List device addresses of currently bonded adapter.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-03-08 05:19:18 +08:00
|
|
|
Possible errors: none
|
2006-03-07 03:48:23 +08:00
|
|
|
|
2006-02-27 18:22:20 +08:00
|
|
|
uint8 GetPinCodeLength(string address)
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
Returns the PIN code length that was used in the
|
|
|
|
pairing process.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.BondingDoesNotExists
|
|
|
|
|
2006-02-27 18:22:20 +08:00
|
|
|
uint8 GetEncryptionKeySize(string address)
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
Returns the currently used encryption key size.
|
|
|
|
|
2006-03-08 05:19:18 +08:00
|
|
|
This method will fail if no connection to the address
|
2006-02-23 07:42:09 +08:00
|
|
|
has been established.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.NotConnected
|
|
|
|
org.bluez.Error.BondingDoesNotExists
|
|
|
|
|
2006-03-08 03:31:24 +08:00
|
|
|
void DiscoverDevices()
|
|
|
|
|
2006-03-08 05:19:18 +08:00
|
|
|
This method starts the device discovery procedure. This
|
2006-03-08 03:31:24 +08:00
|
|
|
includes an inquiry procedure and remote device name
|
|
|
|
resolving.
|
|
|
|
|
|
|
|
On start up this process will generate a DiscoveryStart
|
|
|
|
signal and then return RemoteDeviceFound and also
|
|
|
|
RemoteNameUpdated signals. If the procedure has been
|
|
|
|
finished an DiscoveryCompleted signal will be sent.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InProgress
|
|
|
|
|
|
|
|
void DiscoverDevicesWithoutNameResolving()
|
|
|
|
|
2006-03-08 05:19:18 +08:00
|
|
|
This method starts the device discovery procedure. This
|
|
|
|
includes an inquiry and an optional remote device name
|
|
|
|
resolving. The remote names can be retrieved with
|
|
|
|
GetRemoteName and in the case a name doesn't exist it
|
|
|
|
will be queued for later resolving and GetRemoteName
|
|
|
|
will return an error.
|
2006-03-08 03:31:24 +08:00
|
|
|
|
|
|
|
While this procedure is running every found device
|
|
|
|
will be returned with RemoteDeviceFound. While
|
|
|
|
DiscoverDevices() automatically resolves unknown
|
|
|
|
devices names and sends RemoteNameUpdated in this
|
|
|
|
case it will only happen if GetRemoteName has been
|
|
|
|
called and no previously stored name is available.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InProgress
|
|
|
|
|
|
|
|
void CancelDiscovery()
|
|
|
|
|
|
|
|
This method will cancel any previous DiscoverDevices
|
|
|
|
or DiscoverDevicesWithoutNameResolving actions.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InProgress
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
Signals void ModeChanged(string mode)
|
|
|
|
|
|
|
|
If the current mode is changed with SetMode this signal
|
|
|
|
will inform about the new mode.
|
|
|
|
|
|
|
|
This signal can also be triggered by low-level HCI
|
|
|
|
commands.
|
|
|
|
|
|
|
|
void MinorClassChanged(string minor)
|
|
|
|
|
|
|
|
After changing the minor class with SetMinorClass this
|
|
|
|
signal will provide the new class value.
|
|
|
|
|
|
|
|
void NameChanged(string name)
|
|
|
|
|
2006-02-27 16:48:24 +08:00
|
|
|
After changing the local adapter name with SetName this
|
2006-02-23 07:42:09 +08:00
|
|
|
signal will provide the new name.
|
|
|
|
|
|
|
|
This signal can also be triggered by low-level HCI
|
|
|
|
commands.
|
|
|
|
|
2006-03-08 05:43:21 +08:00
|
|
|
void DiscoveryStarted()
|
2006-03-08 03:31:24 +08:00
|
|
|
|
|
|
|
This signal indicates that a device discovery
|
|
|
|
procedure has been started.
|
|
|
|
|
2006-03-08 05:19:18 +08:00
|
|
|
void DiscoveryCompleted()
|
2006-03-08 03:31:24 +08:00
|
|
|
|
|
|
|
This signal indicates that a device discovery
|
|
|
|
procedure has been completed.
|
|
|
|
|
|
|
|
void RemoteDeviceFound(string address, int16 rssi,
|
|
|
|
string major, string minor, string service)
|
|
|
|
|
|
|
|
This signal will be send every time an inquiry result
|
|
|
|
has been found by the service daemon. In general they
|
|
|
|
only appear during a device discovery.
|
|
|
|
|
|
|
|
void RemoteNameUpdated(string address, string name)
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
This signal will be send every time the service daemon
|
|
|
|
detect a new name for a remote device.
|
|
|
|
|
2006-03-08 03:31:24 +08:00
|
|
|
void RemoteNameFailed(string address)
|
|
|
|
|
2006-03-08 05:43:21 +08:00
|
|
|
This signal will be sent every time the service daemon
|
2006-03-08 03:31:24 +08:00
|
|
|
tries to resolve a remote and this fails.
|
|
|
|
|
2006-02-23 07:42:09 +08:00
|
|
|
void RemoteAliasChanged(string address, string alias)
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
After changing an alias with SetRemoteAlias this
|
|
|
|
signal will indicate the new alias.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
void RemoteAliasCleared(string address)
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
After removing an alias with ClearRemoteAlias this
|
|
|
|
signal will indicate that the alias is no longer
|
|
|
|
valid.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-03-09 02:03:38 +08:00
|
|
|
void RemoteDeviceConnected(string address)
|
|
|
|
|
|
|
|
This signal will be send if a low level connection
|
|
|
|
between two devices has been created.
|
|
|
|
|
|
|
|
void RemoteDeviceDisconnected(string address)
|
|
|
|
|
|
|
|
This signal will be send if a low level connection
|
|
|
|
between two devices has been terminated.
|
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
void BondingCreated(string address)
|
2006-02-23 07:42:09 +08:00
|
|
|
|
2006-03-07 03:48:23 +08:00
|
|
|
Signals that a successful bonding has been created.
|
2006-02-23 07:42:09 +08:00
|
|
|
|
|
|
|
void BondingRemoved(string address)
|
|
|
|
|
|
|
|
Signals that a bonding was removed.
|
2006-03-08 04:49:43 +08:00
|
|
|
|
|
|
|
|
2006-03-09 01:20:43 +08:00
|
|
|
Security hierarchy
|
|
|
|
==================
|
|
|
|
|
|
|
|
Service org.bluez
|
|
|
|
Interface org.bluez.Security
|
|
|
|
Object path /org/bluez/Manager/
|
|
|
|
/org/bluez/Adapter/{hci0,hci1,...}/
|
|
|
|
|
|
|
|
Methods void RegisterDefaultPasskeyAgent(string path)
|
|
|
|
|
|
|
|
This registers the default passkey agent. It can
|
|
|
|
register a passkey for all adapters or for a
|
|
|
|
specific device depending on with object path has
|
|
|
|
been used.
|
|
|
|
|
|
|
|
The path parameter defines the object path of the
|
|
|
|
passkey agent that will be called when a passkey
|
|
|
|
needs to be entered.
|
|
|
|
|
|
|
|
If an application disconnects from the bus all
|
|
|
|
registered passkey agent will be removed.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.AlreadyExists
|
|
|
|
|
|
|
|
void UnregisterDefaultPasskeyAgent(string path)
|
|
|
|
|
|
|
|
This unregisters a default passkey agent that has
|
|
|
|
been previously registered. The object path and
|
|
|
|
the path parameter must match the same values that
|
|
|
|
has been used on registration.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.DoesNotExists
|
|
|
|
|
|
|
|
void RegisterPasskeyAgent(string path, string address)
|
|
|
|
|
|
|
|
This registers the application passkey agent that
|
|
|
|
will be used for any application specific passkey
|
|
|
|
tasks.
|
|
|
|
|
|
|
|
The path parameter defines the object path of the
|
|
|
|
passkey agent that will be called when a passkey
|
|
|
|
needs to be entered. The address defines the remote
|
|
|
|
device that it will answer passkey requests for.
|
|
|
|
|
|
|
|
If an application disconnects from the bus all
|
|
|
|
registered passkey agent will be removed. It will
|
|
|
|
also be unregistered after a timeout and if the
|
|
|
|
pairing succeeds or fails. The application has to
|
|
|
|
take care of that it reregisters the passkey agent.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.AlreadyExists
|
|
|
|
|
|
|
|
void UnregisterPasskeyAgent(string path, string address)
|
|
|
|
|
|
|
|
This unregisters a passkey agent that has been
|
|
|
|
previously registered. The object path and the path
|
|
|
|
and address parameter must match the same values
|
|
|
|
that has been used on registration.
|
|
|
|
|
|
|
|
The method is actually only needed if an application
|
|
|
|
wants to removed the passkey agent and don't wanna
|
|
|
|
wait for the automatic timeout.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.UnknownAddress
|
|
|
|
org.bluez.Error.DoesNotExists
|
|
|
|
|
|
|
|
|
|
|
|
PasskeyAgent hierarchy
|
|
|
|
======================
|
|
|
|
|
|
|
|
Service unique name
|
|
|
|
Interface org.bluez.PasskeyAgent
|
|
|
|
Object path freely definable
|
|
|
|
|
|
|
|
Methods string Request(string address)
|
|
|
|
|
|
|
|
This method gets called when the service daemon
|
|
|
|
needs to get the passkey for an authentication. The
|
|
|
|
return value is actual passkey.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.Rejected
|
|
|
|
org.bluez.Error.Canceled
|
|
|
|
|
|
|
|
|
2006-03-08 04:49:43 +08:00
|
|
|
RFCOMM hierarchy
|
|
|
|
================
|
|
|
|
|
|
|
|
Service org.bluez
|
|
|
|
Interface org.bluez.RFCOMM
|
|
|
|
Object path /org/bluez/Adapter/{hci0,hci1,...}/
|
|
|
|
|
|
|
|
Methods string Connect(string address, string service)
|
|
|
|
|
|
|
|
This creates a connection to a remote RFCOMM based
|
|
|
|
service. The service string can either be a UUID-16,
|
|
|
|
a UUID-32, a UUID-128 or a service abbreviation.
|
|
|
|
|
|
|
|
The return value will be the path of the newly
|
2006-03-08 05:19:18 +08:00
|
|
|
created RFCOMM TTY device (for example /dev/rfcomm0).
|
2006-03-08 04:49:43 +08:00
|
|
|
|
|
|
|
If the application disconnects from the D-Bus this
|
|
|
|
connection will be terminated.
|
|
|
|
|
|
|
|
Valid service values: "vcp", "map", "pbap", "sap",
|
|
|
|
"ftp", "bpp", "bip", "synch",
|
|
|
|
"dun", "opp", "fax", "spp"
|
|
|
|
|
2006-03-08 22:11:41 +08:00
|
|
|
void CancelConnect(string address, string service)
|
|
|
|
|
|
|
|
This method cancels a previous Connect method call.
|
|
|
|
|
2006-03-08 04:49:43 +08:00
|
|
|
string ConnectByChannel(string address, byte channel)
|
|
|
|
|
|
|
|
This creates a connection to a remote RFCOMM based
|
2006-03-08 05:43:21 +08:00
|
|
|
service. In contrast to Connect a channel number is
|
|
|
|
needed.
|
2006-03-08 04:49:43 +08:00
|
|
|
|
|
|
|
The return value will be the path of the newly
|
|
|
|
creates RFCOMM TTY device (for example /dev/rfcomm0).
|
|
|
|
|
|
|
|
If the application disconnects from the D-Bus this
|
|
|
|
connection will be terminated.
|
|
|
|
|
2006-03-08 22:11:41 +08:00
|
|
|
void CancelConnectByChannel(string address, byte channel)
|
|
|
|
|
|
|
|
This method cancels a previous ConnectByChannel
|
|
|
|
method call.
|
|
|
|
|
2006-03-08 04:56:54 +08:00
|
|
|
void Disconnect(string device)
|
2006-03-08 04:49:43 +08:00
|
|
|
|
|
|
|
This will disconnect a previously connected RFCOMM
|
2006-03-08 05:19:18 +08:00
|
|
|
service. The device parameter must be the return value
|
|
|
|
from a previous Connect or ConnectByChannel method
|
|
|
|
call (for example /dev/rfcomm0).
|
2006-03-08 04:49:43 +08:00
|
|
|
|
2006-03-08 04:56:54 +08:00
|
|
|
string Bind(string address, string service)
|
2006-03-08 04:49:43 +08:00
|
|
|
|
|
|
|
string BindByChannel(string address, byte channel)
|
|
|
|
|
|
|
|
void Release(string device)
|
|
|
|
|
|
|
|
array{string} ListBindings()
|
|
|
|
|
|
|
|
|
|
|
|
Signals void Connected(string address, byte channel, string service)
|
|
|
|
|
|
|
|
This signal will be issued once a RFCOMM connection
|
2006-03-08 05:19:18 +08:00
|
|
|
has been established through Connect or ConnectByChannel
|
2006-03-08 04:49:43 +08:00
|
|
|
and the service will be translated into a profile if
|
|
|
|
it is known. Otherwise the UUID will be listed. If
|
|
|
|
no UUID or service name is available it will be an
|
|
|
|
empty string.
|
|
|
|
|
|
|
|
void Disconnected(string address, byte channel, string service)
|
|
|
|
|
|
|
|
This signal will be issued if a RFCOMM connection
|
|
|
|
gets terminated through Disconnect or of the caller
|
|
|
|
application disconnects from the D-Bus.
|
2006-03-09 03:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
SDP hierarchy
|
|
|
|
=============
|
|
|
|
|
|
|
|
Service org.bluez
|
|
|
|
Interface org.bluez.SDP
|
|
|
|
Object path /org/bluez/Adapter/{hci0,hci1,...}/
|
|
|
|
|
|
|
|
Methods array{string} GetIdentifiers(string address)
|
|
|
|
|
|
|
|
array{string} GetIdentifiersByService(string address, string service)
|
|
|
|
|
|
|
|
string GetUUID(string identifier)
|
|
|
|
|
|
|
|
string GetName(string identifier)
|
|
|
|
|
|
|
|
string RegisterRFCOMM(string service, byte channel)
|
|
|
|
|
|
|
|
void UnregisterRFCOMM(string identifier)
|