Commit Graph

62 Commits

Author SHA1 Message Date
Aleksander Morgado
c250fa3797 libmm-glib: remove the `libmm-common.h' header
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.

We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
symbols, which if included before the `libmm-glib.h' library allow us to:

 * Don't include the libmm-glib high level API in the ModemManager daemon, as
   the object names would clash with those in the core.

 * Define some of the methods of helper objects to be included only if compiling
   ModemManager daemon or the mmcli.
2012-10-04 10:17:12 +02:00
Aleksander Morgado
77208f66ab iface-modem: ensure we're in low power mode when initializing
The power-down command defined by the plugin will be run *only* after having
checked for current and modem capabilities, as plugins (e.g. Sierra) may have
different commands for that depending on whether they are 3GPP or 3GPP2.

We do not reuse the 'modem_power_down' callback from the disabling sequence, as
some plugins really behave pretty badly with this (e.g. Samsung CFUN=4 may take
up to 30s to complete). So, we let plugins use the power-down command when
disabling but avoid launching it during init.
2012-10-01 16:40:51 +02:00
Aleksander Morgado
79fbe274e9 iface-modem: new async method to be run just after the successful SIM unlock 2012-07-22 13:39:35 +02:00
Aleksander Morgado
83afd3ddc9 iface-modem: new helpers to query supported modes 2012-04-10 18:28:33 +02:00
Aleksander Morgado
b49ddfe930 iface-modem: skip handling the CURRENT_CAPABILITIES property
It is an unnecessary complication, as long as we can keep the helpers in the interface.
2012-04-10 17:47:43 +02:00
Aleksander Morgado
e140ff3c5f iface-modem: let initialization and enabling sequences get cancelled 2012-03-16 14:53:24 +01:00
Aleksander Morgado
2dcff5590e iface-modem: setup loading of own numbers during the initialization phase 2012-03-16 14:53:21 +01:00
Aleksander Morgado
cd63df938f libmm-common: `MMSimpleStatus' won't be considered internal any more
Renamed `MMCommonSimpleProperties' to `MMSimpleStatus', and removed the
`MMSimpleStatusProperties' provided in libmm-glib. We'll just use the original
one from libmm-common always.
2012-03-16 14:53:20 +01:00
Aleksander Morgado
d306bb082f libmm-common: `MMBearerProperties' won't be considered internal any more
Renamed `MMCommonBearerProperties' to `MMBearerProperties', and removed the
`MMBearerProperties' provided in libmm-glib. We'll just use the original one
from libmm-common always.
2012-03-16 14:53:19 +01:00
Aleksander Morgado
3ccc78e858 api: `UnlockRetries' will reply a list of per-lock retry counts
Equivalent to `PinRetryCount' in the previous API. We don't have an additional
property for the retry count of the current lock, as it really is duplicating
information.
2012-03-16 14:53:19 +01:00
Aleksander Morgado
12786d21cf core: remove uses of `MMModemStateReason'
Use `MMModemStateChangeReason' instead.
2012-03-16 14:53:17 +01:00
Aleksander Morgado
080d046e64 iface-modem: load allowed/preferred modes during modem enabling 2012-03-16 14:28:15 +01:00
Aleksander Morgado
3595b33648 iface-modem: load current bands during modem enabling 2012-03-16 14:28:13 +01:00
Aleksander Morgado
09d2f062c7 api,dbus: rename AllowedBands' to just Bands'
ModemManager will load:
  1) The list of supported bands. Note that this doesn't mean that any possible
     combination of bands is supported, as modems may support only specific
     combinations, but at least gives a rough idea of what the modem is capable
     of handling.

  2) The list of CURRENT bands. There is no such "Allowed" bands, as we do with
     modes, modems will have a specific set of bands being currently used, which
     will be reported in the `Bands' property.

