Commit Graph

899 Commits

Author SHA1 Message Date
Aleksander Morgado
8ddee24cc9 hso: use user-specified allowed authentication methods
If none of the specified methods is supported, an error is returned.

Also quote user and password using `mm_at_serial_port_quote_string()'.
2012-10-07 21:12:00 +02:00
Aleksander Morgado
de96243cd4 sierra: use user-specified allowed authentication methods
If none of the specified methods is supported, an error is returned.

Also quote user and password using `mm_at_serial_port_quote_string()'.
2012-10-07 21:12:00 +02:00
Aleksander Morgado
f4790c26bf icera: use user-specified allowed authentication methods
If none of the specified methods is supported, an error is returned.
2012-10-07 21:12:00 +02:00
Aleksander Morgado
7cd047b75d build,plugins: include missing builddir in CPPFLAGS
Built files in the ModemManager daemon (e.g. mm-serial-enums-types.[c|h]) will
be available in ${top_builddir}/src, not in ${top_srcdir}/src.
2012-10-04 12:25:35 +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
b6d628b3a1 build: merge libmm-common into libmm-glib
It's pointless to have libmm-common around, just merge it into libmm-glib and
make ModemManager depend on libmm-glib directly. At the end, the non-common
stuff in libmm-glib is really minimal.
2012-10-04 10:17:05 +02:00
Aleksander Morgado
54f476fe10 sierra: run power-down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
e669e4c868 cinterion: run power-down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
2ca70365cf wavecom: run power-down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
814bb21e9b nokia: ensure we skip power down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
305f02267e motorola: ensure we skip power down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
28800018fb gobi: ensure we skip power down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
668976f4d7 iridium: ensure we skip power down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
a5870ac3c6 zte: run power-down during init 2012-10-01 16:40:52 +02:00
Aleksander Morgado
a0e19630e4 icera: we won't be implementing power-down during init
Some Icera-based modems (e.g. Samsung/Icera Y3300/Y3400) may take a loong time
to run the power down command (see commit 5f1a1cf8). So, for these modems we
will fully skip the power down command run during initialization.
2012-10-01 16:40:52 +02:00
Aleksander Morgado
6995300ecd huawei: if port replies to AT^GETPORTMODE, port is AT
Just skips the additional check for AT support in the port.
2012-09-19 10:37:31 +02:00
Marius B. Kotsbak
d2353e01ff sierra: use +CFUN=4 for powering down GSM modems 2012-09-18 16:27:09 -05:00
Aleksander Morgado
a66f971a7c libmm-common: added common utils from core
Moved the utils to play with binary to hex strings into libmm-common.
2012-09-14 07:05:26 +02:00
Aleksander Morgado
b42b5795e3 iface-modem-messaging: automatically detect the best default storage
Instead of letting the plugins specify a default storage to use, just look at
the supported ones and use the best one.

"MT is preferred over "ME" or "SM", as "MT=ME+SM"
2012-09-14 07:05:23 +02:00
Aleksander Morgado
4f7534452d option,hso: properly parse returned IMEI 2012-09-14 07:05:23 +02:00
Aleksander Morgado
bddcc2fb07 iface-modem-messaging: instead of mem1,mem2,mem3 use just a new default storage
There is no point in specifying a default 'mem1' memory storage, which is used
for reading/listing/deleting, as those are operations that need a specific
'mem1' set each time.

Also, there is no point in specifying separate default 'mem2' and 'mem3' memory
storages, specially because now we allow Sms.Store() to specify a storage.

