Commit Graph
1398 Commits
Author SHA1 Message Date
Aleksander Morgado 0aff871b04 device: split `MMDevice' creation and plugin setting
We want to be able to create the MMDevice way before we have decided which
plugin to use.
2012-08-06 20:06:44 +02:00
Aleksander Morgado 815693661c core: compile all ports before creating the modem object
Before this, we only exported the modem to DBus when all ports were organized,
in order to make sure that we select as primary port the one we really want and
not the first AT port grabbed. Given that to get all the ports organized we also
needed to wait to get all the ports grabbed, we can now also defer the creation
of the modem object until all the ports get grabbed. This allows us to create
different types of objects based on the ports available (e.g. we can now create
QMI-supported modem objects if we see a QMI port around).
2012-08-06 20:06:44 +02:00
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 0ff904b3c5 bearer: set state as DISCONNECTING as soon as we cancel the connection sequence
Just when we request to cancel the connection we need to set the bearer as
being disconnected, so that we do not end up overwriting connection cancellation
requests.

Reported by: Thieu Le <thieule@chromium.org>
2012-07-31 09:18:45 +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 8d31e79ac4 sim: getting SIM-PIN2 lock doesn't mean PIN sending failed 2012-07-26 11:00:17 +02:00
Aleksander Morgado 05289d094b iface-modem-3gpp: fix variant ref count 2012-07-25 12:00:28 +02:00
Aleksander Morgado c6c1e0fb50 broadband-modem: fallback to unencoded command in USSD if encoded fails 2012-07-22 14:51:31 +02:00
Aleksander Morgado 19e65253de broadband-bearer: debug logs when disconnecting 3GPP bearer 2012-07-22 13:40:02 +02:00
Aleksander Morgado aa11a0bf7d broadband-modem: assume CS if 2G supported 2012-07-22 13:39:50 +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 2aceb907f4 mm-broadband-modem: fix result completion on hex encoding errors 2012-07-22 13:36:43 +02:00
Aleksander Morgado 9670b362bf mm-broadband-modem: fix USSD command sending, don't use cached AT replies 2012-07-22 13:35:18 +02:00
Aleksander Morgado ea10c57056 broadband-modem: cancel pending USSD request if USSD session cancelled 2012-07-22 13:33:34 +02:00
Aleksander Morgado ce33bcfd7a iface-modem-3gpp-ussd: set proper initial session state 2012-07-22 13:33:25 +02:00
Aleksander Morgado 89cdb8819a iface-modem-3gpp-ussd: don't allow USSD actions if the modem is not enabled 2012-07-22 13:33:15 +02:00
Aleksander Morgado dd8dcbb899 messaging: don't treat as fatal error if we cannot read from a given storage 2012-07-22 13:33:07 +02:00
Aleksander Morgado 2146553c59 broadband-bearer: fix missing method
It was wrongly removed in commit 2506e3093e.
2012-07-21 17:13:07 +02:00
Aleksander Morgado 3653ec4b8e broadband-modem: send always ATZ alone
ITU rec v.250 (6.1.1) says:
  The DTE should not include additional commands on the same command line after
  the Z command because such commands may be ignored.
2012-07-19 16:22:52 +02:00
Dan Williams e7715af875 serial: fix AT port carriage return handling
Off-by-one, fix it.
2012-07-18 10:51:44 -05:00
Ben Chan 717977d0b5 iface-modem-messaging: check if supported storage is allocated before use
load_supported_storages may fail, which results in unallocated storage
memory. This patch modifies load_initial_sms_parts_from_storages and
is_storage_supported to handle that gracefully.
2012-07-17 08:02:13 +02:00
Aleksander Morgado 431b6a0fc5 broadband-modem: remove `USE_WS46' property
3GPP modems will all try to use AT+WS46=? by default to gather supported modes.
2012-07-16 08:34:01 +02:00
Aleksander Morgado 7ce65fe85d broadband-modem: try to guess more specific 2G/3G/4G mode support
For 3GPP modems, we'll try with AT+WS46=?, which is the standard command to
query supported networks. If it returns error, we'll fallback to the defaults.

For CDMA modems, we'll try to gather CDMA1x and/or EV-DO support directly from
the AT+GCAP response.
2012-07-16 08:30:50 +02:00
Aleksander Morgado f4ad5c805e iface-modem-cdma: new steps to setup/cleanup unsolicited messages 2012-07-16 08:30:45 +02:00
Aleksander Morgado 209f4d4420 iface-modem-[3gpp|cdma]: remove contexts with timeouts when shutting down
Following the same logic as in commit 9ddcf92a, those contexts in the interface
which contain the setup of a timeout are cleared before removing the DBus
skeleton objects, so that we make sure they are not fired out once these have
been disposed.
2012-07-13 09:09:15 +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
Ben Chan 0519af932e port-probe: fix crash in serial_probe_at_parse_response due to NULL response
When the serial port is not open, internal_queue_command
(mm-serial-port.c) invokes serial_probe_at_parse_response
(mm-port-probe.c) with a NULL response. This patch modifies
serial_probe_at_parse_response to handle NULL response properly.
2012-07-12 22:58:58 +02:00
Aleksander Morgado 513abb2ccf polkit: fix authority object disposal 2012-06-27 15:38:28 +02:00
Aleksander Morgado df1f21d17f sms: fix setting multipart specific properties
Don't make them construct-only, so that we can set them whenever needed.
2012-05-06 18:53:03 +02:00
Aleksander Morgado 8a47621a5c sms,tests: new test to check for multipart support in SMS parts 2012-05-06 18:48:59 +02:00
Tore Anderson 6b9ee7c833 broadband-bearer: derive PDP type from the ip-type bearer property
This patch makes it possible to use MM to set up PDP contexts with
PDP types other than 'IP', which is particularly useful when trying
to use the 'IPV6' or 'IPV4V6' PDP types defined in recent 3GPP specs.