If the modem allows modifying the list of bands to use, this can be done with
the `SetBands()' method. If the modem doesn't support using a specific
combination of bands, this method will report an error.
2012-03-16 14:28:13 +01:00
Nathan Williams
3c41ce5d8b api,dbus: new `Command' method in the API to send arbitrary AT commands
BUG=chromium-os:25348
TEST="mmcli -m 0 --command='E0'"
Change-Id: I320587560fde5780f9d5a4998e32364d36a71ed7
2012-03-15 14:15:06 +01:00
Aleksander Morgado
21a722b616 core: don't pass primary port to interface initializations
They will all get it themselves.
2012-03-15 14:15:05 +01:00
Aleksander Morgado
8321bd5875 iface-modem: periodically request to update current access technologies 2012-03-15 14:14:56 +01:00
Aleksander Morgado
65455558be iface-modem: s/access_tech/access_technologies 2012-03-15 14:14:56 +01:00
Aleksander Morgado
f07101943c iface-modem-simple: new connection logic when more than one bearer around
For mixed 3GPP+CDMA modems, we first try to connect the 3GPP bearers, and then
the CDMA ones.
2012-03-15 14:14:49 +01:00
Aleksander Morgado
0b8d0c697d iface-modem: get consolidated state from all subsystems
We don't want, e.g.,  REGISTERED->ENABLED transitions when 3GPP gets
unregistered but we're still registered in CDMA.
2012-03-15 14:14:46 +01:00
Aleksander Morgado
ffae95a46b iface-modem: new helpers to check if modem has LTE capabilities 2012-03-15 14:14:43 +01:00
Aleksander Morgado
d5af2286e2 iface-modem-3gpp: indicators and unsolicited events are 3GPP-specific
Moved code from the Modem interface, as this is really 3GPP-specific
2012-03-15 14:14:43 +01:00
Aleksander Morgado
0f7716887c iface-modem: new methods to check for specific capabilities being supported 2012-03-15 14:14:42 +01:00
Aleksander Morgado
ba5321adf1 iface-modem: let different SIM object creation implementations
We let objects implementing the Modem interface to provide their own SIM
creation method. This allows plugins to subclass MMSim themselves.
2012-03-15 14:14:41 +01:00
Aleksander Morgado
953be3e81d iface-modem: new methods to setup/cleanup unsolicited result codes 2012-03-15 14:14:40 +01:00
Aleksander Morgado
b29acbb239 iface-modem: renamed modem_charset' to setup_charset'
And changed broadband modem accordingly.
2012-03-15 14:14:40 +01:00
Aleksander Morgado
7b506bc8a6 iface-modem: renamed modem_flow_control' to setup_flow_control'
Changed broadband modem and Cinterion plugin accordingly.
2012-03-15 14:14:40 +01:00
Aleksander Morgado
f0433a4dda iface-modem: setup periodic signal quality checks 2012-03-15 14:14:39 +01:00
Aleksander Morgado
0c009a2c4a iface-modem: implement property binding for the simple status 2012-03-15 14:14:39 +01:00
Aleksander Morgado
4ccc00fc6d iface-modem: return a MMBearer reference when creating a new bearer
Not just the bearer path.
2012-03-15 14:14:38 +01:00
Aleksander Morgado
93732cf075 bearers: base bearer creation in the new bearer properties object 2012-03-15 14:14:38 +01:00
Aleksander Morgado
9d7e3de4cd api: MMModemBand is now an enum, not flags
We don't want to handle bands as flags, in order to avoid the need of 64-bits
for the enum. This change implies that setting allowed bands will be done by
giving an array of uint32 values, signature "au".
2012-03-15 14:14:37 +01:00
Aleksander Morgado
c9c9421102 iface-modem: allow setting allowed modes and bands internally, not just via DBus 2012-03-15 14:14:36 +01:00
Aleksander Morgado
4495ba180e core: implement Access Technology reporting
For 3GPP modems only for now..
2012-03-15 14:14:35 +01:00
Aleksander Morgado
776cc66e2c iface-modem: implement all bearer list operations in the interface
Bearer list operations, except for Bearer creation, are so generic that the
interface itself can implement it for every object implementing the interface.
This implementation is based on a new MMBearerList object.
2012-03-15 14:14:33 +01:00
Aleksander Morgado
2be2288754 iface-modem: handle CreateBearer(), DeleteBearer() and ListBearers()
Just pass the task to the specific underlying implementation.
2012-03-15 14:14:31 +01:00
Aleksander Morgado
b31ad37670 iface-modem: allow changing the State from outside the interface
Some states need to be set from outside the scope of the Modem interface, like
Registration-related ones (REGISTERED, SEARCHING, ...) or Connection-related
ones (CONNECTED, ...).
2012-03-15 14:14:29 +01:00
Aleksander Morgado
acc3e3f6da core: always pass open port to interface initializations
When the first AT port is grabbed, modem initialization is launched, using that
specific port. This port is also passed to all interface initialization methods.
2012-03-15 14:14:28 +01:00
Aleksander Morgado
b9448b83cb iface-modem: simplify interface handling
Interfaces won't have a 'status', just initialize(), enable(), disable() and
shutdown().

Also, shutdown() should never fail. We will take care of cancelling any ongoing
operation afterwards, before calling shutdown().
2012-03-15 14:14:28 +01:00
Aleksander Morgado
589c6419d2 iface-modem: send power-down command during disable 2012-03-15 14:14:27 +01:00
Aleksander Morgado
f3b6bfeb8f iface-modem: interface can be disabled
The Modem interface can be disabled, going from enabled back to initialized. The
disabling process will include closing the ports opened during the enabling.
2012-03-15 14:14:27 +01:00
Aleksander Morgado
781c1821fd iface-modem: setup modem charset configuration during enable
Load supported charsets, and loop trying to set the best one.
2012-03-15 14:14:27 +01:00
Aleksander Morgado
c0d3bd944c iface-modem: send flow control setup commands during enable 2012-03-15 14:14:27 +01:00
Aleksander Morgado
7fa372d118 iface-modem: allow plugins to send custom commands after power-up
Just after powering up the modem, plugins can run additional setup commands
themselves, in a new "after" power-up step.
2012-03-15 14:14:27 +01:00
Aleksander Morgado
0adbd8edad iface-modem: send power-up commands during enable 2012-03-15 14:14:27 +01:00
Aleksander Morgado
b948c93e59 iface-modem: send modem initialization commands during enable 2012-03-15 14:14:26 +01:00
Aleksander Morgado
f049dbb217 iface-modem: emit StateChanged signal when modem state changes 2012-03-15 14:14:26 +01:00
Aleksander Morgado
7b59a80912 iface-modem: load CurrentCapabilities first
With AT+GCAP we load the currently available capabilities, and we store them
in a new "iface-modem-capabilities" property in the MMIfaceModem interface. This
property is bound to the "current-capabilities" property in the MmGdbusModem
skeleton object, so no need to update both when it changes.

ModemCapabilities depend directly on whether the modem can load firmware without
reflashing the device. Currently, just set it equal to CurrentCapabilities.
2012-03-15 14:14:26 +01:00
Aleksander Morgado
126332332b iface-modem: allow requesting signal quality check
The new `mm_iface_modem_signal_quality_check()' method will reload the signal
quality value on demand, set the value of the `SignalQuality' property in DBus,
and also return the results.
2012-03-15 14:14:24 +01:00
Aleksander Morgado
59c37afae6 iface-modem: handle SetAllowedModes() 2012-03-15 14:14:23 +01:00