2008-03-06 06:10:58 +08:00
|
|
|
BlueZ D-Bus Adapter API description
|
|
|
|
***********************************
|
|
|
|
|
2010-01-02 09:08:17 +08:00
|
|
|
Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
|
2008-03-06 06:10:58 +08:00
|
|
|
Copyright (C) 2005-2006 Johan Hedberg <johan.hedberg@nokia.com>
|
|
|
|
Copyright (C) 2005-2006 Claudio Takahasi <claudio.takahasi@indt.org.br>
|
2008-03-07 22:39:14 +08:00
|
|
|
Copyright (C) 2006-2007 Luiz von Dentz <luiz.dentz@indt.org.br>
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
|
|
|
|
Adapter hierarchy
|
|
|
|
=================
|
|
|
|
|
|
|
|
Service org.bluez
|
|
|
|
Interface org.bluez.Adapter
|
2008-08-15 06:42:53 +08:00
|
|
|
Object path [variable prefix]/{hci0,hci1,...}
|
2008-03-06 06:10:58 +08:00
|
|
|
|
|
|
|
Methods dict GetProperties()
|
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Returns all properties for the adapter. See the
|
|
|
|
properties section for available properties.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2010-09-14 04:05:25 +08:00
|
|
|
Possible Errors: org.bluez.Error.NotReady
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
void SetProperty(string name, variant value)
|
2008-03-14 02:26:08 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Changes the value of the specified property. Only
|
|
|
|
properties that are listed a read-write are changeable.
|
|
|
|
On success this will emit a PropertyChanged signal.
|
2008-03-14 02:26:08 +08:00
|
|
|
|
2010-09-14 04:05:25 +08:00
|
|
|
Possible Errors: org.bluez.Error.InvalidArguments
|
2008-03-14 02:26:08 +08:00
|
|
|
|
2008-09-24 03:34:46 +08:00
|
|
|
void RequestSession()
|
|
|
|
|
|
|
|
This method will request a client session that
|
|
|
|
provides operational Bluetooth. A possible mode
|
|
|
|
change must be confirmed by the user via the agent.
|
|
|
|
|
|
|
|
Possible Errors: org.bluez.Error.Rejected
|
|
|
|
|
2008-09-24 05:10:06 +08:00
|
|
|
void ReleaseSession()
|
2008-09-24 03:34:46 +08:00
|
|
|
|
|
|
|
Release a previous requested session.
|
|
|
|
|
|
|
|
Possible Errors: org.bluez.Error.DoesNotExist
|
|
|
|
|
2008-09-04 06:31:10 +08:00
|
|
|
void StartDiscovery()
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-09-04 06:31:10 +08:00
|
|
|
This method starts the device discovery session. This
|
2008-03-06 06:10:58 +08:00
|
|
|
includes an inquiry procedure and remote device name
|
2008-09-04 06:31:10 +08:00
|
|
|
resolving. Use StopDiscovery to release the sessions
|
|
|
|
acquired.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-09-04 06:31:10 +08:00
|
|
|
This process will start emitting DeviceFound and
|
|
|
|
PropertyChanged "Discovering" signals.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.NotReady
|
|
|
|
org.bluez.Error.Failed
|
|
|
|
|
2008-09-04 06:31:10 +08:00
|
|
|
void StopDiscovery()
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-09-04 06:31:10 +08:00
|
|
|
This method will cancel any previous StartDiscovery
|
2008-05-29 19:43:08 +08:00
|
|
|
transaction.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-09-04 06:31:10 +08:00
|
|
|
Note that a discovery procedure is shared between all
|
|
|
|
discovery sessions thus calling StopDiscovery will only
|
|
|
|
release a single session.
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
Possible errors: org.bluez.Error.NotReady
|
|
|
|
org.bluez.Error.Failed
|
|
|
|
org.bluez.Error.NotAuthorized
|
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
object FindDevice(string address)
|
|
|
|
|
|
|
|
Returns the object path of device for given address.
|
|
|
|
The device object needs to be first created via
|
|
|
|
CreateDevice or CreatePairedDevice.
|
|
|
|
|
|
|
|
Possible Errors: org.bluez.Error.DoesNotExist
|
|
|
|
org.bluez.Error.InvalidArguments
|
|
|
|
|
2010-02-13 02:16:31 +08:00
|
|
|
array{object} ListDevices() {deprecated}
|
2008-03-14 03:05:18 +08:00
|
|
|
|
|
|
|
Returns list of device object paths.
|
2010-02-13 02:16:31 +08:00
|
|
|
This method is deprecated, instead use the Devices
|
|
|
|
Property to get the list of devices object paths.
|
2008-03-14 03:05:18 +08:00
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.Failed
|
|
|
|
org.bluez.Error.OutOfMemory
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
object CreateDevice(string address)
|
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Creates a new object path for a remote device. This
|
|
|
|
method will connect to the remote device and retrieve
|
|
|
|
all SDP records.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
If the object for the remote device already exists
|
|
|
|
this method will fail.
|
2008-03-07 06:01:30 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.Failed
|
2008-03-07 06:01:30 +08:00
|
|
|
|
2008-06-03 22:29:57 +08:00
|
|
|
object CreatePairedDevice(string address, object agent,
|
|
|
|
string capability)
|
2008-03-07 22:39:14 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Creates a new object path for a remote device. This
|
|
|
|
method will connect to the remote device and retrieve
|
|
|
|
all SDP records and then initiate the pairing.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
If previously CreateDevice was used successfully,
|
|
|
|
this method will only initiate the pairing.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Compared to CreateDevice this method will fail if
|
|
|
|
the pairing already exists, but not if the object
|
|
|
|
path already has been created. This allows applications
|
|
|
|
to use CreateDevice first and the if needed use
|
|
|
|
CreatePairedDevice to initiate pairing.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-11-18 21:47:08 +08:00
|
|
|
The agent object path is assumed to reside within the
|
|
|
|
process (D-Bus connection instance) that calls this
|
|
|
|
method. No separate registration procedure is needed
|
|
|
|
for it and it gets automatically released once the
|
|
|
|
pairing operation is complete.
|
|
|
|
|
2008-06-03 22:29:57 +08:00
|
|
|
The capability parameter is the same as for the
|
|
|
|
RegisterAgent method.
|
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.Failed
|
|
|
|
|
2008-09-26 10:01:08 +08:00
|
|
|
void CancelDeviceCreation(string address)
|
|
|
|
|
|
|
|
Aborts either a CreateDevice call or a
|
|
|
|
CreatePairedDevice call.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.NotInProgress
|
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
void RemoveDevice(object device)
|
|
|
|
|
|
|
|
This removes the remote device object at the given
|
|
|
|
path. It will remove also the pairing information.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.Failed
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-06-03 21:55:38 +08:00
|
|
|
void RegisterAgent(object agent, string capability)
|
2008-03-14 03:28:32 +08:00
|
|
|
|
|
|
|
This registers the adapter wide agent.
|
|
|
|
|
2010-11-23 03:05:56 +08:00
|
|
|
The object path defines the path of the agent
|
2008-03-14 03:28:32 +08:00
|
|
|
that will be called when user input is needed.
|
|
|
|
|
|
|
|
If an application disconnects from the bus all
|
|
|
|
of its registered agents will be removed.
|
|
|
|
|
2008-06-03 21:55:38 +08:00
|
|
|
The capability parameter can have the values
|
|
|
|
"DisplayOnly", "DisplayYesNo", "KeyboardOnly" and
|
|
|
|
"NoInputNoOutput" which reflects the input and output
|
|
|
|
capabilities of the agent. If an empty string is
|
|
|
|
used it will fallback to "DisplayYesNo".
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.AlreadyExists
|
2008-03-14 03:28:32 +08:00
|
|
|
|
|
|
|
void UnregisterAgent(object agent)
|
|
|
|
|
|
|
|
This unregisters the agent that has been previously
|
|
|
|
registered. The object path parameter must match the
|
|
|
|
same value that has been used on registration.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.DoesNotExist
|
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
Signals PropertyChanged(string name, variant value)
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
This signal indicates a changed value of the given
|
|
|
|
property.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
|
|
|
DeviceFound(string address, dict values)
|
|
|
|
|
2010-11-16 02:48:03 +08:00
|
|
|
This signal will be sent every time an inquiry result
|
2008-03-14 03:05:18 +08:00
|
|
|
has been found by the service daemon. In general they
|
|
|
|
only appear during a device discovery.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2010-11-16 02:48:03 +08:00
|
|
|
The dictionary can contain basically the same values
|
|
|
|
that are returned by the GetProperties method
|
2008-03-15 04:00:24 +08:00
|
|
|
from the org.bluez.Device interface. In addition there
|
|
|
|
can be values for the RSSI and the TX power level.
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
DeviceDisappeared(string address)
|
|
|
|
|
2010-11-16 02:48:03 +08:00
|
|
|
This signal will be sent when an inquiry session for
|
2008-03-14 03:05:18 +08:00
|
|
|
a periodic discovery finishes and previously found
|
|
|
|
devices are no longer in range or visible.
|
|
|
|
|
|
|
|
DeviceCreated(object device)
|
|
|
|
|
|
|
|
Parameter is object path of created device.
|
|
|
|
|
|
|
|
DeviceRemoved(object device)
|
|
|
|
|
|
|
|
Parameter is object path of removed device.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-07 22:39:14 +08:00
|
|
|
Properties string Address [readonly]
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
The Bluetooth device address.
|
|
|
|
|
2008-03-11 06:19:35 +08:00
|
|
|
string Name [readwrite]
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
The Bluetooth friendly name. This value can be
|
|
|
|
changed and a PropertyChanged signal will be emitted.
|
|
|
|
|
2009-03-16 09:32:06 +08:00
|
|
|
uint32 Class [readonly]
|
|
|
|
|
|
|
|
The Bluetooth class of device.
|
|
|
|
|
2008-09-24 03:34:46 +08:00
|
|
|
boolean Powered [readwrite]
|
|
|
|
|
|
|
|
Switch an adapter on or off. This will also set the
|
|
|
|
appropiate connectable state.
|
|
|
|
|
|
|
|
boolean Discoverable [readwrite]
|
|
|
|
|
|
|
|
Switch an adapter to discoverable or non-discoverable
|
|
|
|
to either make it visible or hide it. This is a global
|
|
|
|
setting and should only be used by the settings
|
|
|
|
application.
|
|
|
|
|
|
|
|
If the DiscoverableTimeout is set to a non-zero
|
|
|
|
value then the system will set this value back to
|
|
|
|
false after the timer expired.
|
|
|
|
|
|
|
|
In case the adapter is switched off, setting this
|
|
|
|
value will fail.
|
|
|
|
|
2008-09-24 03:42:39 +08:00
|
|
|
When changing the Powered property the new state of
|
|
|
|
this property will be updated via a PropertyChanged
|
|
|
|
signal.
|
|
|
|
|
2008-11-21 03:33:30 +08:00
|
|
|
boolean Pairable [readwrite]
|
|
|
|
|
|
|
|
Switch an adapter to pairable or non-pairable. This is
|
|
|
|
a global setting and should only be used by the
|
|
|
|
settings application.
|
|
|
|
|
|
|
|
Note that this property only affects incoming pairing
|
|
|
|
requests.
|
|
|
|
|
2008-11-28 03:46:38 +08:00
|
|
|
uint32 PaireableTimeout [readwrite]
|
|
|
|
|
|
|
|
The pairable timeout in seconds. A value of zero
|
|
|
|
means that the timeout is disabled and it will stay in
|
|
|
|
pareable mode forever.
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
uint32 DiscoverableTimeout [readwrite]
|
2008-03-07 22:39:14 +08:00
|
|
|
|
2008-03-14 03:05:18 +08:00
|
|
|
The discoverable timeout in seconds. A value of zero
|
|
|
|
means that the timeout is disabled and it will stay in
|
|
|
|
discoverable/limited mode forever.
|
|
|
|
|
|
|
|
The default value for the discoverable timeout should
|
|
|
|
be 180 seconds (3 minutes).
|
|
|
|
|
2008-08-30 05:14:39 +08:00
|
|
|
boolean Discovering [readonly]
|
2008-03-14 03:05:18 +08:00
|
|
|
|
2008-08-30 05:14:39 +08:00
|
|
|
Indicates that a device discovery procedure is active.
|
2008-09-16 19:59:51 +08:00
|
|
|
|
|
|
|
array{object} Devices [readonly]
|
|
|
|
|
|
|
|
List of device object paths.
|
2010-04-08 00:25:49 +08:00
|
|
|
|
|
|
|
array{string} UUIDs [readonly]
|
|
|
|
|
|
|
|
List of 128-bit UUIDs that represents the available
|
|
|
|
local services.
|