Commit Graph
118 Commits
Author SHA1 Message Date
Aleksander Morgado 0336b8f89d iface-modem: don't process signal/act updates if interface is shut down
When the interface is shut down the skeleton object no longer exists. Given that
we're allowing this actions from outside the interface, we should be safe and
don't assume that the caller knows exactly the state of the interface.
2012-08-02 09:23:16 +02:00
Ben Chan b320f5c065 iface-modem: fix crashes due to removed context 2012-08-02 09:18:06 +02:00
Aleksander Morgado a448eabb3d iface-modem: SIM-PIN2 lock takes us to disabled state, not locked 2012-07-26 11:05:20 +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
Ben Chan 9ddcf92a18 iface-modem: fix crashes due to removed skeleton
expire_signal_quality() / mm_iface_modem_update_access_technologies()
may be called after the DBus object skeleton is removed in
mm_iface_modem_shutdown() and before their associated timeout source is
removed (in *_context_free) due to destruction of the modem object.

This patch fixes the issue by removing context objects before removing
the DBus skeleton in mm_iface_modem_shutdown().
2012-07-13 08:42:05 +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 7518772d4b core: fatal errors in iface initializations force the modem into a FAILED state
Modems which end up being found unusable (e.g. no SIM, fatal SIM error, no
capabilities) will be exposed in DBus, but just with the Modem interface and
in a FAILED state which allows no actions.
2012-03-30 13:47:00 +02:00
Aleksander Morgado f6d8c52bc9 iface-modem: do not try to set new allowed/preferred config if modem already in there 2012-03-26 09:35:09 +02:00
Aleksander Morgado 41a592b535 iface-modem: treat ANY in allowed modes as being equal to the list of supported modes 2012-03-24 19:16:53 +01:00
Aleksander Morgado 29b955afa2 iface-modem: if we are already unlocked, don't try to check it again
We're assuming here we are never getting locked without us knowing it.
2012-03-16 15:37:12 +01:00
Aleksander Morgado 09026ed89a iface-modem: treat serial errors also as fatal when checking unlock status 2012-03-16 14:53:24 +01:00
Aleksander Morgado e140ff3c5f iface-modem: let initialization and enabling sequences get cancelled 2012-03-16 14:53:24 +01:00
Aleksander Morgado d27e40ae9a core: new `Initializing' state in the global modem state machine
We need to define a state to be used while the modem is being initialized, so
that we forbid any operation on the modem on already exported interfaces, while
there are interfaces pending to get exported.

This Initializing state will also cover the state between having the SIM
unlocked (which launches re-initialization) and being completely initialized.
2012-03-16 14:53:24 +01:00
Aleksander Morgado 3a22128d9e iface-modem: don't leave locked state until re-initialization is complete 2012-03-16 14:53:24 +01:00
Aleksander Morgado 215c278082 base-modem: new modem-wide cancellable, passed to every state machine 2012-03-16 14:53:23 +01:00
Aleksander Morgado cc6d4a97fb base-modem: new port getters and peekers
* mm_base_modem_peek_port_* () will return either a port object (no new
reference), or NULL if none available.

You would usually peek() a port if you're going to use it just in the current
method, as there is no way to that reference to get invalid (we're single
threaded).

 * mm_base_modem_get_port_* () will return either NEW references to valid
port objects, or NULL if none available.

And, you would usually get() a port, whenever you want the port object to be
valid even out of the current method, for example when keeping it in the
context of an async operation.

Also, we need to consider that the primary AT port MAY BE NULL when you
peek() or get() it. This is due to the fact that we may be releasing ports
(due to device disconnection) in the middle of async operations.
2012-03-16 14:53:23 +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 9c5c072bab iface-modem: fix signal name 2012-03-16 14:53:20 +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 64f49c0c72 iface-modem: the Command() method is only allowed when running in debug mode 2012-03-16 14:53:18 +01:00
Aleksander Morgado 12786d21cf core: remove uses of `MMModemStateReason'
Use `MMModemStateChangeReason' instead.
2012-03-16 14:53:17 +01:00
Aleksander Morgado 2240747715 iface-modem: include policy authorization checks 2012-03-16 14:53:15 +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
Aleksander Morgado dc1df5bf2f iface-modem-simple: SIM-PIN2 locking does not prevent from connecting 2012-03-15 14:15:06 +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 a1dc38360c iface-modem: don't force port closing here, it breaks the open/close count 2012-03-15 14:15:02 +01:00
Aleksander Morgado 214a146a28 iface-modem: simplify disabling sequence
Avoid the _ready() function generator macro, not really needed here.
2012-03-15 14:15:02 +01:00
Aleksander Morgado cd5e9c27a3 broadband-modem: if locked, don't try to initialize remaining interfaces
Whenever we get unlocked, the modem initialization sequence will be run again.
2012-03-15 14:14:59 +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 4aeadbb776 iface-modem: proper fallback state when bearer connection fails 2012-03-15 14:14:55 +01:00
Aleksander Morgado 7e36f04b37 core: use new enums/flags string getters/builders 2012-03-15 14:14:52 +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 cb2612d0ce iface-modem: fix signal quality context creation 2012-03-15 14:14:44 +01:00
Aleksander Morgado 5edb863ede iface-modem: make old compilers happy 2012-03-15 14:14:44 +01:00
Aleksander Morgado ee07cc51ea iface-modem: fix checks for single technology capabilities 2012-03-15 14:14:44 +01:00
Aleksander Morgado 8610fd47b3 iface-modem: plug small leak 2012-03-15 14:14:44 +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 bda0d0c1d4 iface-modem: allow implementations to return no SIM and no error
That would mean that the implementation doesn't want to handle a SIM object
around, maybe because it doesn't support it properly, or because there is
no SIM at all (e.g. CDMA-only modems).
2012-03-15 14:14:42 +01:00
Aleksander Morgado 021ff8a35b iface-modem: open/close secondary AT/QCDM ports during enable/disable 2012-03-15 14:14:42 +01:00
Aleksander Morgado be7cee24f3 iface-modem: place all tags/quarks handled together 2012-03-15 14:14:42 +01:00
Aleksander Morgado 0f7716887c iface-modem: new methods to check for specific capabilities being supported 2012-03-15 14:14:42 +01:00