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