1
BlueZ D-Bus Adapter API description
2
***********************************
4
Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
5
Copyright (C) 2005-2006 Johan Hedberg <johan.hedberg@nokia.com>
6
Copyright (C) 2005-2006 Claudio Takahasi <claudio.takahasi@indt.org.br>
7
Copyright (C) 2006-2007 Luiz von Dentz <luiz.dentz@indt.org.br>
14
Interface org.bluez.Adapter
15
Object path [variable prefix]/{hci0,hci1,...}
17
Methods dict GetProperties()
19
Returns all properties for the adapter. See the
20
properties section for available properties.
22
Possible Errors: org.bluez.Error.DoesNotExist
23
org.bluez.Error.InvalidArguments
25
void SetProperty(string name, variant value)
27
Changes the value of the specified property. Only
28
properties that are listed a read-write are changeable.
29
On success this will emit a PropertyChanged signal.
31
Possible Errors: org.bluez.Error.DoesNotExist
32
org.bluez.Error.InvalidArguments
34
void RequestMode(string mode) {deprecated}
36
This method will request a mode change. The mode
37
change must be confirmed by the user via the agent.
39
Possible modes for this call are "connectable" and
40
"discoverable". Any application that wants to use
41
Bluetooth functionality can use this method to
42
indicate which mode it needs to operate sucessfully.
44
In case the user doesn't confirm the mode change it
45
will return an error to indicate this rejection.
47
Possible Errors: org.bluez.Error.DoesNotExist
48
org.bluez.Error.InvalidArguments
49
org.bluez.Error.Rejected
51
void ReleaseMode() {deprecated}
53
Releases a mode requested via RequestMode.
55
Possible Errors: org.bluez.Error.DoesNotExist
59
This method will request a client session that
60
provides operational Bluetooth. A possible mode
61
change must be confirmed by the user via the agent.
63
Possible Errors: org.bluez.Error.Rejected
67
Release a previous requested session.
69
Possible Errors: org.bluez.Error.DoesNotExist
73
This method starts the device discovery session. This
74
includes an inquiry procedure and remote device name
75
resolving. Use StopDiscovery to release the sessions
78
This process will start emitting DeviceFound and
79
PropertyChanged "Discovering" signals.
81
Possible errors: org.bluez.Error.NotReady
82
org.bluez.Error.Failed
86
This method will cancel any previous StartDiscovery
89
Note that a discovery procedure is shared between all
90
discovery sessions thus calling StopDiscovery will only
91
release a single session.
93
Possible errors: org.bluez.Error.NotReady
94
org.bluez.Error.Failed
95
org.bluez.Error.NotAuthorized
97
object FindDevice(string address)
99
Returns the object path of device for given address.
100
The device object needs to be first created via
101
CreateDevice or CreatePairedDevice.
103
Possible Errors: org.bluez.Error.DoesNotExist
104
org.bluez.Error.InvalidArguments
106
array{object} ListDevices()
108
Returns list of device object paths.
110
Possible errors: org.bluez.Error.InvalidArguments
111
org.bluez.Error.Failed
112
org.bluez.Error.OutOfMemory
114
object CreateDevice(string address)
116
Creates a new object path for a remote device. This
117
method will connect to the remote device and retrieve
120
If the object for the remote device already exists
121
this method will fail.
123
Possible errors: org.bluez.Error.InvalidArguments
124
org.bluez.Error.Failed
126
object CreatePairedDevice(string address, object agent,
129
Creates a new object path for a remote device. This
130
method will connect to the remote device and retrieve
131
all SDP records and then initiate the pairing.
133
If previously CreateDevice was used successfully,
134
this method will only initiate the pairing.
136
Compared to CreateDevice this method will fail if
137
the pairing already exists, but not if the object
138
path already has been created. This allows applications
139
to use CreateDevice first and the if needed use
140
CreatePairedDevice to initiate pairing.
142
The capability parameter is the same as for the
143
RegisterAgent method.
145
Possible errors: org.bluez.Error.InvalidArguments
146
org.bluez.Error.Failed
148
void CancelDeviceCreation(string address)
150
Aborts either a CreateDevice call or a
151
CreatePairedDevice call.
153
Possible errors: org.bluez.Error.InvalidArguments
154
org.bluez.Error.NotInProgress
156
void RemoveDevice(object device)
158
This removes the remote device object at the given
159
path. It will remove also the pairing information.
161
Possible errors: org.bluez.Error.InvalidArguments
162
org.bluez.Error.Failed
164
void RegisterAgent(object agent, string capability)
166
This registers the adapter wide agent.
168
The object path defines the path the of the agent
169
that will be called when user input is needed.
171
If an application disconnects from the bus all
172
of its registered agents will be removed.
174
The capability parameter can have the values
175
"DisplayOnly", "DisplayYesNo", "KeyboardOnly" and
176
"NoInputNoOutput" which reflects the input and output
177
capabilities of the agent. If an empty string is
178
used it will fallback to "DisplayYesNo".
180
Possible errors: org.bluez.Error.InvalidArguments
181
org.bluez.Error.AlreadyExists
183
void UnregisterAgent(object agent)
185
This unregisters the agent that has been previously
186
registered. The object path parameter must match the
187
same value that has been used on registration.
189
Possible errors: org.bluez.Error.DoesNotExist
191
Signals PropertyChanged(string name, variant value)
193
This signal indicates a changed value of the given
196
DeviceFound(string address, dict values)
198
This signal will be send every time an inquiry result
199
has been found by the service daemon. In general they
200
only appear during a device discovery.
202
The dictionary can contain bascially the same values
203
that we be returned by the GetProperties method
204
from the org.bluez.Device interface. In addition there
205
can be values for the RSSI and the TX power level.
207
DeviceDisappeared(string address)
209
This signal will be send when an inquiry session for
210
a periodic discovery finishes and previously found
211
devices are no longer in range or visible.
213
DeviceCreated(object device)
215
Parameter is object path of created device.
217
DeviceRemoved(object device)
219
Parameter is object path of removed device.
221
Properties string Address [readonly]
223
The Bluetooth device address.
225
string Name [readwrite]
227
The Bluetooth friendly name. This value can be
228
changed and a PropertyChanged signal will be emitted.
230
string Mode [readwrite] {deprecated}
232
The Bluetooth operation mode.
234
Valid modes: "off", "connectable",
235
"discoverable", "limited"
237
This is deprecated by the Powered and Discoverable
240
boolean Powered [readwrite]
242
Switch an adapter on or off. This will also set the
243
appropiate connectable state.
245
boolean Discoverable [readwrite]
247
Switch an adapter to discoverable or non-discoverable
248
to either make it visible or hide it. This is a global
249
setting and should only be used by the settings
252
If the DiscoverableTimeout is set to a non-zero
253
value then the system will set this value back to
254
false after the timer expired.
256
In case the adapter is switched off, setting this
259
When changing the Powered property the new state of
260
this property will be updated via a PropertyChanged
263
uint32 DiscoverableTimeout [readwrite]
265
The discoverable timeout in seconds. A value of zero
266
means that the timeout is disabled and it will stay in
267
discoverable/limited mode forever.
269
The default value for the discoverable timeout should
270
be 180 seconds (3 minutes).
272
boolean Discovering [readonly]
274
Indicates that a device discovery procedure is active.
276
array{object} Devices [readonly]
278
List of device object paths.