ModemManager.Modem¶
| Subclasses: | None | 
|---|
Methods¶
Virtual Methods¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (7), Gio.AsyncInitable (2), Gio.DBusInterface (3), Gio.Initable (1), ModemManager.GdbusModem (12) | 
|---|
Properties¶
| Inherited: | Gio.DBusProxy (9), ModemManager.GdbusModem (32) | 
|---|
Signals¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusModem (12) | 
|---|
Fields¶
| Inherited: | Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusModem (12) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | ModemManager.GdbusModemProxy | r | 
Class Details¶
- 
class ModemManager.Modem(**kwargs)¶
- Bases: - ModemManager.GdbusModemProxy- Abstract: - No - Structure: - ModemManager.ModemClass- The - ModemManager.Modemstructure contains private data and should only be accessed using the provided API.- 
classmethod get_pending_network_initiated_sessions(self)¶
- Parameters: - self ( - ModemManager.ModemOma) – A- ModemManager.Modem.- Returns: - Trueif sessions and n_sessions are set,- Falseotherwise.- sessions: - Return location for the array of - ModemManager.OmaPendingNetworkInitiatedSessionstructs. The returned array should be freed with- GLib.free() when no longer needed.- Return type: - ( - bool, sessions: [- ModemManager.OmaPendingNetworkInitiatedSession])- Gets the list of pending network-initiated OMA sessions. - New in version 1.2. 
 - 
classmethod peek_pending_network_initiated_sessions(self)¶
- Parameters: - self ( - ModemManager.ModemOma) – A- ModemManager.Modem.- Returns: - Trueif sessions and n_sessions are set,- Falseotherwise.- sessions: - Return location for the array of - ModemManager.OmaPendingNetworkInitiatedSessionvalues. Do not free the returned array, it is owned by self.- Return type: - ( - bool, sessions: [- ModemManager.OmaPendingNetworkInitiatedSession])- Gets the list of pending network-initiated OMA sessions. - New in version 1.2. 
 - 