So, we will now only have a 'default' memory storage, which is applicable for
both 'mem2' and 'mem3' (storing, sending from storage and deleting).
2012-09-14 07:05:23 +02:00
Ben Chan
36c7136510 novatel-lte: implement modem reset 2012-09-11 08:47:07 +02:00
Ben Chan
5f1a1cf834 icera: increase timeout for +CFUN=4 2012-09-08 10:21:56 +02:00
Ben Chan
1252572607 novatel-lte: set default SMS storage to 'SM'
Novatel E362 LTE modem only supports 'SM' and 'SR', but not 'ME'.
2012-09-08 10:19:01 +02:00
Ben Chan
e3152772e5 icera: properly specify MM_BROADBAND_BEARER_ICERA_DEFAULT_IP_METHOD property 2012-09-06 08:45:31 +02:00
Marius B. Kotsbak
02b71336ae zte: extend allowed modes for LTE/4G devices for +ZSNT command
Updates:
  AT+ZSNT=6 means LTE only
  AT+ZSNT to specify 2G and 3G doesn't support 2G or 3G preference in LTE modems

Tested with a ZTE MF 820D.
2012-09-06 08:40:38 +02:00
Aleksander Morgado
4804c37604 build: new `--without-qmi' configure option
For those who don't care about the QMI support through libqmi-glib, or if you're
stuck with glib 2.30 (libqmi-glib requires 2.32), this configure switch allows
disabling the QMI support completely.

The logic to detect cdc-wdm ports is still in place, but the QMI probing is
never launched at them. Also, all QMI-related objects won't be compiled.
2012-09-05 20:02:31 +02:00
Marius B. Kotsbak
9c2a6320a8 sierra: add support for new !SELRAT values in newer Sierra LTE modems
AT!SELRAT=?
!SELRAT: Index, Name
00, Automatic
01, UMTS 3G Only
02, GSM 2G Only
03, Automatic
04, Automatic
05, GSM and UMTS Only
06, LTE Only
07, GSM, UMTS, LTE
2012-09-03 18:33:44 +02:00
Aleksander Morgado
80fa4cb312 sierra: use generic current capabilities loading
The generic current capabilities loading already has the required extra
AT+WS46=? query to see if LTE capabilities are available.
2012-09-02 16:20:12 +02:00
Dan Williams
61d41978c1 icera: fix parsing of IP config options
Some of the IP address items will be 0.0.0.0 depending on what the
other items are, like when the duplicate gateway is set on newer
devices, the first gateway address may be 0.0.0.0.  Since that's
not a valid IP address, just don't set that member of the config.

Second, the intent with the duplicate gateway is only to use that
when the first gateway was not given (ie, was 0.0.0.0) so fix the
check for that.
2012-08-31 10:41:57 -05:00
Aleksander Morgado
fa0ccc593e sierra: fix finding LTE capabilities 2012-08-31 16:41:38 +02:00
Dan Williams
63ef0990b6 sierra: allow users to help debug APP1 PPP capability
Most Sierra PPP-based devices are supposed to allow PPP on the
APP1 port, which has a dumb AT parser, leaving the main port
(with the intelligent AT parser) free for status and signal strength.
But out of all the devices I've tested it with (8775, 8781, AC881,
and C885), only the C885 actually works.  The rest (including three
different firmware versions for the 8775) either crash or disconnect
shortly after PPP starts.

To help figure out which devices actually support this, when
running MM in debug mode, users can set the MM_SIERRA_APP1_PPP_OK
environment variable and assume the APP1 port allows PPP.  This
is only for debugging purposes.
2012-08-31 15:11:30 +02:00
Aleksander Morgado
369e14f1d3 huawei: additional unsolicited messages to ignore 2012-08-31 15:11:30 +02:00
Aleksander Morgado
b4e0fa3d89 sierra: skip echo removal in the secondary port
This is the port to git master of the following commit:

commit d1be19d231a395339b1f452d1a30b73ea77ad528
Author: Dan Williams <dcbw@redhat.com>
Date:   Tue Aug 28 21:58:43 2012 -0500

    sierra: fix CSQ handling on APP1 port

    The APP1 port doesn't always prefix its replies with <CR><LF> which
    runs afoul of the built-in echo removal.  Since Sierra modems are on
    the whole well-behaved WRT echo removal, just disable it on the
    secondary ports.  Only changes behavior for PPP-based devices since
    they are the only ones that use the APP1 ports.
2012-08-31 15:11:30 +02:00
Aleksander Morgado
061e184d39 sierra: use DHCP for the USB 305 (AT&T Lightning)
This is the port to git master of the following commit:

commit 44f70121f75d59dbf31a4a9a1a4e87293e509e7a
Author: Dan Williams <dcbw@redhat.com>
Date:   Tue Aug 28 20:18:40 2012 -0500

    sierra: use DHCP for the USB 305 (AT&T Lightning)

    For some reason, my AT&T Lightning just doesn't work with static
    IP (AT%IPDPADDR) any more.  No traffic passes even though everything
    is set up the way it was before.  No idea what happened.  Using
    latest firmware 2.0.0.11.

    But what's interesting is on Windows the generic Sierra Watcher
    app uses DHCP.  But on Linux, when using AT%IPDPACT, DHCP doesn't
    work.  That's odd.  But it turns out the modem supports the
    "standard" Sierra proprietary AT!SCACT commands, and that
    *does* make DHCP work.  Crazy no?  So since the Windows app
    uses DHCP, it's likely that the non-DHCP case (AT%IPDPACT/AT%IPDPADDR)
    either isn't well tested or isn't well supported.  With that
    in mind, let's just use DHCP for this device in Linux too.
2012-08-31 15:11:30 +02:00
Aleksander Morgado
a195dabc93 icera: handle additional IPv4 configuration options
This is the port to git master of the following commit:

commit c8153b1ecdec1995258b114c90b575af1e721d3d
Author: Dan Williams <dcbw@redhat.com>
Date:   Tue Aug 28 12:16:26 2012 -0500

    icera: handle additional IPv4 configuration options

    Newer devices like the ZTE/Vodafone K3805-z have an enhanced
    %IPDPADDR command that includes a netmask and gateway, and
    these are necessary to configure the device since it uses /24
    instead of a /32.  Since the device is nice enough to tell
    us that, we should probably use that information.

    Unfortunately the MM API doens't expose the netmask and gateway
    yet, so we'll have to add a GetIP4ConfigEx() method or something
    like that, but this commit sets us up to do that.
2012-08-31 15:11:30 +02:00
Aleksander Morgado
ab7f558a2c zte: handle Icera-based devics that use DHCP
This is the port to git master of the following commit:

commit d2654a287c309346cc46b535dd974b0a5fc06fd4
Author: Dan Williams <dcbw@redhat.com>
Date:   Tue Aug 28 12:15:30 2012 -0500

    zte: handle Icera-based devics that use DHCP

    Since we can't autodetect that the devices use DHCP, we'll need to
    tag them with udev rules for the time being.
2012-08-31 13:21:35 +02:00
Aleksander Morgado
c6a1d91cd5 sierra: use an additional AT+WS46=? to detect LTE capabilities
Some Sierra modems (e.g. MC7710) will report LTE-specific supported modes in the
AT+WS46=? reply, but not +CLTE capability in the AT+GCAP reply:

AT+GCAP
 +GCAP: +CGSM
 OK

AT+WS46=?
 +WS46: (12,22,25,28,29)
 OK
2012-08-31 13:05:51 +02:00
Dan Williams
9d2a046754 mbm: add Ericsson H5321gw (often found in Thinkpad X230) 2012-08-31 10:11:05 +02:00
Aleksander Morgado
f53e53ba37 novatel: fix checking ERI for roaming/home decision
This is a port to git master of the following commit:

commit c21e29c50b5661308fb3b223c05f6942c06dc15d
Author: Dan Williams <dcbw@redhat.com>
Date:   Fri Aug 24 13:31:04 2012 -0500

    novatel: fix checking ERI for roaming/home decision

    More fallout from b22b2d99db
    which changed the return type of the qcdm_result_get_*() functions.
2012-08-31 10:04:37 +02:00
Aleksander Morgado
04d50e2db7 icera: retry configuring PDP context if it fails.
This is the port to git master of the following commit:

commit fb3187847b9c62d5205962c3c707ac1f44eaddcc
Author: Eric Shienbrood <ers@chromium.org>
Date:   Thu Aug 11 16:58:34 2011 -0400

    icera: retry configuring PDP context if it fails.

    If a connect operation is attempted immediately after a disconnect,
    it sometimes fails with CME error 583 - "a profile (CID) is currently
    active". Apparently, even though the preceding operation (%IPDPACT)
    to deactivate the PDP context returned an OK response, the context
    is not really completely available until a fraction of a second
    later. This causes the %IPDPCFG operation that is part of the
    subsequent connect attempt to fail with error 583. This change
    retries the %IPDPCFG after a one second delay.

    BUG=chrome-os-partner:4936
    TEST=This can be tested from the UI, but I found it easier to produce
    the timing needed to trigger the bug by running mm-disconnect and
    mm-connect from a shell.

    Start out with the modem in the connected state. In the shell, run

      sudo /usr/local/lib/flimflam/test/mm-disconnect; sudo /usr/local/lib/flimflam/test/mm-connect --number='*99#' --apn=wap.cingular

    modem-manager should emit the log line "Invalid error code: 583".
    Prior to this change, the connect operation would fail. Now it should
    succeed.

    Change-Id: I6ae0e6a9f5405b54b0b465fe91d9542529f365c2
    Reviewed-on: http://gerrit.chromium.org/gerrit/5781
    Tested-by: Eric Shienbrood <ers@chromium.org>
    Reviewed-by: Nathan J. Williams <njw@chromium.org>
2012-08-31 10:01:11 +02:00
Aleksander Morgado
a2c7cacb69 sierra: fix detection of APP1 port
This is the port to git master of the following commit:

commit e0242b4db7fb1556e79f6829d22edf411f9f6ba4
Author: Dan Williams <dcbw@redhat.com>
Date:   Thu Aug 23 21:14:38 2012 -0500

    sierra: fix detection of APP1 port

    The APP1 port (which has a limited AT parser) doesn't prefix
    its replies with <CR><LF> like nice modems do, and that means
    it runs afoul of the echo removal bits of the AT serial port
    code.  We need to parse the whole string even though it's not
    prefixed properly to find the APP1 string in the response.
2012-08-31 09:22:45 +02:00
Aleksander Morgado
6c94741e04 sierra: fix dialling context deallocation
We were using the slice allocator, not plain g_malloc().
2012-08-31 00:05:21 +02:00
Aleksander Morgado
6c1e005b54 hso: fix error handling in PIN retry counts 2012-08-30 23:47:30 +02:00
Aleksander Morgado
8be5ecf186 longcheer: fix error handling in PIN retry counts 2012-08-30 23:47:21 +02:00
Aleksander Morgado
b288b26718 icera: fix error handling in loading supported/current bands 2012-08-30 23:46:58 +02:00
Aleksander Morgado
ff1a175035 sierra: detect stupid secondary ports
Some sierra modems (e.g. MC7710) have a secondary port that likes to reply OK
to any AT command passed. Detect that as soon as possible, and don't consider
the Icera port probing result from that secondary port.
2012-08-30 22:46:56 +02:00
Aleksander Morgado
57f56f0f16 icera: fix error handling in PIN retry counts
GErrors need to be always NULL initialized.
2012-08-30 19:22:16 +02:00
Aleksander Morgado
35a69d6b8e huawei: enable QMI-powered Huawei modems 2012-08-30 14:18:03 +02:00
Aleksander Morgado
35bece0af3 sierra: enable QMI-powered Sierra modems 2012-08-30 14:17:51 +02:00