Commit Graph

1000 Commits

Author SHA1 Message Date
Bjørn Mork
c014bce554 mbm: add udev rule for Toshiba branded H5321gw module
Reported-by: Thomas Schäfer <tschaefer@t-online.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-09-02 11:35:39 +02:00
Ben Chan
0e64ba01d4 huawei: ignore ^DSDORMANT unsolicited messages 2013-09-02 09:10:32 +02:00
Ben Chan
387c97d81f novatel-lte: check if a connect operation has been cancelled 2013-08-27 09:57:14 -05:00
Aleksander Morgado
2b28b7acb6 at-serial-port: avoid 'enable_disable', use just 'enable' in method name 2013-08-26 16:21:27 +02:00
Ben Chan
82eb2158db huawei: ignore ^RFSWITCH unsolicited messages
This patch ignores the ^RFSWITCH unsolicited messages in order to avoid
them being mixed with other unsolicited messages. The modem power state
is explicitly determined by the ^RFSWITCH? command, if supported, so we
don't need to depend on the ^RFSWITCH unsolicited messages.
2013-08-26 16:00:20 +02:00
Ben Chan
3979939eaf huawei: ignore +CUSATP and +CUSATEND unsolicited messages 2013-08-26 15:58:21 +02:00
Ben Chan
3fcc908ed5 huawei: always parse operator name in +COPS responses as ASCII
Despite +CSCS? may claim supporting UCS2, Huawei modems always report
the oerator name in ASCII in a +COPS response. This patch addresses that
by always assuming the charset is IRA when parsing the operator name in a
+COPS response.
2013-08-26 15:57:04 +02:00
Ben Chan
f2fb2fe9fc altair-lte: increase timeout for %APNN, %DPDNACT, and %STATCM 2013-08-26 15:56:39 +02:00
Aleksander Morgado
b61827f474 huawei: ignore ^NDISEND unsolicited messages 2013-08-21 11:16:15 +02:00
Ben Chan
b83ef8b5e2 altair-lte: increase timeout for +CFUN=4 2013-08-15 13:26:13 -05:00
Aleksander Morgado
663d496968 huawei: improve ^NDISSTATQRY parser for newer firmware
Newer firmware for Huawei devices will not split the IPv4 and IPv6 info in
different lines for the ^NDISSTATQRY reply; instead they will be included in the
same line. E.g. instead of

     ^NDISSTATQRY: 1,,,IPV4
     ^NDISSTATQRY: 0,33,,IPV6
     OK

We may have:

     ^NDISSTATQRY:0,,,"IPV4",0,33,,"IPV6"

Also note the optional spaces after the ':', and that in the new version the
strings are enclosed in double quotes.

https://bugzilla.gnome.org/show_bug.cgi?id=705339
2013-08-15 19:09:51 +02:00
Ben Chan
34f6a2b63e huawei: implement modem reset via +CFUN=16 for MU736 2013-08-14 09:30:47 +02:00
Fangxiaozhi (Franko)
e778283f55 huawei: enlarge the checking times for ndisstatqry in disconnecting
In sometimes, the disconnection of NDISDUP will spend more time than 10s.
So it is better to enlarge the checking times, such as up to 60 times.
2013-08-12 09:04:43 +02:00
Ben Chan
a82acb34ec huawei: implement modem reset 2013-08-12 08:57:43 +02:00
Ben Chan
755c61a2ff huawei: ignore ^PDPDEACT unsolicited messages 2013-08-06 16:06:01 -05:00
Ben Chan
8ff3f6703a huawei: handle whitespace in RSSI responses
This patch modifies the regular expressions for parsing ^RSSI, ^RSSILVL,
and ^HRSSILVL responses to handle any whitespace that is inserted
between the colon and the RSSI value.

The issue is identified by Dan Williams <dcbw@redhat.com>
2013-08-06 16:05:37 -05:00
Ben Chan
f2fd4d8de0 huawei: implement modem power up and down
This patch is originally developed by:
  Franko Fang <fangxiaozhi@huawei.com>

And then reviewed and updated by:
  Ben Chan <benchan@chromium.org>
2013-08-05 22:51:22 -05:00
Ben Chan
48fbe1a242 huawei: reset disconnect_pending to NULL when ^NDISSTATQRY fails 2013-07-31 16:59:27 +02:00
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