Commit Graph
37 Commits
Author SHA1 Message Date
Aleksander Morgado 1642863037 iface-modem-simple: avoid intermediate states
If the modem is currently disabling, we need to wait to get fully disabled
before starting with the new connection sequence.

If the modem is currently disconnecting, we need to wait to get fully
disconnected before starting with the new connection sequence.
2012-10-30 15:35:33 +01:00
Aleksander Morgado e499d32ef1 core: add info logs to show main state machine start/stop points 2012-10-25 16:19:24 +02:00
Dan Williams 7f105dc386 simple: don't try to enable the "unknown" band
If the band isn't actually given, don't try to enable it.
2012-10-19 19:32:28 -05:00
Aleksander Morgado a850644cd8 iface-modem-simple: plug memleaks 2012-10-11 11:47:53 +02:00
Aleksander Morgado c16bcdf68c core: make sure objects retrieved with g_object_get() are valid in the ifaces
The interfaces usually retrieve objects (e.g. skeletons) from the Modem object
using g_object_get(), but we didn't make sure that these objects were actually
valid before using them.

This should clean up errors happening when the modem gets unplugged and still
some actions are ongoing.

Should fix https://bugzilla.gnome.org/show_bug.cgi?id=685933
2012-10-11 11:41:15 +02:00
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 bf1da3faea iface-modem-simple: never remove connected bearers
Modems have a maximum of bearers allowed to be connected at a time, number which
is given by the number of available ports that may be used for data connections.

When Simple.Connect() tries to launch a connection, it will try to find first an
existing bearer with the required parameters (e.g. APN, IP type). If such bearer
is found, it will just use it. If no such bearer is found, it will try to create
one. When trying to create one, if there is no more room for bearers in the
modem, we will remove the first disconnected bearer that we find, if any, before
trying to create the new one. This logic now makes sure that no connected bearer
gets removed in order to create a new one, and also that only one existing gets
removed if possible (not every bearer as we did previously).

Further logic to connect multiple bearers at a time cannot be done using the
Simple interface.
2012-09-04 11:34:00 +02:00
Aleksander Morgado 3132e34dc1 iface-mode-simple: when setting bands or modes, wait some time to settle down
When bands or allowed modes are changed, the modem will very likely reset its
current registration and start from scratch. We will now give it some seconds
to settle down before going on with the connection request, so that the modem
has enough time to report being unregistered. Without this sleep time, the
unsolicited message reporting being unregistered may arrive *after* having
checked registration status in the Simple connect sequence, and therefore we
end up failing the connection request.
2012-08-30 16:36:38 +02:00
Aleksander Morgado 3ff03c946f iface-modem-simple: don't launch band/mode updates unless explicitly required 2012-08-28 17:15:18 +02:00
Aleksander Morgado 3b366118b6 simple: need to wait to get fully initialized before trying to enable 2012-03-30 10:25:33 +02:00
Aleksander Morgado 6bb90d92e4 iface-modem-simple: try to skip initial steps in the Simple Connect sequence 2012-03-16 15:38:09 +01:00
Aleksander Morgado 295272196d iface-modem-simple: don't request to connect the bearer if already connected 2012-03-16 15:37:37 +01:00
Aleksander Morgado 1dbe4a12cf iface-modem-simple: don't call the enable() methods in the class directly
Use the new `mm_base_modem_enable()' instead, which will pass down the
modem-wide cancellable to the enable() implementation.
2012-03-16 15:21:56 +01:00
Aleksander Morgado 686cfbb2c0 iface-modem-simple: don't assume bearer is always set 2012-03-16 15:21:01 +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 1385eb394f libmm-common: `MMSimpleConnectProperties' won't be considered internal any more
Renamed `MMCommonConnectProperties' to `MMSimpleConnectProperties', and removed
the `MMModemSimpleConnectProperties' 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 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 6a655f5daf iface-modem-simple: include policy authorization checks 2012-03-16 14:53:15 +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
Aleksander Morgado 050c30db1c iface-modem-simple: don't create a bearer if we can reuse an existing one 2012-03-15 14:14:55 +01:00
Aleksander Morgado c65c5aedc3 sim: allow subclassing pin/puk sending operations 2012-03-15 14:14:55 +01:00
Aleksander Morgado 24dd208b59 iface-modem-simple: remove dual 3GPP/CDMA bearers logic
Just rely on a single Bearer object created.
2012-03-15 14:14:53 +01:00
Aleksander Morgado 7e36f04b37 core: use new enums/flags string getters/builders 2012-03-15 14:14:52 +01:00
Aleksander Morgado 3b443b6954 libmm-common: fix usage of main library header 2012-03-15 14:14:52 +01:00
Aleksander Morgado 8adc9cd699 broadband-modem: we can expect non-LTE 3GPP+CDMA modems 2012-03-15 14:14:50 +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 744fe5712d iface-modem-simple: build 3GPP+CDMA registration check logic
For mixed 3GPP+CDMA modems, we check registrations in both 3GPP and CDMA
networks, and we stop checks when we find ourselves registered in either one
or the other.
2012-03-15 14:14:49 +01:00
Aleksander Morgado 48d5ac6682 core: use g_list_free_full() when possible 2012-03-15 14:14:46 +01:00
Aleksander Morgado 08a950ffb6 iface-modem-simple: plug memleak 2012-03-15 14:14:44 +01:00
Aleksander Morgado f0c5e5145e iface-modem-simple: include setting bands during simple Connect() 2012-03-15 14:14:41 +01:00
Aleksander Morgado 93880155f0 iface-modem-simple: implement GetStatus() 2012-03-15 14:14:39 +01:00
Aleksander Morgado adcc33d0ea iface-modem-simple: implement Disconnect() 2012-03-15 14:14:38 +01:00
Aleksander Morgado e435deb2ba iface-modem-simple: implement bearer creation and connection during Connect() 2012-03-15 14:14:38 +01:00
Aleksander Morgado 8ff310be28 iface-modem-simple: use the new connect properties object 2012-03-15 14:14:38 +01:00
Aleksander Morgado ab9c7d9013 iface-modem-simple: implement Connect() 2012-03-15 14:14:37 +01:00
Aleksander Morgado 7ea8bf59fb iface-modem-simple: new interface to handle the Simple interface 2012-03-15 14:14:36 +01:00