Commit Graph

982 Commits

Author SHA1 Message Date
Ben Chan
48d35ee610 altair-lte: set serial port send delay to 0
With a non-zero send delay, the communication over the ttyACM port of
the modem is not very stable when USB auto-suspend is enabled for the
modem. The send delay is not necessary and thus removed by this patch.

Ori Inbar <ori.inbar@altair-semi.com> reported the issue and suggested
this fix.
2013-07-14 21:03:37 -05:00
Dan Williams
f3d9c35e9b build: fix multiply defined EXTRA_DIST
plugins/Makefile.am:375: warning: EXTRA_DIST multiply defined in condition TRUE ...
gtester.make:6: ... 'EXTRA_DIST' previously defined here
plugins/Makefile.am:1:   'gtester.make' included from here
2013-07-11 09:07:12 -05:00
Aleksander Morgado
0b2e04ed14 huawei: use ^NDISSTATQRY to check for connection status
Patch based on changes from Franko Fang <fangxiaozhi@huawei.com>.
2013-07-11 09:39:21 +02:00
Aleksander Morgado
8d0ec0fc24 huawei: new helper to parse ^NDISSTATQRY responses 2013-07-11 09:39:21 +02:00
Dan Williams
8660be8f39 x22x: add support for Olivetti Olicard 200 2013-07-10 10:56:45 -05:00
Ben Chan
f0490b4fff altair-lte: support load_power_state in MMIfaceModem
Being able to determine the current power state of the modem is
necessary to ensure reliable modem operations.
2013-07-04 07:27:27 +02:00
Ben Chan
989210bfd8 altair-lte: propagate error when load_{supported,current}_bands fails
This patch fixes a potential crash when
MMIfaceModem::load_current_bands_ready() dereferences a NULL GError
pointer, which happens when the altair-lte plugin fails to load the
current bands but does not propagate the error. It also fixes a similar
issue with the plugin fails to load the supported bands, even though
MMIfaceModem::load_supported_bands_ready() checks for a NULL GError
pointer.
2013-06-28 07:35:59 +02:00
Ben Chan
5be1ce6ee1 novatel-lte: propagate error when load_current_bands fails
This patch fixes the following crash when
MMIfaceModem::load_current_bands_ready() dereferences a NULL GError
pointer, which happens when the novatel-lte plugin fails to load the
current bands but does not propagate the error.

Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )

0x7f04d6c89c36   [ModemManager]            - mm-iface-modem.c:3886      load_current_bands_ready
0x7f04d6942236   [libgio-2.0.so.0.3200.4]  - gsimpleasyncresult.c:767   g_simple_async_result_complete
0x7f04d6942338   [libgio-2.0.so.0.3200.4]  - gsimpleasyncresult.c:779   complete_in_idle_cb
0x7f04d67fad74   [libglib-2.0.so.0.3200.4] - gmain.c:2539               g_main_context_dispatch
0x7f04d67fb0f7   [libglib-2.0.so.0.3200.4] - gmain.c:3146               g_main_context_iterate
0x7f04d67fb551   [libglib-2.0.so.0.3200.4] - gmain.c:3340               g_main_loop_run
0x7f04d6c68795   [ModemManager]            - main.c:142]                main
0x7f04d6213464   [libc-2.15.so]            - libc-start.c:234]          __libc_start_main
0x7f04d6c68318   [ModemManager]            + 0x0001d318]
2013-06-28 07:35:53 +02:00
Ben Chan
6f3d9e5dac altair-lte: avoid sending ATZ when enabling the modem
This patch prevents an ATZ command, which causes the modem to reboot,
from being sent to the modem when the modem is being enabled.
2013-06-27 09:12:56 +02:00
Aleksander Morgado
a420ef3a0a icera: load supported modes with AT%IPSYS=?
http://bugzilla.gnome.org/show_bug.cgi?id=703023
2013-06-26 11:07:19 +02:00
Dan Williams
597401f80a broadband-bearer-hso: IPv4 prefix is always /32
The modem doesn't give us a prefix in the OWANDATA response, but it's
always /32.  This didn't get set previously because NetworkManager
always just used /32 for the 'static' configuration, but NM isn't the
only user of MM, and only MM knows for sure that the prefix should
be /32.
2013-06-24 22:04:32 -05:00
Aleksander Morgado
30fe6eab48 hso: if IPv6 bearer type requested, create a generic bearer
Option/HSO modems don't seem to support IPv6 when using the net interface. So if
IPv6 is requested, create a generic bearer.

    $ sudo mmcli -m 0 --simple-connect="apn=internet,ip-type=ipv6"
    successfully connected the modem

    $ sudo mmcli -b 0
    Bearer '/org/freedesktop/ModemManager1/Bearer/0'
      -------------------------
      Status             |   connected: 'yes'
                         |   suspended: 'no'
                         |   interface: 'ttyHS3'
                         |  IP timeout: '20'
      -------------------------
      Properties         |         apn: 'internet'
                         |     roaming: 'allowed'
                         |     IP type: 'ipv6'
                         |        user: 'none'
                         |    password: 'none'
                         |      number: 'none'
                         | Rm protocol: 'unknown'
      -------------------------
      IPv4 configuration |   method: 'ppp'
      -------------------------
      IPv6 configuration |   method: 'unknown'

    $ sudo mmcli -m 0 --simple-disconnect
    successfully disconnected all bearers in the modem

