blob: 6f2fb3f23d91f2b22b8d3afa60d86b2681db08ab [file] [log] [blame]
Paul Stewarta4e618b2012-04-25 16:21:22 -07001Device hierarchy
2================
3
4Service org.chromium.flimflam
5Interface org.chromium.flimflam.Device
6Object path [variable prefix]/{device0,device1,...}
7
8Methods dict GetProperties()
9
10 Returns properties for the device object. See
11 the properties section for available properties.
12
13 void SetProperty(string name, variant value)
14
15 Changes the value of the specified property. Only
16 properties that are listed as read-write are
17 changeable. On success a PropertyChanged signal
18 will be emitted.
19
20 Possible Errors: [service].Error.InvalidArguments
21 [service].Error.InvalidProperty
22
23 void ClearProperty(string name)
24
25 Reset the specified parameter to its "factory"
26 value and remove any previously set value from
27 the profile. Only properties that are listed as
28 read-write are changeable.
29
Jason Glasgow37114632012-05-04 09:45:14 -040030 void Enable()
31
32 Enable the device.
33
34 void Disable()
35
36 Disable the device.
37
Paul Stewarta4e618b2012-04-25 16:21:22 -070038 void ProposeScan() --DEPRECATED--
39
40 Start a scan operation if possible.
41
42 For WiFi devices this triggers a search for
43 available WiFi networks. When results are
44 available, the Device.Networks property is
45 updated and a PropertyChanged signal is issued.
46
47 For cellular devices, this triggers a search for
48 available cellular networks, which may take up to a
49 minute to complete. When the results are available,
50 the property Cellular.FoundNetworks (see below) is
51 set with the results.
52
53 Possible Errors: [service].Error.InvalidArguments
54
55 object path AddIPConfig(string method) --DEPRECATED--
56
57 This function only remains so it does not trigger
58 an error in the caller, and returns the path "/",
59 and never returns an error. In flimflam it used to
60 provide the ability to create IPConfig objects
61 to the device to provide IPv4 or IPv6 setup state.
62
63 void RequirePin(string pin, boolean require)
64
65 (Cellular only) Enable or disable PIN protection for
66 a cellular modem's SIM card. If 'require' is true,
67 then a PIN will need to be supplied (by calling
68 EnterPin) before the modem is usable. If 'require'
69 is false, a PIN will not be required.
70
71 Possible Errors: [service].Error.InvalidArguments
72 [service].Error.NotSupported
73 [service].Error.PinError
74
75 In the case of PinError, the error message gives
76 more detail: [interface].PinRequired
77 [interface].PinBlocked
78 [interface].IncorrectPin
79
80 void EnterPin(string pin)
81
82 (Cellular only) Provide a PIN to unlock a SIM card.
83
84 Possible Errors: [service].Error.InvalidArguments
85 [service].Error.NotSupported
86 [service].Error.PinError
87
88 In the case of PinError, the error message gives
89 more detail: [interface].PinRequired
90 [interface].PinBlocked
91 [interface].IncorrectPin
92
93 void UnblockPin(string puk, string pin)
94
95 (Cellular only) Provide a PUK code to unblock a PIN.
96 When an incorrect PIN has been entered too many times
97 (three is generally the number of tries allowed), the
98 PIN becomes "blocked", and the SIM card can only be
99 unlocked by providing a PUK code provided by the
100 carrier. At the same time, a new PIN must be specified.
101
102 Possible Errors: [service].Error.InvalidArguments
103 [service].Error.NotSupported
104 [service].Error.PinError
105
106 In the case of PinError, the error message gives
107 more detail: [interface].PinRequired
108 [interface].PinBlocked
109 [interface].IncorrectPin
110
111 void ChangePin(string old_pin, string new_pin)
112
113 (Cellular only) Change the PIN used to unlock a SIM
114 card. The existing PIN must be provided along with
115 the new PIN.
116
117 Possible Errors: [service].Error.InvalidArguments
118 [service].Error.NotSupported
119 [service].Error.PinError
120
121 In the case of PinError, the error message gives
122 more detail: [interface].PinRequired
123 [interface].PinBlocked
124 [interface].IncorrectPin
125
126 void Register(string network_id)
127
128 (Cellular only) Initiate registration on the network
129 specified by network_id, which is in the form MCCMNC.
130 If the network ID is the empty string, then switch
131 back to automatic registration mode before initiating
132 registration.
133
134 If registration succeeds, the network_id is remembered,
135 and is saved in the profile, so that the same network
136 will be tried again if the modem is disabled and then
137 re-enabled, or if the system is restarted or resumed.
138
139 If registration fails, the network_id is not
140 remembered, and is not saved in the profile. If it was
141 already in the profile, it is deleted. In addtion, one
142 more attempt is made to register, after switching back
143 to automatic registration mode.
144
Paul Stewart6ff27f52012-07-11 06:51:41 -0700145 void ResetByteCounters()
146
147 Reset the device's persisted counters of transmitted
148 and received bytes. See RecieveByteCount and
149 TransmitByteCount properties below.
150
Paul Stewarta4e618b2012-04-25 16:21:22 -0700151Signals PropertyChanged(string name, variant value)
152
153 This signal indicates a changed value of the given
154 property.
155
156Properties string Address [readonly]
157
158 The low-level (physical) address of the device.
159
160 string BgscanMethod [readwrite]
161
162 (WiFi only) A string identifying the background scan
163 algorithm.
164 Possible values:
165 "simple" [default]
166 "learn"
167
168 A change to this property takes affect on the next
169 association.
170
171 uint16 BgscanShortInterval [readwrite]
172
173 (WiFi only) Time in seconds between background scans
174 when actively searching for better APs (e.g., when
175 roaming).
176
177 A change to this property takes affect on the next
178 association.
179
180 int32 BgscanSignalThreshold [readwrite]
181
182 (WiFi only) Receive signal strength threshold (in dBm),
183 for the currently connected network, below which
184 roaming is triggered.
185
186 A change to this property takes affect on the next
187 association.
188
189 boolean Cellular.AllowRoaming [readwrite]
190
191 (Celluar only) Whether cellular data connections
192 are allowed when the device is roaming (i.e,
193 not registered on the home network). When this
194 property is false, data connections are not
195 allowed while roaming (regardless of the AutoConnect
196 setting of associated services).
197
198 If a connection was established while on the home
199 network, and the device begins roaming, the data
200 connection is terminated.
201
202 If the property is true, and a data connection was
203 established while roaming, and then the property is
204 set to false, the connection is terminated.
205
206 If the Cellular.ProviderRequiresRoaming property
207 is true, that setting will override this property's
208 setting.
209
210 By default Cellular.AllowRoaming is false.
211
212 string Cellular.Carrier [readonly]
213
214 (Cellular only) The name of the carrier for
215 which the device is configured.
216
217 dict Cellular.HomeProvider [readonly] [GSM only]
218
219 (Cellular only) Description of the operator that
220 issued the SIM card currently installed in the modem.
221 The dictionary may contain the following string-valued
222 properties:
223
224 "name" The operator name
225 "country" The two-letter country code.
226 "network_id" The MCC (Mobile Country Code)
227 and MNC (Mobile Network Code) of the
228 operator on whose network the device is
229 registered. The value of the property is
230 the simple concatenation of the MCC and
231 the MNC, with no separator. The first
232 three digits are always the MCC, and
233 the following two or three digits are the
234 MNC.
235
236 string Cellular.MEID [readonly]
237
238 (Cellular only) For CDMA modems, the Mobile
239 Equipment Identifer of the modem.
240
241 string Cellular.IMEI [readonly]
242
243 (Cellular only) The International Mobile Equipment
244 Identity of the modem.
245
246 string Cellular.IMSI [readonly]
247
248 (Cellular only) For GSM modems, the International
249 Mobile Subscriber Identity of the SIM card
250 installed in the device.
251
252 string Cellular.ESN [readonly]
253
254 (Cellular only) The Electronic Serial Number of
255 the modem.
256
257 string Cellular.MDN [readonly]
258
259 (Cellular only) The Mobile Directory Number
260 (i.e., phone number) of the device.
261
262 string Cellular.MIN [readonly]
263
264 (Cellular only) The Mobile Identification Number
265 of the device. The MIN is often the same as
266 the MDN, but may change if a user changes to a
267 different service provider.
268
269 string Cellular.ModelID [readonly]
270
271 (Cellular only) The hardware model of the modem. The
272 contents of this property are unspecified, and are
273 useful primarily as a diagnostic aid.
274
275 string Cellular.Manufacturer [readonly]
276
277 (Cellular only) The manufacturer of the modem. The
278 contents of this property are unspecified,
279 and are useful primarily as a diagnostic aid.
280
281 string Cellular.FirmwareRevision [readonly]
282
283 (Cellular only) The revision of firmware that is
284 loaded in the modem. The contents of this property
285 are unspecified, and are useful primarily as a
286 diagnostic aid.
287
288 string Cellular.HardwareRevision [readonly]
289
290 (Cellular only) The hardware revision of
291 the modem. The contents of this property are
292 unspecified, and are useful primarily as a
293 diagnostic aid.
294
295 int16 Cellular.PRLVersion [readonly]
296
297 (Cellular only) The revision of the Preferred
298 Roaming List that is loaded in the modem.
299 Cellular.PRLVersion is primarily useful as a
300 diagnostic aid.
301
302 boolean Cellular.ProviderRequiresRoaming [readonly]
303
304 (Celluar only) Indicates that the cellular
305 provider (determined based on IMSI and SPN)
306 requires roaming. This is important to
307 certain MVNOs which have no home network and
308 wish to provide network services without
309 regard to the Cellular.AllowRoaming setting.
310
311 dict Cellular.SIMLockStatus [readonly]
312
313 (Cellular only) For GSM modems, a dictionary
314 containing two properties describing the state
315 of the SIM card lock. The two properties are:
316
317 string LockType
318
319 If this string is empty, the SIM card is not
320 PIN-locked. Otherwise, it specifies the type
321 of lock in effect: "sim-pin" or "sim-puk".
322
323 uint32 RetriesLeft
324
325 If LockType is empty or is "sim-pin", then
326 this property gives the number of attempts
327 remaining to supply a correct PIN before the
328 PIN becomes blocked, at which point a PUK
329 provided by the carrier would be necessary
330 to unlock the SIM (and the LockType changes to
331 "sim-puk").
332
333 If LockType is "sim-puk", then this property
334 gives the number of attempts remaining to supply
335 a correct PUK before the SIM card becomes
336 permanently locked, at which point the SIM
337 card must be replaced. This state is indicated
338 when LockType is "sim-puk" and RetriesLeft is
339 zero.
340
341 boolean LockEnabled
342
343 Indicates whether SIM locking is enabled,
344 i.e., whether, when the device is powered
345 on, a PIN or PUK will need to be entered to
346 unlock the SIM. This differs from the
347 LockType property, which indicates whether
348 the device is currently waiting for a PIN
349 to be entered. The SIM can currently be
350 unlocked (LockType is ""), but at the same
351 time locking can be enabled (LockEnabled is
352 True).
353
354 array{dict} Cellular.FoundNetworks [readonly] [GSM only]
355
356 (Cellular only) The result of the most recent
357 scan operation. The property is an array
358 of dictionaries, with each (string, string) entry
359 from the following properties:
360
361 "status" The availability of the network. Values
362 are "unknown", "available", "current",
363 and "forbidden".
364 "network_id" The network id in the form MCC/MNC
365 (without the '/')
366 "short_name" Short-format name of the network operator
367 "long_name" Long-format name of the network operator
368 "technology" Access technology used by the network, e.g.
369 "GSM", "UMTS", "EDGE", "HSPA", etc.
370
371 array{dict} Cellular.APNList [readonly] [GSM only]
372
373 (Cellular only) The list of APNs associated with
374 the home provider (ref. Cellular.HomeProvider property)
375 The property is an array of dictionaries, with each
376 (string, string) entry from the following properties:
377
378 "apn" The APN, to be used when making
379 connections.
380 "username" The username to be passed along with the
381 APN when making connections. This property
382 is present only if a username is required.
383 "password" The password to be passed along with the
384 APN when making connections. This property
385 is present only if a password is required.
386 "name" Optional description of the APN, not localized.
387 "localized_name"
388 Optional description of the APN, localized.
389 "language"
390 If the "localized_name" property is present, this
391 gives the two-letter language code for the locale
392 of the localized name. If "localized_name" exists,
393 then this property will always exist as well.
394
395 string Interface [readonly]
396
397 The device interface (for example "eth0" etc.)
398
399 This value is for pure informational purposes. It
400 is not guaranteed that it is always present.
401
402 array{object} IPConfigs [readonly] --DEPRECATED--
403
404 List of IPConfig objects paths. Every object path
405 represents a Layer 3 configuration record for
406 the device. In shill, for a connected device,
407 this is always a single object path containing
408 the currently used IPConfig. In the future, use
409 the "IPConfig" property of the Service.
410
411 string Name [readonly]
412
413 The device name (for example "Wireless" etc.)
414
415 This name can be used for directly displaying it in
416 the application. It has pure informational purpose
417 and there is not guarantee that it is present.
418
419 boolean Powered [readonly]
420
Simran Basi53072212012-05-01 15:06:04 -0700421 Indicates whether the device is on or off.
Paul Stewarta4e618b2012-04-25 16:21:22 -0700422
Simran Basi53072212012-05-01 15:06:04 -0700423 This value does not influence the value of the
Paul Stewarta4e618b2012-04-25 16:21:22 -0700424 Policy property.
425
426 The value of this property can be changed by other
427 parts of the system (including the kernel). An
428 example would be modifications via the "ifconfig"
429 command line utility.
430
Paul Stewart6ff27f52012-07-11 06:51:41 -0700431 uint64 ReceiveByteCount [readonly]
432
433 The number of bytes received on this interface.
434 This value is persisted and accumulated across
435 connection manager restarts. Shill retrieves
436 these counters from all interfaces every 60 seconds
437 so this value returned might be slightly old.
438
Paul Stewarta4e618b2012-04-25 16:21:22 -0700439 uint16 ScanInterval [readwrite]
440
441 (Defined in WiFi and Cellular)
442
443 The scan interval is the time in seconds between
444 automated scan attempts. Setting this value to
445 0 will disable the periodic scanning.
446
mukesh agrawalb66c6462012-05-07 11:45:25 -0700447 The default value is 180 and so every 3 minutes
Paul Stewarta4e618b2012-04-25 16:21:22 -0700448 a scan procedure will be triggered.
449
450 This property is not available with all types
451 of devices. Some may not support background
452 scanning at all.
453
454 boolean Scanning [readonly]
455
Darin Petkov9893d9c2012-05-17 15:27:31 -0700456 (Defined in Cellular, WiFi and WiMAX)
Paul Stewarta4e618b2012-04-25 16:21:22 -0700457
458 Indicates that a device is currently performing a
459 network scan.
460
Paul Stewart6ff27f52012-07-11 06:51:41 -0700461 uint64 TransmitByteCount [readonly]
462
463 The number of bytes transmitted on this interface.
464 This value is persisted and accumulated across
465 connection manager restarts. Shill retrieves
466 these counters from all interfaces every 60 seconds
467 so this value returned might be slightly old.
468
Paul Stewarta4e618b2012-04-25 16:21:22 -0700469 string Type [readonly]
470
471 The device type (for example "ethernet", "wifi" etc.)