#include <modem.h>
Inherits ModemManager::Interface.
The Modem class.
The Modem interface controls the status and actions in a given modem object.
Definition at line 146 of file modem.h.
◆ AccessTechnologies
◆ Capabilities
◆ IpBearerFamilies
◆ List
◆ ModemModes
◆ Ptr
◆ Modem()
◆ ~Modem()
◆ accessTechnologies()
- Returns
- QFlags of MMModemAccessTechnology values, specifying the current network access technologies used by the device to communicate with the network.
If the device's access technology cannot be determined, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN will be reported.
Definition at line 504 of file modem.cpp.
◆ command()
◆ createBearer()
Create a new packet data bearer using the given characteristics.
This request may fail if the modem does not support additional bearers, if too many bearers are already defined, or if properties are invalid.
Definition at line 289 of file modem.cpp.
◆ currentBands()
QList< MMModemBand > Modem::currentBands |
( |
| ) |
const |
- Returns
- List of MMModemBand values, specifying the radio frequency and technology bands the device is currently using when connecting to a network.
It must be a subset of supportedBands()
Definition at line 546 of file modem.cpp.
◆ currentCapabilities()
- Returns
- QFlags of MMModemCapability values, specifying the generic family of access technologies the modem currently supports without a firmware reload or reinitialization.
Definition at line 402 of file modem.cpp.
◆ currentModes()
ModemManager::CurrentModesType Modem::currentModes |
( |
| ) |
const |
- Returns
- A pair of MMModemMode values, where the first one is a bitmask specifying the access technologies (eg 2G/3G/4G) the device is currently allowed to use when connecting to a network, and the second one is the preferred mode of those specified as allowed.
The pair must be one of those specified in supportedModes()
Definition at line 534 of file modem.cpp.
◆ deleteBearer()
Delete an existing packet data bearer.
If the bearer is currently active and providing packet data server, it will be disconnected and that packet data service will terminate.
- Parameters
-
bearer | path to the bearer to delete |
Definition at line 316 of file modem.cpp.
◆ device()
- Returns
- The physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system.
In Linux for example, this points to a sysfs path of the usb_device object.
Definition at line 444 of file modem.cpp.
◆ deviceIdentifier()
QString Modem::deviceIdentifier |
( |
| ) |
const |
- Returns
- 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.
Definition at line 438 of file modem.cpp.
◆ drivers()
- Returns
- The Operating System device drivers handling communication with the modem hardware.
Definition at line 450 of file modem.cpp.
◆ equipmentIdentifier()
QString Modem::equipmentIdentifier |
( |
| ) |
const |
- Returns
- The identity of the device.
This will be the IMEI number for GSM devices and the hex-format ESN/MEID for CDMA devices.
Definition at line 474 of file modem.cpp.
◆ factoryReset()
Clear the modem's configuration (including persistent configuration and state), and return the device to a factory-default state.
If not required by the modem, code
may be ignored.
This command may or may not power-cycle the device.
- Parameters
-
code | Carrier-supplied code required to reset the modem. |
Definition at line 350 of file modem.cpp.
◆ findBearer()
- Returns
- the configured packet data bearer on given path
Definition at line 338 of file modem.cpp.
◆ isEnabled()
bool Modem::isEnabled |
( |
| ) |
const |
- Returns
true
if the modem is fully functional, false
when in low power mode or disabled
- See also
- setEnabled()
Definition at line 271 of file modem.cpp.
◆ isValid()
bool Modem::isValid |
( |
| ) |
const |
◆ listBearers()
- Returns
- the configured packet data bearers (EPS Bearers, PDP Contexts, or CDMA2000 Packet Data Sessions).
Definition at line 322 of file modem.cpp.
◆ manufacturer()
QString Modem::manufacturer |
( |
| ) |
const |
- Returns
- The equipment manufacturer, as reported by the modem.
Definition at line 420 of file modem.cpp.
◆ maxActiveBearers()
uint Modem::maxActiveBearers |
( |
| ) |
const |
- Returns
- The maximum number of active packet data bearers the modem supports.
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.
Definition at line 414 of file modem.cpp.
◆ maxBearers()
uint Modem::maxBearers |
( |
| ) |
const |
- Returns
- The maximum number of defined packet data bearers the modem supports.
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.
Definition at line 408 of file modem.cpp.
◆ model()
- Returns
- The equipment model, as reported by the modem.
Definition at line 426 of file modem.cpp.
◆ ownNumbers()
- Returns
- List of numbers (e.g. MSISDN in 3GPP) being currently handled by this modem.
Definition at line 516 of file modem.cpp.
◆ plugin()
- Returns
- The name of the plugin handling this modem.
Definition at line 456 of file modem.cpp.
◆ ports()
- Returns
- The list of ports in the modem, given as an array of string and unsigned integer pairs. The string is the port name or path, and the integer is the port type given as a MMModemPortType value.
- Since
- 1.1.94
Definition at line 468 of file modem.cpp.
◆ powerState()
MMModemPowerState Modem::powerState |
( |
| ) |
const |
- Returns
- A MMModemPowerState value specifying the current power state of the modem.
Definition at line 522 of file modem.cpp.
◆ primaryPort()
QString Modem::primaryPort |
( |
| ) |
const |
- Returns
- The name of the primary port using to control the modem.
Definition at line 462 of file modem.cpp.
◆ reset()
Clear non-persistent configuration and state, and return the device to a newly-powered-on state.
This command may power-cycle the device.
Definition at line 344 of file modem.cpp.
◆ revision()
- Returns
- The revision identification of the software, as reported by the modem.
Definition at line 432 of file modem.cpp.
◆ setCurrentBands()
Set the radio frequency and technology bands the device is currently allowed to use when connecting to a network.
- Parameters
-
bands | List of MMModemBand values, to specify the bands to be used. |
Definition at line 374 of file modem.cpp.
◆ setCurrentCapabilities()
Set the capabilities of the device.
A restart of the modem may be required.
- Parameters
-
caps | QFlags of MMModemCapability values, to specify the capabilities to use. |
Definition at line 362 of file modem.cpp.
◆ setCurrentModes()
Set the access technologies (e.g.
2G/3G/4G preference) the device is currently allowed to use when connecting to a network.
The given combination should be supported by the modem, as specified in supportedModes()
- Parameters
-
Definition at line 368 of file modem.cpp.
◆ setEnabled()
Enable or disable the 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 disabled, the modem enters low-power state and no network-related operations are available.
Definition at line 283 of file modem.cpp.
◆ setPowerState()
Set the power state
of the modem.
This action can only be run when the modem is in MM_MODEM_STATE_DISABLED state.
Definition at line 356 of file modem.cpp.
◆ setTimeout()
void Modem::setTimeout |
( |
int | timeout | ) |
|
Sets the timeout in milliseconds for all async method DBus calls.
-1 means the default DBus timeout (usually 25 seconds).
Definition at line 577 of file modem.cpp.
◆ signalQuality()
ModemManager::SignalQualityPair Modem::signalQuality |
( |
| ) |
const |
- Returns
- Signal quality in percent (0 - 100) of the dominant access technology the device is using to communicate with the network. Always 0 for POTS devices.
The additional boolean value indicates if the quality value given was recently taken.
Definition at line 510 of file modem.cpp.
◆ simPath()
- Returns
- The path of the SIM object available in this device, if any.
Definition at line 390 of file modem.cpp.
◆ state()
MMModemState Modem::state |
( |
| ) |
const |
- Returns
- Overall state of the modem, given as a MMModemState value.
If the device's state cannot be determined, MM_MODEM_STATE_UNKNOWN will be reported.
Definition at line 492 of file modem.cpp.
◆ stateFailedReason()
MMModemStateFailedReason Modem::stateFailedReason |
( |
| ) |
const |
- Returns
- Error specifying why the modem is in MM_MODEM_STATE_FAILED state, given as a MMModemStateFailedReason value.
Definition at line 498 of file modem.cpp.
◆ supportedBands()
QList< MMModemBand > Modem::supportedBands |
( |
| ) |
const |
- Returns
- List of MMModemBand values, specifying the radio frequency and technology bands supported by the device.
For POTS devices, only the MM_MODEM_BAND_ANY mode will be returned.
Definition at line 540 of file modem.cpp.
◆ supportedCapabilities()
QList< MMModemCapability > Modem::supportedCapabilities |
( |
| ) |
const |
- Returns
- List of MMModemCapability values, specifying the combinations of generic family of access technologies the modem supports.
If the modem doesn't allow changing the current capabilities, a single entry with MM_MODEM_CAPABILITY_ANY will be given.
Definition at line 396 of file modem.cpp.
◆ supportedIpFamilies()
- Returns
- QFlags of MMBearerIpFamily values, specifying the IP families supported by the device.
Definition at line 552 of file modem.cpp.
◆ supportedModes()
- Returns
- This property exposes the supported mode combinations, given as an list of unsigned integer pairs, where: The first integer is a bitmask of MMModemMode values, specifying the allowed modes. The second integer is a single MMModemMode, which specifies the preferred access technology, among the ones defined in the allowed modes.
Definition at line 528 of file modem.cpp.
◆ timeout()
int Modem::timeout |
( |
| ) |
const |
Returns the current value of the DBus timeout in milliseconds.
-1 means the default DBus timeout (usually 25 seconds).
Definition at line 583 of file modem.cpp.
◆ uni()
◆ unlockRequired()
MMModemLock Modem::unlockRequired |
( |
| ) |
const |
- Returns
- Current lock state of the device, given as a MMModemLock value.
Definition at line 480 of file modem.cpp.
◆ unlockRetries()
- Returns
- A dictionary in which the keys are MMModemLock flags, and the values are integers giving the number of PIN tries remaining before the code becomes blocked (requiring a PUK) or permanently blocked. Dictionary entries exist only for the codes for which the modem is able to report retry counts.
Definition at line 486 of file modem.cpp.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:51 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.