https://bugzilla.gnome.org/show_bug.cgi?id=702472
2013-06-24 19:41:24 +02:00
Aleksander Morgado
e446db9ca4 huawei: default to IPv4 if no specific IP type to use given in NDISDUP modems 2013-06-05 19:15:15 +02:00
Aleksander Morgado
1c67d050cb api,introspection: merge 'AllowedModes' and 'SupportedMode' into 'CurrentModes'
We now have a single 'CurrentModes' property which contains both values in a
tuple with signature "(uu)".

Also, rename 'SetAllowedModes()' to 'SetCurrentModes()', and update the list of
arguments expected to have a single "(uu)" tuple.
2013-06-05 19:15:14 +02:00
Aleksander Morgado
45ceba7692 api,introspection: 'SupportedModes' is now a list of possible combinations
Instead of just a mask of MMModemMode values, we now provide a list of the
allowed and preferred mode combinations supported by the modem. E.g.:

$> sudo mmcli -m 0
  -------------------------
  Modes    |      supported: 'allowed: 2g; preferred: none
           |                  allowed: 3g; preferred: none
           |                  allowed: 2g, 3g; preferred: none
           |                  allowed: 2g, 3g; preferred: 2g
           |                  allowed: 2g, 3g; preferred: 3g
           |                  allowed: 4g; preferred: none
           |                  allowed: 2g, 3g, 4g; preferred: none'
2013-06-05 19:15:14 +02:00
Aleksander Morgado
212d00c529 api,instrospection: rename 'Bands' to 'CurrentBands'
... and 'SetBands()' to 'SetCurrentBands()'.

We'll keep the 'Current' keyword in those properties which also have
'Supported' values.
2013-06-05 19:15:14 +02:00
Dan Williams
68a7d1a3ac broadband-modem-mbm: *EPIN response often needs a lot of time
If the modem was locked, it'll delay responding until the SIM is ready,
which can take a long time.
2013-05-31 13:13:57 -05:00
Dan Williams
fe5c81458f nokia: CS-12 appears to only accept PPP on USB interface 3
Attempting PPP on interface 1 never returns CONNECT, simply hangs and
times out at the dial.
2013-05-31 13:13:34 -05:00
Ben Chan
ba14d15df3 novatel-lte: increase number of retries for connection status checks
This patch increases the number of retries, from 4 to 60, for connection
status check during a connection / disconnection request, which handles
some scenario when the connection / disconnection request takes more
than 5 seconds to complete.
2013-05-28 17:31:25 +02:00
Ben Chan
c4f0ad6905 novatel-lte: normalize QMI status when included in DBus error message
This patches normalize a response for the AT$NWQMISTATUS command, by
replacing white-space characters with a space, before the response is
included in a DBus error message.
2013-05-28 10:03:40 +02:00
Aleksander Morgado
05ac6b6cf1 wavecom: don't grab ports handled by the qcserial driver
Sierra Wireless will assign the Wavecom USB vendor ID to some Gobi-based modems,
like the MC7750. Just ignore those by filtering out all devices with the Wavecom
USB vendor ID if they are handled by the qcserial driver.
2013-05-27 20:09:10 +02:00
Ben Chan
3332333852 novatel: fix invalid comparison of unsigned expression
This patch fixes the following invalid comparison of unsigned expression:

novatel/mm-plugin-novatel.c:148:29: error: comparison of unsigned
      expression >= 0 is always true [-Werror,-Wtautological-compare]
    if (ctx->nwdmat_retries >= 0) {
        ~~~~~~~~~~~~~~~~~~~ ^  ~

Bug reported on https://code.google.com/p/chromium/issues/detail?id=242150
2013-05-20 10:25:32 +02:00
Aleksander Morgado
027d95506c huawei: use ^SYSINFOEX if available instead of ^SYSINFO
Newer Huawei modems, like the E3276 or the ME906 won't support ^SYSINFO, and we
should instead use the newer ^SYSINFOEX. By default, use ^SYSINFOEX when
available, as it provides more information than the plain ^SYSINFO.

E.g.:
    ^SYSINFOEX:2,3,0,1,,3,"WCDMA",41,"HSPA+"
    ^SYSINFOEX:2,3,1,1,1,3,”WCDMA”,46,”DC-HSPA+”
2013-05-09 17:56:38 +02:00
Aleksander Morgado
f96bb04c00 huawei: ignore ^NDISSTAT unsolicited messages
These messages give us information about the current connection status in the
NDIS interface. We already have other means to know this status, so we just
ignore the unsolicited message for now.

E.g.:
    ^NDISSTAT: 1,,,"IPV4"
2013-05-09 14:45:13 +02:00
Aleksander Morgado
cba3f7db65 huawei: ignore ^HCSQ unsolicited messages
Newer Huawei modems use ^HCSQ to report per-interface signal quality values,
but we don't know yet what each field means for each technology, so just ignore
them for now.

E.g.:
    ^HCSQ: "GSM", 53
    ^HCSQ: "WCDMA", 26, 24, 43
    ^HCSQ: "LTE", 40, 28, 216, 14

We also don't use this message to update current access technology information,
as it is not detailed enough (e.g. WCDMA doesn't specify whether it's plain UMTS
or HSDPA or HSPA+...)
2013-05-09 14:45:12 +02:00
Aleksander Morgado
d169c99dc9 novatel: skip $NWDMAT if the modem has QMI ports 2013-05-07 18:49:57 +02:00
Aleksander Morgado
2c83334c25 novatel: allow QMI-powered modems 2013-05-07 09:11:28 +02:00
Aleksander Morgado
031657cea5 novatel: don't filter out the USB551L
We filter the E362 because it's managed by the Novatel LTE plugin. If we also
filter out the USB551L, but it's not explicitly grabbed by any other plugin, it
will default to the Generic one.
2013-05-07 09:08:17 +02:00
Aleksander Morgado
76d97c6334 novatel: don't explicitly filter by drivers
No real need to do it; the VID filter is already enough.
2013-05-07 09:05:49 +02:00
Dan Williams
89ae657fce telit: add basic plugin for Telit 3GPP and 3GPP2 devices 2013-05-06 12:38:50 -05:00
Dan Williams
ab4198f576 broadband-modem-zte: chain up to parent access tech loading for CDMA-only devices (bgo #698850)
CDMA-only devices don't support +ZPAS for access tech loading, so chain up to the
parent so we get the QCDM fallback access tech loading functions.

https://bugzilla.gnome.org/show_bug.cgi?id=698850
2013-05-06 10:19:30 -05:00
Dan Williams
7d67182521 broadband-modem-nokia: load access technology with *CNTI if possible
Works on the N9/N950, but not supported by the N900.
2013-05-06 10:18:02 -05:00
Dan Williams
881da689da broadband-modem-nokia: N900 doesn't disable echo unless explicitly done
During init, the N900 appears to ignore an E0 in the same command as
an E1.  So just add another init command to disable echo, which won't
have any effect on devices that work with the first command.
2013-05-06 10:18:02 -05:00
Ben Chan
2eee2e48ba sierra: remove comparison of unsigned expression >= 0
This patch removes an unnecessary check of unsigned expression >= 0,
which also fixes the following clang warnings:

sierra/mm-broadband-modem-sierra.c:570:18: error: comparison of
unsigned expression >= 0 is always true
[-Werror,-Wtautological-compare]
            mode >= 0 &&
            ~~~~ ^  ~

Bug reported on https://code.google.com/p/chromium/issues/detail?id=235989
Patched by Yunlian Jiang <yunlian@chromium.org>
2013-05-06 09:36:53 +02:00
Dan Williams
2e8866c8b7 time: normalize GetNetworkTime() response to local time + timezone info (bgo #697372)
The GetNetworkTime() response is defined to be an ISO8601 string, which
is in turn defined to be in local time.  Make sure that's reflected in
the documentation, and append the timezone offset to UTC where we have
it.

Oddly, Icera devices return their time info in UTC with an offset to
the local timezone, so we have to jump through some hoops there to
convert the response to localtime based on the reported offset.

Some additional fixes by Aleksander Morgado <aleksander@lanedo.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=697372
2013-04-25 15:14:14 -05:00
Dan Williams
2320411113 broadband-modem-icera: fix issues checking supported bands
Icera devices include bands that the modem doesn't support in
the %IPBM=? list, so the plugin sets the band to its current
enabled/disabled value to test whether that band is supported.
There were two problems with this approach:

1) Setting an already-enabled band to be enabled apparently
isn't a NOP; it might take more than the 3 seconds given, and
if the response comes after 3 seconds, this greatly confuses
ModemManager because the AT command/reply sequence is now
messed up.  So increase the timeout to 10 seconds.

2) Why bother checking bands that are already enabled anyway?
We already know they are supported, so just don't check those
bands at all.  This requires some parkour because we use the
parsed band array from %IPBM=? to track whether bands are
enabled/disabled by indexing into the array, so instead just
use two separate arrays.  This actually makes the fix for #1
un-needed (because we never enable any bands) but it's good
to have #1 anyway.
2013-04-25 09:18:53 -05:00
Dan Williams
cabf53179e sierra: handle probing ERROR response better
The USB305 (Icera-based) apparently has a port that replies to everything
with ERROR, and that port is unusable.  Make sure it's ignored, otherwise
MM may claim it as the primary AT port since it technically speaks AT.
2013-04-25 09:18:53 -05:00
Aleksander Morgado
cebe828f7f huawei: only expect custom inits to be run on tty ports 2013-04-25 10:34:19 +02:00
Aleksander Morgado
99a8dcce2c zte: ensure error is set when +ZSNT response parser doesn't match 2013-04-25 09:36:51 +02:00
Aleksander Morgado
a32eef3434 x22x: ensure error is set when +SYSSEL response parser doesn't match 2013-04-25 09:36:51 +02:00
Aleksander Morgado
77d096bdac sierra: ensure error is set when !SELRAT response parser doesn't match 2013-04-25 09:36:51 +02:00
Aleksander Morgado
52fd67e365 novatel: ensure error is set when $NWRAT response parser doesn't match 2013-04-25 09:36:51 +02:00
Aleksander Morgado
2e6ba7cd09 huawei: ensure error is set when ^CPIN response parser doesn't match 2013-04-25 09:36:51 +02:00
Dan Williams
d1708f243d x22x: add Archos G9 device tags 2013-04-24 17:09:04 -05:00
Aleksander Morgado
b017064a58 altair-lte: minor coding style fixes 2013-04-24 23:06:41 +02:00
ori inbar
ba83bc61d0 altair-lte: Add SIM unlock retries query to the Altair plugin. 2013-04-24 23:05:35 +02:00
Aleksander Morgado
126d89b2f3 x22x: fix regex when parsing +SYSSEL response
The numbers reported by +SYSSEL may have more than one digit, e.g.:
  +SYSSEL: 14,2,0,0

https://bugzilla.gnome.org/show_bug.cgi?id=698774
2013-04-24 22:48:18 +02:00
Aleksander Morgado
b95dc3f2f5 mbm: allow MBIM devices 2013-04-17 19:15:24 +02:00
Aleksander Morgado
56387bb79c sierra: allow MBIM modems handled by the plugin 2013-04-17 15:19:50 +02:00
Aleksander Morgado
76ed80e1c9 generic: allow MBIM devices 2013-04-17 15:19:38 +02:00