If ip-type isn't specified, 'IP' will be used by default, due to the
fact that modem support for the 'IPV4V6' type is still rather scarce.

The patch applies to Aleksander's 'bearer-properties' branch. It has
been tested using mmcli in this fashion:

mmcli -m 0 --simple-connect=apn=internet # default to 'IP'
mmcli -m 0 --simple-connect=apn=internet,ip-type=IP
mmcli -m 0 --simple-connect=apn=internet,ip-type=IPV6
mmcli -m 0 --simple-connect=apn=internet,ip-type=IPV4V6
2012-05-06 17:12:36 +02:00
Aleksander Morgado caeeae2721 bearer: simplify handling of the bearer configuration
The base MMBearer object will receive the MMBearerProperties configuration,
which contains every generic and plugin-specific set up. Not every configuration
parameter will be used by every implementation (e.g. not every bearer needs
user/password).

The Bearer object will expose every configuration parameter received in its
`Properties' property in the interface, even if it's not really used.
2012-05-06 17:12:36 +02:00
Dan Williams 90f4a034b2 modem-helpers: recognize 3GPP2 access tech strings too
Various Gobi-based devices (USB551L, probably Gobis too) can report
EVDO and 1X as the current RAT from CNTI so parse that here too.
2012-05-04 17:38:36 -05:00
Dan Williams 1e024c711a broadband-modem: add another Novatel +GCAP LTE response
This time from the 551L.  I wonder when they'll make up their minds
about what to return.
2012-05-04 17:19:20 -05:00
Nathan Williams 00cb8a26a8 Add a utility routine to do ITU V.250 quoting of strings for AT commands.
BUG=chromium-os:27096,chromium-os:27063
TEST=None
Change-Id: Ic1d24a9e4b7421db7f8d16c52535bd6d2780423e
2012-05-02 21:05:06 +02:00
Nathan Williams 01a17f5c6c helpers: adjust parsing of +CNUM response to permit spaces in the alphanumeric descriptor.
This permits matching a response such as '"Line 1","+19999999999",145',
which previously did not match.

Change-Id: I666af8774507c6c3b3e214b820449542065dd8b4
2012-04-13 23:35:13 +02:00
Aleksander Morgado d379b9ea2a bearer: allow subclasses to report disconnection
The new `mm_bearer_report_disconnection()' allows subclasses to notify about
being disconnected, so that every layer of inheritance can chain its own code
to reset the connection status.

This commit partially disables the logic included in commit 981222. Now
subclasses (actually, no one) are not allowed to g_object_set() the
MM_BEARER_STATUS property.
2012-04-10 23:27:25 +02:00
Aleksander Morgado 83afd3ddc9 iface-modem: new helpers to query supported modes 2012-04-10 18:28:33 +02:00
Aleksander Morgado bc0d9ddf5f broadband-modem: query supported networks to get a better supported modes value
If we base our supported modes default guessing only on capabilities listed by
AT+GCAP, we find that we don't know how to differenciate between 2G and 3G 3GPP
modems. So, if supported, we will try to query the list of supported networks
with AT+WS46=?, which explicitly tells us if the modem supports GERAN and/or
UTRAN and/or E-UTRAN. Note that plugins need to request this new behaviour by
setting the `MM_BROADBAND_MODEM_USE_WS46' property to TRUE when creating the
modem object.
2012-04-10 18:27:17 +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 9812225d93 bearer: always reset interface state when going into disconnected status
Custom bearer implementations in Plugins are allowed to g_object_set() the
MM_BEARER_STATUS property to DISCONNECTED in order to notify that the bearer got
disconnected. We need to always reset the interface state (remove IP config, set
connected=FALSE,...) also in that case.

Also consolidated in some helper private functions the way the bearer status is
updated.
2012-04-10 10:46:10 +02:00
Aleksander Morgado cfeebcd63a manager: no need to remove modems in idle
There is no problem in getting the modem removed just after finishing the
disabling sequence.
2012-03-30 16:18:48 +02:00
Aleksander Morgado 3094e3f26b manager: try to get all modems disabled before while shutting down 2012-03-30 16:11:55 +02:00
Aleksander Morgado 8c84aea3f0 base-modem: disconnect internal cancellable handler while disposing 2012-03-30 16:11:14 +02:00
Aleksander Morgado b68461c417 base-modem: plug small leaks 2012-03-30 16:09:27 +02:00
Aleksander Morgado b03541b1fe plugin-base: don't setup udev client notifications 2012-03-30 13:47:00 +02:00
Aleksander Morgado 0372e73abd port-probe-cache: ensure we cleanup every possible leftover 2012-03-30 13:47:00 +02:00
Aleksander Morgado 94d46a4387 plugin-base: plug memleak 2012-03-30 13:47:00 +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