2008-03-06 06:10:58 +08:00
|
|
|
BlueZ D-Bus Device API description
|
|
|
|
**********************************
|
|
|
|
|
2010-01-02 09:08:17 +08:00
|
|
|
Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
|
2008-03-07 22:39:14 +08:00
|
|
|
Copyright (C) 2005-2006 Johan Hedberg <johan.hedberg@nokia.com>
|
|
|
|
Copyright (C) 2005-2006 Claudio Takahasi <claudio.takahasi@indt.org.br>
|
|
|
|
Copyright (C) 2006-2007 Luiz von Dentz <luiz.dentz@indt.org.br>
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-07 22:39:14 +08:00
|
|
|
|
|
|
|
Device hierarchy
|
|
|
|
================
|
2008-03-06 06:10:58 +08:00
|
|
|
|
|
|
|
Service org.bluez
|
|
|
|
Interface org.bluez.Device
|
2008-08-15 06:42:53 +08:00
|
|
|
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
|
2008-03-06 06:10:58 +08:00
|
|
|
|
|
|
|
Methods dict GetProperties()
|
|
|
|
|
2009-05-08 02:02:00 +08:00
|
|
|
Returns all properties for the device. See the
|
2008-03-14 03:18:30 +08:00
|
|
|
properties section for available properties.
|
|
|
|
|
|
|
|
Possible Errors: org.bluez.Error.DoesNotExist
|
|
|
|
org.bluez.Error.InvalidArguments
|
2008-03-06 06:10:58 +08:00
|
|
|
|
|
|
|
void SetProperty(string name, variant value)
|
|
|
|
|
2008-03-14 03:18:30 +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.
|
|
|
|
|
|
|
|
Possible Errors: org.bluez.Error.DoesNotExist
|
|
|
|
org.bluez.Error.InvalidArguments
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-05-29 19:43:48 +08:00
|
|
|
dict DiscoverServices(string pattern)
|
|
|
|
|
|
|
|
This method starts the service discovery to retrieve
|
|
|
|
remote service records. The pattern parameter can
|
2009-06-19 17:49:29 +08:00
|
|
|
be used to specify specific UUIDs. And empty string
|
|
|
|
will look for the public browse group.
|
2008-05-29 19:43:48 +08:00
|
|
|
|
|
|
|
The return value is a dictionary with the record
|
|
|
|
handles as keys and the service record in XML format
|
2008-06-09 21:03:12 +08:00
|
|
|
as values. The key is uint32 and the value a string
|
|
|
|
for this dictionary.
|
2008-05-29 19:43:48 +08:00
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.NotReady
|
|
|
|
org.bluez.Error.Failed
|
|
|
|
org.bluez.Error.InProgress
|
|
|
|
|
|
|
|
void CancelDiscovery()
|
|
|
|
|
|
|
|
This method will cancel any previous DiscoverServices
|
|
|
|
transaction.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.NotReady
|
|
|
|
org.bluez.Error.Failed
|
|
|
|
org.bluez.Error.NotAuthorized
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
void Disconnect()
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
This method disconnects a specific remote device by
|
|
|
|
terminating the low-level ACL connection. The use of
|
|
|
|
this method should be restricted to administrator
|
|
|
|
use.
|
|
|
|
|
|
|
|
A DisconnectRequested signal will be sent and the
|
|
|
|
actual disconnection will only happen 2 seconds later.
|
|
|
|
This enables upper-level applications to terminate
|
|
|
|
their connections gracefully before the ACL connection
|
|
|
|
is terminated.
|
|
|
|
|
2008-06-10 20:22:11 +08:00
|
|
|
Possible errors: org.bluez.Error.NotConnected
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-09-16 19:56:41 +08:00
|
|
|
array{object} ListNodes()
|
|
|
|
|
|
|
|
Returns list of device node object paths.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.Failed
|
|
|
|
org.bluez.Error.OutOfMemory
|
|
|
|
|
|
|
|
object CreateNode(string uuid)
|
|
|
|
|
|
|
|
Creates a persistent device node binding with a
|
|
|
|
remote device. The actual support for the specified
|
|
|
|
UUID depends if the device driver has support for
|
|
|
|
persistent binding. At the moment only RFCOMM TTY
|
|
|
|
nodes are supported.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.NotSupported
|
|
|
|
|
|
|
|
void RemoveNode(object node)
|
|
|
|
|
|
|
|
Removes a persistent device node binding.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.DoesNotExist
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
Signals PropertyChanged(string name, variant value)
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
This signal indicates a changed value of the given
|
|
|
|
property.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
|
|
|
DisconnectRequested()
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
This signal will be sent when a low level
|
|
|
|
disconnection to a remote device has been requested.
|
|
|
|
The actual disconnection will happen 2 seconds later.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-09-16 19:56:41 +08:00
|
|
|
NodeCreated(object node)
|
|
|
|
|
|
|
|
Parameter is object path of created device node.
|
|
|
|
|
|
|
|
NodeRemoved(object node)
|
|
|
|
|
|
|
|
Parameter is object path of removed device node.
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
Properties string Address [readonly]
|
2008-03-11 06:19:35 +08:00
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
The Bluetooth device address of the remote device.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-07 22:39:14 +08:00
|
|
|
string Name [readonly]
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
The Bluetooth remote name. This value can not be
|
|
|
|
changed. Use the Alias property instead.
|
|
|
|
|
2008-10-24 05:00:45 +08:00
|
|
|
string Icon [readonly]
|
|
|
|
|
|
|
|
Proposed icon name according to the freedesktop.org
|
|
|
|
icon naming specification.
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
uint32 Class [readonly]
|
|
|
|
|
|
|
|
The Bluetooth class of device of the remote device.
|
|
|
|
|
|
|
|
array{string} UUIDs [readonly]
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
List of 128-bit UUIDs that represents the available
|
|
|
|
remote services.
|
2008-03-06 06:10:58 +08:00
|
|
|
|
2010-09-18 04:09:28 +08:00
|
|
|
array{object} Services [readonly]
|
|
|
|
|
|
|
|
List of characteristics based services.
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
boolean Paired [readonly]
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
Indicates if the remote device is paired.
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
boolean Connected [readonly]
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
Indicates if the remote device is currently connected.
|
|
|
|
A PropertyChanged signal indicate changes to this
|
|
|
|
status.
|
|
|
|
|
2008-03-07 22:39:14 +08:00
|
|
|
boolean Trusted [readwrite]
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
Indicates if the remote is seen as trusted. This
|
|
|
|
setting can be changed by the application.
|
|
|
|
|
2010-05-17 23:32:26 +08:00
|
|
|
boolean Blocked [readwrite]
|
|
|
|
|
|
|
|
If set to true any incoming connections from the
|
|
|
|
device will be immediately rejected. Any device
|
|
|
|
drivers will also be removed and no new ones will
|
|
|
|
be probed as long as the device is blocked.
|
|
|
|
|
2008-03-06 06:10:58 +08:00
|
|
|
string Alias [readwrite]
|
2008-03-14 03:18:30 +08:00
|
|
|
|
|
|
|
The name alias for the remote device. The alias can
|
|
|
|
be used to have a different friendly name for the
|
|
|
|
remote device.
|
|
|
|
|
|
|
|
In case no alias is set, it will return the remote
|
|
|
|
device name. Setting an empty string as alias will
|
|
|
|
convert it back to the remote device name.
|
|
|
|
|
2008-03-14 04:13:18 +08:00
|
|
|
When reseting the alias with an empty string, the
|
|
|
|
emitted PropertyChanged signal will show the remote
|
|
|
|
name again.
|
|
|
|
|
2008-09-16 19:59:51 +08:00
|
|
|
array{object} Nodes [readonly]
|
|
|
|
|
|
|
|
List of device node object paths.
|
|
|
|
|
2008-03-14 03:18:30 +08:00
|
|
|
object Adapter [readonly]
|
|
|
|
|
2010-11-19 23:39:15 +08:00
|
|
|
The object path of the adapter the device belongs to.
|
2008-12-04 21:51:04 +08:00
|
|
|
|
2008-12-04 21:56:21 +08:00
|
|
|
boolean LegacyPairing [readonly]
|
2008-12-04 21:51:04 +08:00
|
|
|
|
|
|
|
Set to true if the device only supports the pre-2.1
|
|
|
|
pairing mechanism. This property is useful in the
|
2008-12-04 21:56:21 +08:00
|
|
|
Adapter.DeviceFound signal to anticipate whether
|
2009-06-19 17:54:37 +08:00
|
|
|
legacy or simple pairing will occur.
|
2008-12-04 22:03:29 +08:00
|
|
|
|
|
|
|
Note that this property can exhibit false-positives
|
|
|
|
in the case of Bluetooth 2.1 (or newer) devices that
|
2009-06-19 17:54:37 +08:00
|
|
|
have disabled Extended Inquiry Response support.
|