command(cmd, timeout, cancellable, callback, *user_data)¶
- Parameters: - cmd (str) – AT command to run.
- timeout (int) – Maximum time to wait for the response, in seconds.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously runs an AT command in the modem. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.command_finish() to get the result of the operation.- See - ModemManager.Modem.command_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cmd (
 - 
command_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.command().- Raises: - GLib.Error- Returns: - A newly allocated string with the reply to the command, or - Noneif error is set. The returned value should be freed with- GLib.free().- Return type: - str- Finishes an operation started with - ModemManager.Modem.command().- New in version 1.0. 
 - 
command_sync(cmd, timeout, cancellable)¶
- Parameters: - cmd (str) – AT command to run.
- timeout (int) – Maximum time to wait for the response, in seconds.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - A newly allocated string with the reply to the command, or - Noneif error is set. The returned value should be freed with- GLib.free().- Return type: - Synchronously runs an AT command in the modem. - The calling thread is blocked until a reply is received. See - ModemManager.Modem.command() for the asynchronous version of this method.- New in version 1.0. 
- cmd (
 - 
create_bearer(properties, cancellable, callback, *user_data)¶
- Parameters: - properties (ModemManager.BearerProperties) – AModemManager.BearerPropertiesobject with the properties to use.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously creates a new packet data bearer in the - ModemManager.Modem.- This request may fail if the modem does not support additional bearers, if too many bearers are already defined, or if properties are invalid. - See ‘CreateBearer [gdbus-method-org-freedesktop-ModemManager1-Modem.CreateBearer]’ to check which properties may be passed. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.create_bearer_finish() to get the result of the operation.- See - ModemManager.Modem.create_bearer_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- properties (
 - 
create_bearer_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.create_bearer().- Raises: - GLib.Error- Returns: - A newly created - ModemManager.Bearer, or- Noneif error is set.- Return type: - ModemManager.Bearer- Finishes an operation started with - ModemManager.Modem.create_bearer().- New in version 1.0. 
 - 
create_bearer_sync(properties, cancellable)¶
- Parameters: - properties (ModemManager.BearerProperties) – AModemManager.BearerPropertiesobject with the properties to use.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - A newly created - ModemManager.Bearer, or- Noneif error is set.- Return type: - Synchronously creates a new packet data bearer in the - ModemManager.Modem.- This request may fail if the modem does not support additional bearers, if too many bearers are already defined, or if properties are invalid. - See ‘CreateBearer [gdbus-method-org-freedesktop-ModemManager1-Modem.CreateBearer]’ to check which properties may be passed. - The calling thread is blocked until a reply is received. See - ModemManager.Modem.create_bearer() for the asynchronous version of this method.- New in version 1.0. 
- properties (
 - 
delete_bearer(bearer, cancellable, callback, *user_data)¶
- Parameters: - bearer (str) – Path of the bearer to delete.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously deletes a given bearer from the - ModemManager.Modem.- When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.delete_bearer_finish() to get the result of the operation.- See - ModemManager.Modem.delete_bearer_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- bearer (
 - 
delete_bearer_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.delete_bearer().- Raises: - GLib.Error- Returns: - Trueif the bearer was deleted,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.delete_bearer().- New in version 1.0. 
 - 
delete_bearer_sync(bearer, cancellable)¶
- Parameters: - bearer (str) – Path of the bearer to delete.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Return type: - Synchronously deletes a given bearer from the - ModemManager.Modem.- The calling thread is blocked until a reply is received. See - ModemManager.Modem.delete_bearer() for the asynchronous version of this method.- New in version 1.0. 
- bearer (
 - 
disable(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously tries to disable the - ModemManager.Modem. When disabled, the modem enters low-power state and no network-related operations are available.- When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.disable_finish() to get the result of the operation.- See - ModemManager.Modem.disable_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
disable_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.disable().- Raises: - GLib.Error- Returns: - Trueif the modem was properly disabled,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.disable().- New in version 1.0. 
 - 
disable_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - Trueif the modem was properly disabled,- Falseif error is set.- Return type: - bool- Synchronously tries to disable the - ModemManager.Modem. When disabled, the modem enters low-power state and no network-related operations are available.- The calling thread is blocked until a reply is received. See - ModemManager.Modem.disable() for the asynchronous version of this method.- New in version 1.0. 
 - 
dup_bearer_paths()¶
- Returns: - The DBus paths of the - ModemManager.Bearerhandled in this- ModemManager.Modem, or- Noneif none available. The returned value should be freed with- GLib.strfreev().- Return type: - [ - str]- Gets a copy of the DBus paths of the - ModemManager.Bearerhandled in this- ModemManager.Modem.- New in version 1.0. 
 - 
dup_carrier_configuration()¶
- Returns: - The carrier configuration, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the carrier-specific configuration (MCFG) in use, as reported by this - ModemManager.Modem.- New in version 1.12. 
 - 
dup_carrier_configuration_revision()¶
- Returns: - The carrier configuration revision, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the carrier-specific configuration revision in use, as reported by this - ModemManager.Modem.- New in version 1.12. 
 - 
dup_device()¶
- Returns: - The device, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system. - New in version 1.0. 
 - 
dup_device_identifier()¶
- Returns: - The device identifier, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of a best-effort device identifier based on various device information like model name, firmware revision, USB/PCI/PCMCIA IDs, and other properties. - This ID is not guaranteed to be unique and may be shared between identical devices with the same firmware, but is intended to be “unique enough” for use as a casual device identifier for various user experience operations. - This is not the device’s IMEI or ESN since those may not be available before unlocking the device via a PIN. - New in version 1.0. 
 - 
dup_drivers()¶
- Returns: - The drivers, or - Noneif none available. The returned value should be freed with- GLib.strfreev().- Return type: - [ - str]- Gets a copy of the Operating System device driver handling communication with the modem hardware. - New in version 1.0. 
 - 
dup_equipment_identifier()¶
- Returns: - The equipment identifier, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the identity of the - ModemManager.Modem.- This will be the IMEI number for GSM devices and the hex-format ESN/MEID for CDMA devices. - New in version 1.0. 
 - 
dup_hardware_revision()¶
- Returns: - The equipment hardware revision, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the equipment hardware revision, as reported by this - ModemManager.Modem.- New in version 1.8. 
 - 
dup_manufacturer()¶
- Returns: - The equipment manufacturer, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the equipment manufacturer, as reported by this - ModemManager.Modem.- New in version 1.0. 
 - 
dup_model()¶
- Returns: - The equipment model, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the equipment model, as reported by this - ModemManager.Modem.- New in version 1.0. 
 - 
dup_own_numbers()¶
- Returns: - The list of own numbers or - Noneif none is available. The returned value should be freed with- GLib.strfreev().- Return type: - [ - str]- Gets a copy of the list of numbers (e.g. MSISDN in 3GPP) being currently handled by this modem. - New in version 1.0. 
 - 
dup_path()¶
- Returns: - The DBus path of the - ModemManager.Object. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the DBus path of the - ModemManager.Objectobject which implements this interface.- New in version 1.0. 
 - 
dup_plugin()¶
- Returns: - The name of the plugin, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the name of the plugin handling this - ModemManager.Modem.- New in version 1.0. 
 - 
dup_primary_port()¶
- Returns: - The name of the primary port. The returned value should be freed with - GLib.free().- Return type: - str- Gets a copy of the name of the primary port controlling this - ModemManager.Modem.- New in version 1.0. 
 - 
dup_revision()¶
- Returns: - The equipment revision, or - Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the equipment revision, as reported by this - ModemManager.Modem.- New in version 1.0. 
 - 
dup_sim_path()¶
- Returns: - The DBus path of the - ModemManager.Simhandled in this- ModemManager.Modem, or- Noneif none available. The returned value should be freed with- GLib.free().- Return type: - str- Gets a copy of the DBus path of the - ModemManager.Simhandled in this- ModemManager.Modem.- New in version 1.0. 
 - 
enable(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously tries to enable the - ModemManager.Modem. When enabled, the modem’s radio is powered on and data sessions, voice calls, location services, and Short Message Service may be available.- When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.enable_finish() to get the result of the operation.- See - ModemManager.Modem.enable_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
enable_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.enable().- Raises: - GLib.Error- Returns: - Trueif the modem was properly enabled,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.enable().- New in version 1.0. 
 - 
enable_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - Trueif the modem was properly enabled,- Falseif error is set.- Return type: - bool- Synchronously tries to enable the - ModemManager.Modem. When enabled, the modem’s radio is powered on and data sessions, voice calls, location services, and Short Message Service may be available.- The calling thread is blocked until a reply is received. See - ModemManager.Modem.enable() for the asynchronous version of this method.- New in version 1.0. 
 - 
factory_reset(code, cancellable, callback, *user_data)¶
- Parameters: - code (str) – Carrier-supplied code required to reset the modem.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously clears the modem’s configuration (including persistent configuration and state), and returns the device to a factory-default state. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.factory_reset_finish() to get the result of the operation.- See - ModemManager.Modem.factory_reset_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- code (
 - 
factory_reset_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.factory_reset().- Raises: - GLib.Error- Returns: - Trueif the factory_reset was successful,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.factory_reset().- New in version 1.0. 
 - 
factory_reset_sync(code, cancellable)¶
- Parameters: - code (str) – Carrier-supplied code required to reset the modem.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Trueif the factory reset was successful,- Falseif error is set.- Return type: - Synchronously clears the modem’s configuration (including persistent configuration and state), and returns the device to a factory-default state. - The calling thread is blocked until a reply is received. See - ModemManager.Modem.factory_reset() for the asynchronous version of this method.- New in version 1.0. 
- code (
 - 
get_access_technologies()¶
- Returns: - A #:obj:ModemManager.ModemAccessTechnology value. - Return type: - ModemManager.ModemAccessTechnology- Gets the current network access technology used by the - ModemManager.Modemto communicate with the network.- New in version 1.0. 
 - 
get_bearer_paths()¶
- Returns: - The DBus paths of the - ModemManager.Bearerhandled in this- ModemManager.Modem, or- Noneif none available. Do not free the returned value, it belongs to self.- Return type: - [ - str]- Gets the DBus paths of the - ModemManager.Bearerhandled in this- ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_bearer_paths() if on another thread.- New in version 1.0. 
 - 
get_carrier_configuration()¶
- Returns: - The carrier configuration, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the carrier-specific configuration (MCFG) in use, as reported by this - ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_carrier_configuration() if on another thread.- New in version 1.12. 
 - 
get_carrier_configuration_revision()¶
- Returns: - The carrier configuration revision, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the carrier-specific configuration revision in use, as reported by this - ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_carrier_configuration() if on another thread.- New in version 1.12. 
 - 
get_current_bands()¶
- Returns: - Trueif bands and n_bands are set,- Falseotherwise.- bands: - Return location for the array of - ModemManager.ModemBandvalues. The returned array should be freed with- GLib.free() when no longer needed.- Return type: - ( - bool, bands: [- ModemManager.ModemBand])- Gets the list of radio frequency and technology bands the - ModemManager.Modemis currently using when connecting to a network.- For POTS devices, only the - ModemManager.ModemBand.ANYband is supported.- New in version 1.0. 
 - 
get_current_capabilities()¶
- Returns: - A bitmask of - ModemManager.ModemCapabilityflags.- Return type: - ModemManager.ModemCapability- Gets the list of generic families of access technologies supported by this - ModemManager.Modemwithout a firmware reload or reinitialization.- New in version 1.0. 
 - 
get_current_modes()¶
- Returns: - Trueif allowed and preferred are set,- Falseotherwise.- allowed: - Return location for a bitmask of - ModemManager.ModemModevalues.- preferred: - Return location for a - ModemManager.ModemModevalue.- Return type: - ( - bool, allowed:- ModemManager.ModemMode, preferred:- ModemManager.ModemMode)- Gets the list of modes specifying the access technologies (eg 2G/3G/4G) the - ModemManager.Modemis currently allowed to use when connecting to a network, as well as the preferred one, if any.- New in version 1.0. 
 - 
get_device()¶
- Returns: - The device, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system. - The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_device() if on another thread.- New in version 1.0. 
 - 
get_device_identifier()¶
- Returns: - The device identifier, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets a best-effort device identifier based on various device information like model name, firmware revision, USB/PCI/PCMCIA IDs, and other properties. - This ID is not guaranteed to be unique and may be shared between identical devices with the same firmware, but is intended to be “unique enough” for use as a casual device identifier for various user experience operations. - This is not the device’s IMEI or ESN since those may not be available before unlocking the device via a PIN. - The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_device_identifier() if on another thread.- New in version 1.0. 
 - 
get_drivers()¶
- Returns: - The drivers, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - [ - str]- Gets the Operating System device drivers handling communication with the modem hardware. - The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_drivers() if on another thread.- New in version 1.0. 
 - 
get_equipment_identifier()¶
- Returns: - The equipment identifier, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the identity of the - ModemManager.Modem.- This will be the IMEI number for GSM devices and the hex-format ESN/MEID for CDMA devices. - The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_equipment_identifier() if on another thread.- New in version 1.0. 
 - 
get_hardware_revision()¶
- Returns: - The equipment hardware revision, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the equipment hardware revision, as reported by this - ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_hardware_revision() if on another thread.- New in version 1.8. 
 - 
get_manufacturer()¶
- Returns: - The equipment manufacturer, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the equipment manufacturer, as reported by this - ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_manufacturer() if on another thread.- New in version 1.0. 
 - 
get_max_active_bearers()¶
- Returns: - the maximum number of defined packet data bearers. - Return type: - int- Gets the maximum number of active packet data bearers this - ModemManager.Modemsupports.- POTS and CDMA2000-only devices support one active bearer, while GSM/UMTS and LTE-capable devices (including LTE/CDMA devices) typically support at least two active bearers. - New in version 1.0. 
 - 
get_max_bearers()¶
- Returns: - the maximum number of defined packet data bearers. - Return type: - int- Gets the maximum number of defined packet data bearers this - ModemManager.Modemsupports.- This is not the number of active/connected bearers the modem supports, but simply the number of bearers that may be defined at any given time. For example, POTS and CDMA2000-only devices support only one bearer, while GSM/UMTS devices typically support three or more, and any LTE-capable device (whether LTE-only, GSM/UMTS-capable, and/or CDMA2000-capable) also typically support three or more. - New in version 1.0. 
 - 
get_model()¶
- Returns: - The equipment model, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the equipment model, as reported by this - ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_model() if on another thread.- New in version 1.0. 
 - 
get_plugin()¶
- Returns: - The name of the plugin, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the name of the plugin handling this - ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_plugin() if on another thread.- New in version 1.0. 
 - 
get_ports()¶
- Returns: - Trueif ports and n_ports are set,- Falseotherwise.- ports: - Return location for the array of - ModemManager.ModemPortInfovalues. The returned array should be freed with- ModemManager.ModemPortInfo.array_free() when no longer needed.- Return type: - ( - bool, ports: [- ModemManager.ModemPortInfo])- Gets the list of ports in the modem. - New in version 1.0. 
 - 
get_power_state()¶
- Returns: - A - ModemManager.ModemPowerStatevalue.- Return type: - ModemManager.ModemPowerState- Gets the power state of the - ModemManager.Modem.- New in version 1.0. 
 - 
get_primary_port()¶
- Returns: - The name of the primary port. Do not free the returned value, it belongs to self. - Return type: - str- Gets the name of the primary port controlling this - ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_primary_port() if on another thread.- New in version 1.0. 
 - 
get_revision()¶
- Returns: - The equipment revision, or - Noneif none available. Do not free the returned value, it belongs to self.- Return type: - str- Gets the equipment revision, as reported by this - ModemManager.Modem.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.dup_revision() if on another thread.- New in version 1.0. 
 - 
get_signal_quality()¶
- Returns: - The signal quality. - recent: - Return location for the flag specifying if the signal quality value was recent or not. - Return type: - ( - int, recent:- bool)- Gets the signal quality value in percent (0 - 100) of the dominant access technology the - ModemManager.Modemis using to communicate with the network.- Always 0 for POTS devices. - New in version 1.0. 
 - 
get_sim(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously gets the - ModemManager.Simobject managed by this- ModemManager.Modem.- When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.get_sim_finish() to get the result of the operation.- See - ModemManager.Modem.get_sim_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
get_sim_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.get_sim().- Raises: - GLib.Error- Returns: - a - ModemManager.Simor- Noneif error is set. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.Sim- Finishes an operation started with - ModemManager.Modem.get_sim().- New in version 1.0. 
 - 
get_sim_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - a - ModemManager.Simor- Noneif error is set. The returned value should be freed with- GObject.Object.unref().- Return type: - ModemManager.Sim- Synchronously gets the - ModemManager.Simobject managed by this- ModemManager.Modem.- The calling thread is blocked until a reply is received. See - ModemManager.Modem.get_sim() for the asynchronous version of this method.- New in version 1.0. 
 - 
get_state()¶
- Returns: - A - ModemManager.ModemStatevalue.- Return type: - ModemManager.ModemState- Gets the overall state of the - ModemManager.Modem.- New in version 1.0. 
 - 
get_state_failed_reason()¶
- Returns: - A - ModemManager.ModemStateFailedReasonvalue.- Return type: - ModemManager.ModemStateFailedReason- Gets the reason specifying why the modem is in - ModemManager.ModemState.FAILEDstate.- New in version 1.0. 
 - 
get_supported_bands()¶
- Returns: - Trueif bands and n_bands are set,- Falseotherwise.- bands: - Return location for the array of - ModemManager.ModemBandvalues. The returned array should be freed with- GLib.free() when no longer needed.- Return type: - ( - bool, bands: [- ModemManager.ModemBand])- Gets the list of radio frequency and technology bands supported by the - ModemManager.Modem.- For POTS devices, only - ModemManager.ModemBand.ANYwill be returned in bands.- New in version 1.0. 
 - 
get_supported_capabilities()¶
- Returns: - Trueif capabilities and n_capabilities are set,- Falseotherwise.- capabilities: - Return location for the array of - ModemManager.ModemCapabilityvalues. The returned array should be freed with- GLib.free() when no longer needed.- Return type: - ( - bool, capabilities: [- ModemManager.ModemCapability])- Gets the list of combinations of generic families of access technologies supported by this - ModemManager.Modem.- New in version 1.0. 
 - 
get_supported_ip_families()¶
- Returns: - A bitmask of - ModemManager.BearerIpFamilyvalues.- Return type: - ModemManager.BearerIpFamily- Gets the list of supported IP families. - New in version 1.0. 
 - 
get_supported_modes()¶
- Returns: - Trueif modes and n_modes are set,- Falseotherwise.- modes: - Return location for the array of - ModemManager.ModemModeCombinationstructs. The returned array should be freed with- GLib.free() when no longer needed.- Return type: - ( - bool, modes: [- ModemManager.ModemModeCombination])- Gets the list of supported mode combinations. - New in version 1.0. 
 - 
get_unlock_required()¶
- Returns: - A - ModemManager.ModemLockvalue, specifying the current lock state.- Return type: - ModemManager.ModemLock- Gets current lock state of the - ModemManager.Modem.- New in version 1.0. 
 - 
get_unlock_retries()¶
- Returns: - A - ModemManager.UnlockRetriesthat must be freed with- GObject.Object.unref() or- Noneif unknown.- Return type: - ModemManager.UnlockRetries- Gets a - ModemManager.UnlockRetriesobject, which provides, for each- ModemManager.ModemLockhandled by the modem, the number of PIN tries remaining before the code becomes blocked (requiring a PUK) or permanently blocked.- The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call - ModemManager.Modem.get_unlock_retries() again to get a new- ModemManager.UnlockRetrieswith the new values.- New in version 1.0. 
 - 
list_bearers(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously lists the packet data bearers in the - ModemManager.Modem.- When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.list_bearers_finish() to get the result of the operation.- See - ModemManager.Modem.list_bearers_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
list_bearers_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.list_bearers().- Raises: - GLib.Error- Returns: - The list of - ModemManager.Bearerobjects, or- Noneif either none found or if error is set.- Return type: - [ - ModemManager.Bearer]- Finishes an operation started with - ModemManager.Modem.list_bearers().- New in version 1.0. 
 - 
list_bearers_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - The list of - ModemManager.Bearerobjects, or- Noneif either none found or if error is set.- Return type: - [ - ModemManager.Bearer]- Synchronously lists the packet data bearers in the - ModemManager.Modem.- The calling thread is blocked until a reply is received. See - ModemManager.Modem.list_bearers() for the asynchronous version of this method.- New in version 1.0. 
 - 
peek_current_bands()¶
- Returns: - Trueif bands and n_bands are set,- Falseotherwise.- bands: - Return location for the array of - ModemManager.ModemBandvalues. Do not free the returned value, it is owned by self.- Return type: - ( - bool, bands: [- ModemManager.ModemBand])- Gets the list of radio frequency and technology bands the - ModemManager.Modemis currently using when connecting to a network.- For POTS devices, only the - ModemManager.ModemBand.ANYband is supported.- New in version 1.0. 
 - 
peek_ports()¶
- Returns: - Trueif ports and n_ports are set,- Falseotherwise.- ports: - Return location for the array of - ModemManager.ModemPortInfovalues. Do not free the returned value, it is owned by self.- Return type: - ( - bool, ports: [- ModemManager.ModemPortInfo])- Gets the list of ports in the modem. - New in version 1.0. 
 - 
peek_supported_bands()¶
- Returns: - Trueif bands and n_bands are set,- Falseotherwise.- bands: - Return location for the array of - ModemManager.ModemBandvalues. Do not free the returned array, it is owned by self.- Return type: - ( - bool, bands: [- ModemManager.ModemBand])- Gets the list of radio frequency and technology bands supported by the - ModemManager.Modem.- For POTS devices, only - ModemManager.ModemBand.ANYwill be returned in bands.- New in version 1.0. 
 - 
peek_supported_capabilities()¶
- Returns: - Trueif capabilities and n_capabilities are set,- Falseotherwise.- capabilities: - Return location for the array of - ModemManager.ModemCapabilityvalues. Do not free the returned array, it is owned by self.- Return type: - ( - bool, capabilities: [- ModemManager.ModemCapability])- Gets the list of combinations of generic families of access technologies supported by this - ModemManager.Modem.- New in version 1.0. 
 - 
peek_supported_modes()¶
- Returns: - Trueif modes and n_modes are set,- Falseotherwise.- modes: - Return location for the array of - ModemManager.ModemModeCombinationvalues. Do not free the returned array, it is owned by self.- Return type: - ( - bool, modes: [- ModemManager.ModemModeCombination])- Gets the list of supported mode combinations. - New in version 1.0. 
 - 
peek_unlock_retries()¶
- Returns: - A - ModemManager.UnlockRetries. Do not free the returned value, it belongs to self.- Return type: - ModemManager.UnlockRetries- Gets a - ModemManager.UnlockRetriesobject, which provides, for each- ModemManager.ModemLockhandled by the modem, the number of PIN tries remaining before the code becomes blocked (requiring a PUK) or permanently blocked.- The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use - ModemManager.Modem.get_unlock_retries() if on another thread.- New in version 1.0. 
 - 
reset(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously clears non-persistent configuration and state, and returns the device to a newly-powered-on state. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.reset_finish() to get the result of the operation.- See - ModemManager.Modem.reset_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- cancellable (
 - 
reset_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.reset().- Raises: - GLib.Error- Returns: - Trueif the reset was successful,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.reset().- New in version 1.0. 
 - 
reset_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – A- Gio.Cancellableor- None.- Raises: - GLib.Error- Returns: - Trueif the reset was successful,- Falseif error is set.- Return type: - bool- Synchronously clears non-persistent configuration and state, and returns the device to a newly-powered-on state. - The calling thread is blocked until a reply is received. See - ModemManager.Modem.reset() for the asynchronous version of this method.- New in version 1.0. 
 - 
set_current_bands(bands, n_bands, cancellable, callback, *user_data)¶
- Parameters: - bands (ModemManager.ModemBand) – An array ofModemManager.ModemBandvalues specifying which bands are allowed.
- n_bands (int) – Number of elements in bands.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously sets the radio frequency and technology bands the device is currently allowed to use when connecting to a network. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.set_current_bands_finish() to get the result of the operation.- See - ModemManager.Modem.set_current_bands_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- bands (
 - 
set_current_bands_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.set_current_bands().- Raises: - GLib.Error- Returns: - Trueif the bands were successfully set,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.set_current_bands().- New in version 1.0. 
 - 
set_current_bands_sync(bands, n_bands, cancellable)¶
- Parameters: - bands (ModemManager.ModemBand) – An array ofModemManager.ModemBandvalues specifying which bands are allowed.
- n_bands (int) – Number of elements in bands.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Trueif the bands were successfully set,- Falseif error is set.- Return type: - Synchronously sets the radio frequency and technology bands the device is currently allowed to use when connecting to a network. - The calling thread is blocked until a reply is received. See - ModemManager.Modem.set_current_bands() for the asynchronous version of this method.- New in version 1.0. 
- bands (
 - 
set_current_capabilities(capabilities, cancellable, callback, *user_data)¶
- Parameters: - capabilities (ModemManager.ModemCapability) – AModemManager.ModemCapabilitymask.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously sets the capabilities of the device. A restart of the modem may be required. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.set_current_capabilities_finish() to get the result of the operation.- See - ModemManager.Modem.set_current_capabilities_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- capabilities (
 - 
set_current_capabilities_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.set_current_capabilities().- Raises: - GLib.Error- Returns: - Trueif the capabilities were successfully set,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.set_current_capabilities().- New in version 1.0. 
 - 
set_current_capabilities_sync(capabilities, cancellable)¶
- Parameters: - capabilities (ModemManager.ModemCapability) – AModemManager.ModemCapabilitymask.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Trueif the capabilities were successfully set,- Falseif error is set.- Return type: - Synchronously sets the capabilities of the device. A restart of the modem may be required. - The calling thread is blocked until a reply is received. See - ModemManager.Modem.set_current_capabilities() for the asynchronous version of this method.- New in version 1.0. 
- capabilities (
 - 
set_current_modes(modes, preferred, cancellable, callback, *user_data)¶
- Parameters: - modes (ModemManager.ModemMode) – Mask ofModemManager.ModemModevalues specifying which modes are allowed.
- preferred (ModemManager.ModemMode) – AModemManager.ModemModevalue specifying which of the modes given in modes is the preferred one, orModemManager.ModemMode.NONEif none.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously sets the access technologies (e.g. 2G/3G/4G preference) the device is currently allowed to use when connecting to a network. - When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.set_current_modes_finish() to get the result of the operation.- See - ModemManager.Modem.set_current_modes_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- modes (
 - 
set_current_modes_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.set_current_modes().- Raises: - GLib.Error- Returns: - Trueif the allowed modes were successfully set,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.set_current_modes().- New in version 1.0. 
 - 
set_current_modes_sync(modes, preferred, cancellable)¶
- Parameters: - modes (ModemManager.ModemMode) – Mask ofModemManager.ModemModevalues specifying which modes are allowed.
- preferred (ModemManager.ModemMode) – AModemManager.ModemModevalue specifying which of the modes given in modes is the preferred one, orModemManager.ModemMode.NONEif none.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Trueif the allowed modes were successfully set,- Falseif error is set.- Return type: - Synchronously sets the access technologies (e.g. 2G/3G/4G preference) the device is currently allowed to use when connecting to a network. - The calling thread is blocked until a reply is received. See - ModemManager.Modem.set_current_modes() for the asynchronous version of this method.- New in version 1.0. 
- modes (
 - 
set_power_state(state, cancellable, callback, *user_data)¶
- Parameters: - state (ModemManager.ModemPowerState) – EitherModemManager.ModemPowerState.LOWorModemManager.ModemPowerState.ON. Every otherModemManager.ModemPowerStatevalue is not allowed.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
- callback (Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
- user_data (objectorNone) – User data to pass to callback.
 - Asynchronously sets the power state of the device. This method can only be used while the modem is in - ModemManager.ModemState.DISABLEDstate.- When the operation is finished, callback will be invoked in the - thread-default main loopof the thread you are calling this method from. You can then call- ModemManager.Modem.set_power_state_finish() to get the result of the operation.- See - ModemManager.Modem.set_power_state_sync() for the synchronous, blocking version of this method.- New in version 1.0. 
- state (
 - 
set_power_state_finish(res)¶
- Parameters: - res ( - Gio.AsyncResult) – The- Gio.AsyncResultobtained from the- Gio.AsyncReadyCallbackpassed to- ModemManager.Modem.set_power_state().- Raises: - GLib.Error- Returns: - Trueif the power state was successfully set,- Falseif error is set.- Return type: - bool- Finishes an operation started with - ModemManager.Modem.set_power_state().- New in version 1.0. 
 - 
set_power_state_sync(state, cancellable)¶
- Parameters: - state (ModemManager.ModemPowerState) – EitherModemManager.ModemPowerState.LOWorModemManager.ModemPowerState.ON. Every otherModemManager.ModemPowerStatevalue is not allowed.
- cancellable (Gio.CancellableorNone) – AGio.CancellableorNone.
 - Raises: - Returns: - Trueif the power state was successfully set,- Falseif error is set.- Return type: - Synchronously sets the power state of the device. This method can only be used while the modem is in - ModemManager.ModemState.DISABLEDstate.- The calling thread is blocked until a reply is received. See - ModemManager.Modem.set_power_state() for the asynchronous version of this method.- New in version 1.0. 
- state (
 
- 
classmethod