Commit Graph

821 Commits

Author SHA1 Message Date
Dan Williams
11db2ea380 sierra: fix CFUN power up delay handling
All Sierra devices appear to require short delay after powering up,
otherwise subsequent commands may return errors. Older devices need
longer so ensure new devices are penalized just for being new.

This is the port to git master of the following commit, for which we
don't need to do #2:

commit 814febe1fd9baacdb33c79f11c140187df36c4f1
Author: Dan Williams <dcbw@redhat.com>
Date:   Tue Oct 30 16:16:25 2012 -0500

    sierra: fix CFUN power up delay handling

    1) all Sierra devices appear to require short delay after powering up,
    otherwise subsequent commands may return errors.  Older devices need
    longer so ensure new devices are penalized just for being new.

    2) When the modem is already in full functionality status and no power
    up command was sent, there's no need to delay, which was happening
    regardless of what state the modem was already in.  Detect whether
    the power up was actually executed (response and error will be NULL)
    and only delay if it was executed.
2012-11-05 16:30:33 -06:00
Ben Chan
5a16f2aff1 novatel-lte: use $NWMDN to read own number when +CNUM fails
+CNUM may return ERROR when the modem fails to read the own numbers from
the SIM card or when the SIM card hasn't been activated. Use $NWMDN to
read the MDN as a fallback, which distinguishes these two cases.
2012-11-05 16:10:19 +01:00
Aleksander Morgado
9ec90d9a11 core,plugins: don't assume 'CS' supported when '2G' supported
We will not report 'CS' as a supported mode every time '2G' is supported. This
actually was forcing all plugins to handle a 'CS' fallback when they didn't have
CS-specific mode setup. So, to simplify things, we will only report 'CS' as
supported for those plugins which actually allow to select 'CS' mode (e.g. the
'wavecom' plugin).
2012-11-02 09:52:31 +01:00
Aleksander Morgado
96305bb5c1 iridium: report only 'CS' mode supported
Iridium modems only support circuit-switched connections, so just report that
one as supported.
2012-11-02 09:48:56 +01:00
Ben Chan
15f7a370d2 novatel-lte: increase the wait after SIM unlock to 3 seconds
After repeated stress tests on a few Novatel E362 modems and SIM cards,
it is revealed that a 3-second wait after SIM unlock is necessary for
reliably reading ICCID and IMSI through the SIM interface.
2012-11-02 08:19:47 +01:00
Dan Williams
189726de11 sierra: allow more time for PDP context activation
3 seconds isn't always enough to set up the context with the network.
2012-10-30 18:40:30 -05:00
Marius B. Kotsbak
26956924b0 sierra: avoid reset when setting cfun=1
Some Sierra modems trigger a reset of the modem when sending +cfun=1.
All sierra modems supports a second parameter to indicate that no
reset is to be done: "+cfun=1,0".
2012-10-30 12:53:25 -05:00
Aleksander Morgado
3c2bcb8d04 huawei: ignore '^STIN' unsolicited messages 2012-10-30 15:50:32 +01:00
Aleksander Morgado
6992e3b32d huawei: reset ignored unsolicited message handlers only once 2012-10-30 15:48:30 +01:00
Aleksander Morgado
96986117b3 option,hso: don't reset connection if cancelled, wait to get connected before
If we are requested to cancel the connection, we first need to wait for the
connection attempt to finish before issuing the disconnect command, as otherwise
the modem just returns an error saying that it cannot perform the operation and
at the end we end up with the modem connected but ModemManager thinking that it
isn't.
2012-10-30 15:35:33 +01:00
Aleksander Morgado
6297c4b4c8 icera: don't reset connection if cancelled, wait to get connected before
If we are requested to cancel the connection, we first need to wait for the
connection attempt to finish before issuing the disconnect command, as otherwise
the modem just returns an error saying that it cannot perform the operation and
at the end we end up with the modem connected but ModemManager thinking that it
isn't.

