blob: 3b5fa627896476dd8c2983ddbf2e42c970303d61 [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
Ben Chana5e27082012-07-31 14:30:28 -0700246 string Cellular.ICCID [readonly]
247
248 (Cellular only) For GSM / LTE modems, the Integrated
249 Circuit Card Identifer of the SIM card installed in
250 the device.
251
Paul Stewarta4e618b2012-04-25 16:21:22 -0700252 string Cellular.IMSI [readonly]
253
254 (Cellular only) For GSM modems, the International
255 Mobile Subscriber Identity of the SIM card
256 installed in the device.
257
258 string Cellular.ESN [readonly]
259
260 (Cellular only) The Electronic Serial Number of
261 the modem.
262
263 string Cellular.MDN [readonly]
264
265 (Cellular only) The Mobile Directory Number
266 (i.e., phone number) of the device.
267
268 string Cellular.MIN [readonly]
269
270 (Cellular only) The Mobile Identification Number
271 of the device. The MIN is often the same as
272 the MDN, but may change if a user changes to a
273 different service provider.
274
275 string Cellular.ModelID [readonly]
276
277 (Cellular only) The hardware model of the modem. The
278 contents of this property are unspecified, and are
279 useful primarily as a diagnostic aid.
280
281 string Cellular.Manufacturer [readonly]
282
283 (Cellular only) The manufacturer of the modem. The
284 contents of this property are unspecified,
285 and are useful primarily as a diagnostic aid.
286
287 string Cellular.FirmwareRevision [readonly]
288
289 (Cellular only) The revision of firmware that is
290 loaded in the modem. The contents of this property
291 are unspecified, and are useful primarily as a
292 diagnostic aid.
293
294 string Cellular.HardwareRevision [readonly]
295
296 (Cellular only) The hardware revision of
297 the modem. The contents of this property are
298 unspecified, and are useful primarily as a
299 diagnostic aid.
300
301 int16 Cellular.PRLVersion [readonly]
302
303 (Cellular only) The revision of the Preferred
304 Roaming List that is loaded in the modem.
305 Cellular.PRLVersion is primarily useful as a
306 diagnostic aid.
307
308 boolean Cellular.ProviderRequiresRoaming [readonly]
309
310 (Celluar only) Indicates that the cellular
311 provider (determined based on IMSI and SPN)
312 requires roaming. This is important to
313 certain MVNOs which have no home network and
314 wish to provide network services without
315 regard to the Cellular.AllowRoaming setting.
316
317 dict Cellular.SIMLockStatus [readonly]
318
319 (Cellular only) For GSM modems, a dictionary
320 containing two properties describing the state
321 of the SIM card lock. The two properties are:
322
323 string LockType
324
325 If this string is empty, the SIM card is not
326 PIN-locked. Otherwise, it specifies the type
327 of lock in effect: "sim-pin" or "sim-puk".
328
329 uint32 RetriesLeft
330
331 If LockType is empty or is "sim-pin", then
332 this property gives the number of attempts
333 remaining to supply a correct PIN before the
334 PIN becomes blocked, at which point a PUK
335 provided by the carrier would be necessary
336 to unlock the SIM (and the LockType changes to
337 "sim-puk").
338
339 If LockType is "sim-puk", then this property
340 gives the number of attempts remaining to supply
341 a correct PUK before the SIM card becomes
342 permanently locked, at which point the SIM
343 card must be replaced. This state is indicated
344 when LockType is "sim-puk" and RetriesLeft is
345 zero.
346
347 boolean LockEnabled
348
349 Indicates whether SIM locking is enabled,
350 i.e., whether, when the device is powered
351 on, a PIN or PUK will need to be entered to
352 unlock the SIM. This differs from the
353 LockType property, which indicates whether
354 the device is currently waiting for a PIN
355 to be entered. The SIM can currently be
356 unlocked (LockType is ""), but at the same
357 time locking can be enabled (LockEnabled is
358 True).
359
360 array{dict} Cellular.FoundNetworks [readonly] [GSM only]
361
362 (Cellular only) The result of the most recent
363 scan operation. The property is an array
364 of dictionaries, with each (string, string) entry
365 from the following properties:
366
367 "status" The availability of the network. Values
368 are "unknown", "available", "current",
369 and "forbidden".
370 "network_id" The network id in the form MCC/MNC
371 (without the '/')
372 "short_name" Short-format name of the network operator
373 "long_name" Long-format name of the network operator
374 "technology" Access technology used by the network, e.g.
375 "GSM", "UMTS", "EDGE", "HSPA", etc.
376
377 array{dict} Cellular.APNList [readonly] [GSM only]
378
379 (Cellular only) The list of APNs associated with
380 the home provider (ref. Cellular.HomeProvider property)
381 The property is an array of dictionaries, with each
382 (string, string) entry from the following properties:
383
384 "apn" The APN, to be used when making
385 connections.
386 "username" The username to be passed along with the
387 APN when making connections. This property
388 is present only if a username is required.
389 "password" The password to be passed along with the
390 APN when making connections. This property
391 is present only if a password is required.
392 "name" Optional description of the APN, not localized.
393 "localized_name"
394 Optional description of the APN, localized.
395 "language"
396 If the "localized_name" property is present, this
397 gives the two-letter language code for the locale
398 of the localized name. If "localized_name" exists,
399 then this property will always exist as well.
400
401 string Interface [readonly]
402
403 The device interface (for example "eth0" etc.)
404
405 This value is for pure informational purposes. It
406 is not guaranteed that it is always present.
407
408 array{object} IPConfigs [readonly] --DEPRECATED--
409
410 List of IPConfig objects paths. Every object path
411 represents a Layer 3 configuration record for
412 the device. In shill, for a connected device,
413 this is always a single object path containing
414 the currently used IPConfig. In the future, use
415 the "IPConfig" property of the Service.
416
Paul Stewart036dba02012-08-07 12:34:41 -0700417 int32 LinkMonitorResponseTime [readonly]
418
419 Latest running average of the link monitor response
Paul Stewart3c508e12012-08-09 11:40:06 -0700420 for this device in milliseconds, if the link monitor
421 is active.
Paul Stewart036dba02012-08-07 12:34:41 -0700422
Paul Stewarta4e618b2012-04-25 16:21:22 -0700423 string Name [readonly]
424
425 The device name (for example "Wireless" etc.)
426
427 This name can be used for directly displaying it in
428 the application. It has pure informational purpose
429 and there is not guarantee that it is present.
430
431 boolean Powered [readonly]
432
Simran Basi53072212012-05-01 15:06:04 -0700433 Indicates whether the device is on or off.
Paul Stewarta4e618b2012-04-25 16:21:22 -0700434
Simran Basi53072212012-05-01 15:06:04 -0700435 This value does not influence the value of the
Paul Stewarta4e618b2012-04-25 16:21:22 -0700436 Policy property.
437
438 The value of this property can be changed by other
439 parts of the system (including the kernel). An
440 example would be modifications via the "ifconfig"
441 command line utility.
442
Paul Stewart6ff27f52012-07-11 06:51:41 -0700443 uint64 ReceiveByteCount [readonly]
444
445 The number of bytes received on this interface.
446 This value is persisted and accumulated across
447 connection manager restarts. Shill retrieves
448 these counters from all interfaces every 60 seconds
449 so this value returned might be slightly old.
450
Paul Stewarta4e618b2012-04-25 16:21:22 -0700451 uint16 ScanInterval [readwrite]
452
453 (Defined in WiFi and Cellular)
454
455 The scan interval is the time in seconds between
456 automated scan attempts. Setting this value to
457 0 will disable the periodic scanning.
458
mukesh agrawalb66c6462012-05-07 11:45:25 -0700459 The default value is 180 and so every 3 minutes
Paul Stewarta4e618b2012-04-25 16:21:22 -0700460 a scan procedure will be triggered.
461
462 This property is not available with all types
463 of devices. Some may not support background
464 scanning at all.
465
466 boolean Scanning [readonly]
467
Darin Petkov9893d9c2012-05-17 15:27:31 -0700468 (Defined in Cellular, WiFi and WiMAX)
Paul Stewarta4e618b2012-04-25 16:21:22 -0700469
470 Indicates that a device is currently performing a
471 network scan.
472
Paul Stewart6ff27f52012-07-11 06:51:41 -0700473 uint64 TransmitByteCount [readonly]
474
475 The number of bytes transmitted on this interface.
476 This value is persisted and accumulated across
477 connection manager restarts. Shill retrieves
478 these counters from all interfaces every 60 seconds
479 so this value returned might be slightly old.
480
Paul Stewarta4e618b2012-04-25 16:21:22 -0700481 string Type [readonly]
482
483 The device type (for example "ethernet", "wifi" etc.)