• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1BlueZ D-Bus Adapter API description
2***********************************
3
4Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
5Copyright (C) 2005-2006  Johan Hedberg <johan.hedberg@nokia.com>
6Copyright (C) 2005-2006  Claudio Takahasi <claudio.takahasi@indt.org.br>
7Copyright (C) 2006-2007  Luiz von Dentz <luiz.dentz@indt.org.br>
8
9
10Adapter hierarchy
11=================
12
13Service		org.bluez
14Interface	org.bluez.Adapter
15Object path	[variable prefix]/{hci0,hci1,...}
16
17Methods		dict GetProperties()
18
19			Returns all properties for the adapter. See the
20			properties section for available properties.
21
22			Possible Errors: org.bluez.Error.NotReady
23
24		void SetProperty(string name, variant value)
25
26			Changes the value of the specified property. Only
27			properties that are listed a read-write are changeable.
28			On success this will emit a PropertyChanged signal.
29
30			Possible Errors: org.bluez.Error.InvalidArguments
31
32		void RequestSession()
33
34			This method requests a client session that provides
35			operational Bluetooth. A possible mode change must be
36			confirmed by the user via the agent.
37
38			Clients may request multiple sessions. All sessions
39			are released when adapter's mode is changed to off
40			state.
41
42			Possible Errors: org.bluez.Error.Rejected
43
44		void ReleaseSession()
45
46			Release a previously requested session. It sets
47			adapter to the mode in use on the moment of session
48			request.
49
50			SetProperty method call changes adapter's mode
51			persistently, such that session release will not
52			modify it.
53
54			Possible Errors: org.bluez.Error.DoesNotExist
55
56		void StartDiscovery()
57
58			This method starts the device discovery session. This
59			includes an inquiry procedure and remote device name
60			resolving. Use StopDiscovery to release the sessions
61			acquired.
62
63			This process will start emitting DeviceFound and
64			PropertyChanged "Discovering" signals.
65
66			Possible errors: org.bluez.Error.NotReady
67					 org.bluez.Error.Failed
68
69		void StopDiscovery()
70
71			This method will cancel any previous StartDiscovery
72			transaction.
73
74			Note that a discovery procedure is shared between all
75			discovery sessions thus calling StopDiscovery will only
76			release a single session.
77
78			Possible errors: org.bluez.Error.NotReady
79					 org.bluez.Error.Failed
80					 org.bluez.Error.NotAuthorized
81
82		object FindDevice(string address)
83
84			Returns the object path of device for given address.
85			The device object needs to be first created via
86			CreateDevice or CreatePairedDevice.
87
88			Possible Errors: org.bluez.Error.DoesNotExist
89					 org.bluez.Error.InvalidArguments
90
91		array{object} ListDevices() {deprecated}
92
93			Returns list of device object paths.
94			This method is deprecated, instead use the Devices
95			Property to get the list of devices object paths.
96
97			Possible errors: org.bluez.Error.InvalidArguments
98					 org.bluez.Error.Failed
99					 org.bluez.Error.OutOfMemory
100
101		object CreateDevice(string address)
102
103			Creates a new object path for a remote device. This
104			method will connect to the remote device and retrieve
105			all SDP records.
106
107			If the object for the remote device already exists
108			this method will fail.
109
110			Possible errors: org.bluez.Error.InvalidArguments
111					 org.bluez.Error.Failed
112
113		object CreatePairedDevice(string address, object agent,
114							string capability)
115
116			Creates a new object path for a remote device. This
117			method will connect to the remote device and retrieve
118			all SDP records and then initiate the pairing.
119
120			If previously CreateDevice was used successfully,
121			this method will only initiate the pairing.
122
123			Compared to CreateDevice this method will fail if
124			the pairing already exists, but not if the object
125			path already has been created. This allows applications
126			to use CreateDevice first and the if needed use
127			CreatePairedDevice to initiate pairing.
128
129			The agent object path is assumed to reside within the
130			process (D-Bus connection instance) that calls this
131			method. No separate registration procedure is needed
132			for it and it gets automatically released once the
133			pairing operation is complete.
134
135			The capability parameter is the same as for the
136			RegisterAgent method.
137
138			Possible errors: org.bluez.Error.InvalidArguments
139					 org.bluez.Error.Failed
140
141		void CancelDeviceCreation(string address)
142
143			Aborts either a CreateDevice call or a
144			CreatePairedDevice call.
145
146			Possible errors: org.bluez.Error.InvalidArguments
147					 org.bluez.Error.NotInProgress
148
149		void RemoveDevice(object device)
150
151			This removes the remote device object at the given
152			path. It will remove also the pairing information.
153
154			Possible errors: org.bluez.Error.InvalidArguments
155					 org.bluez.Error.Failed
156
157		void RegisterAgent(object agent, string capability)
158
159			This registers the adapter wide agent.
160
161			The object path defines the path of the agent
162			that will be called when user input is needed.
163
164			If an application disconnects from the bus all
165			of its registered agents will be removed.
166
167			The capability parameter can have the values
168			"DisplayOnly", "DisplayYesNo", "KeyboardOnly" and
169			"NoInputNoOutput" which reflects the input and output
170			capabilities of the agent. If an empty string is
171			used it will fallback to "DisplayYesNo".
172
173			Possible errors: org.bluez.Error.InvalidArguments
174					 org.bluez.Error.AlreadyExists
175
176		void UnregisterAgent(object agent)
177
178			This unregisters the agent that has been previously
179			registered. The object path parameter must match the
180			same value that has been used on registration.
181
182			Possible errors: org.bluez.Error.DoesNotExist
183
184Signals		PropertyChanged(string name, variant value)
185
186			This signal indicates a changed value of the given
187			property.
188
189		DeviceFound(string address, dict values)
190
191			This signal will be sent every time an inquiry result
192			has been found by the service daemon. In general they
193			only appear during a device discovery.
194
195			The dictionary can contain basically the same values
196			that are returned by the GetProperties method
197			from the org.bluez.Device interface. In addition there
198			can be values for the RSSI, the TX power level and
199			Broadcaster role.
200
201		DeviceDisappeared(string address)
202
203			This signal will be sent when an inquiry session for
204			a periodic discovery finishes and previously found
205			devices are no longer in range or visible.
206
207		DeviceCreated(object device)
208
209			Parameter is object path of created device.
210
211		DeviceRemoved(object device)
212
213			Parameter is object path of removed device.
214
215Properties	string Address [readonly]
216
217			The Bluetooth device address.
218
219		string Name [readwrite]
220
221			The Bluetooth friendly name. This value can be
222			changed and a PropertyChanged signal will be emitted.
223
224		uint32 Class [readonly]
225
226			The Bluetooth class of device.
227
228		boolean Powered [readwrite]
229
230			Switch an adapter on or off. This will also set the
231			appropiate connectable state.
232
233		boolean Discoverable [readwrite]
234
235			Switch an adapter to discoverable or non-discoverable
236			to either make it visible or hide it. This is a global
237			setting and should only be used by the settings
238			application.
239
240			If the DiscoverableTimeout is set to a non-zero
241			value then the system will set this value back to
242			false after the timer expired.
243
244			In case the adapter is switched off, setting this
245			value will fail.
246
247			When changing the Powered property the new state of
248			this property will be updated via a PropertyChanged
249			signal.
250
251		boolean Pairable [readwrite]
252
253			Switch an adapter to pairable or non-pairable. This is
254			a global setting and should only be used by the
255			settings application.
256
257			Note that this property only affects incoming pairing
258			requests.
259
260		uint32 PaireableTimeout [readwrite]
261
262			The pairable timeout in seconds. A value of zero
263			means that the timeout is disabled and it will stay in
264			pareable mode forever.
265
266		uint32 DiscoverableTimeout [readwrite]
267
268			The discoverable timeout in seconds. A value of zero
269			means that the timeout is disabled and it will stay in
270			discoverable/limited mode forever.
271
272			The default value for the discoverable timeout should
273			be 180 seconds (3 minutes).
274
275		boolean Discovering [readonly]
276
277			Indicates that a device discovery procedure is active.
278
279		array{object} Devices [readonly]
280
281			List of device object paths.
282
283		array{string} UUIDs [readonly]
284
285			List of 128-bit UUIDs that represents the available
286			local services.
287