Tries to fix https://bugzilla.gnome.org/show_bug.cgi?id=685578
2012-10-30 15:35:33 +01:00
Aleksander Morgado
8e4d93c04e nokia,icera: setup custom AT probing as in the generic Nokia plugin 2012-10-22 14:03:43 +02:00
Aleksander Morgado
c900aa7c0b nokia: run vendor string probing, in order to grab Bluetooth DUN devices 2012-10-22 13:08:31 +02:00
Ben Chan
10a0ed12c4 novatel-lte: retry $NWQMISTATUS upon an unknown error during connecting
The $NWQMISTATUS command sometimes replies an ERROR shortly after
calling the $NWQMICONNECT command, but then replies the proper QMI
status if we retry it. This behavior is observed on an E362 modem with
4.08 firmware.

    (ttyUSB0): --> 'AT$NWQMICONNECT=,,,,,,"",,,"",""<CR>'
    (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
    (ttyUSB0): --> 'AT$NWQMISTATUS<CR>'
    (ttyUSB0): <-- '<CR><LF>ERROR<CR><LF>'
    Got failure code 100: Unknown error
    QMI connection status failed: Unknown error
2012-10-22 10:46:57 +02:00
Ben Chan
8362171973 novatel-lte: handle $NWQMISTATUS responses for firmware 4.08
In firmware 4.08, the $NWQMISTATUS command returns different values for
QMI state to indicate the current connection state. This patch modifies
the code to handle $NWQMISTATUS responses in firmware 1.41 and 4.08.
2012-10-22 10:46:57 +02:00
Ben Chan
64a11ceec7 icera: parse HSPA+ access technology in %NWSTATE response 2012-10-16 11:39:39 +02:00
Aleksander Morgado
6223f61803 Revert "icera: improve parsing of access technologies in %NWSTATE response"
This reverts commit e2f3034f6e.

The report of current access technologies is supposed to give which is the
*current* access technology being active. We allow reporting more than one for
the cases where several access technologies are given simultaneously (e.g.
cdma1x + evdo + lte). For example, we shouldn't be giving 4 different
technologies like "umts, hsdpa, hsupa, hspa" when the modem reports
"3G-HSDPA-HSUPA". Just giving HSPA in that case is enough and more accurate.
2012-10-16 11:34:36 +02:00
Ben Chan
e2f3034f6e icera: improve parsing of access technologies in %NWSTATE response 2012-10-16 09:40:59 +02:00
Aleksander Morgado
4f55511680 pantech: wait up to 5s after SIM unlock before sending new commands
Or the modem will get stuck completely.
2012-10-15 13:34:51 +02:00
Aleksander Morgado
5c8ef351bb pantech: create a Pantech-specific SIM object
We'll just skip most SIM info retrieval commands based on AT+CRSM, as they seem
to be unsupported.
2012-10-15 13:34:16 +02:00
David Härdeman
529b031a01 Add udev rules for HP (Ericsson) hs2350 Mobile Broadband Module
This WWAN module came installed in my new HP EliteBook 8570p Laptop.
The patch is generated against the master branch but the same udev
rule should be useful in the 0.5 and 0.6 branches as well.

Signed-off-by: David Härdeman <david@hardeman.nu>
2012-10-14 17:03:38 +02:00
Aleksander Morgado
fa76ca95a7 via: new 'Via CBP7' plugin
This is the port to git master of the following commit:

commit ff8c60641aa2ea41080c15f81f633b3f78e07bf8
Author: Dan Williams <dcbw@redhat.com>
Date:   Mon Sep 10 17:12:38 2012 -0500

    via: new plugin for CBP7-based CDMA and EVDO devices (bgo #683525)

    The Via baseband is used in a number of CDMA/EVDO devices, from
    ChinaTelecom USB sticks, to the Fusion Wireless/UBlox 2770p, to
    various Motorola Android phones.
2012-10-09 16:42:40 +02:00
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