Commit Graph

20 Commits

Author SHA1 Message Date
Ben Chan
31655bb5a5 glib: remove invocations of g_type_init()
g_type_init() has been deprecated (and also marked with the attribute
'deprecated') since glib 2.36 as the type system is automatically
initialized. Since the minimum version of glib required by ModemManager
is 2.36, calling g_type_init() isn't necessarily in the ModemManager
code.
2017-02-03 10:05:14 +01:00
Dan Williams
14ccde2b5f huawei: handle some weird SYSCFG acquisition orders
<debug> (ttyUSB2): --> 'AT^SYSCFG?<CR>'
<debug> (ttyUSB2): <-- '<CR><LF>^SYSCFG:14,2,400380,1,2<CR><LF><CR><LF>OK<CR><LF>'
<warn>  couldn't load current allowed/preferred modes: 'No SYSCFG combination found matching the current one (14,2)'

14,2 means "WCDMA-only; acquire WCDMA then GSM" which is somewhat
non-sensical. The supported modes parsing doesn't generate this
combination because it doesn't really make sense, so current mode
matching failed. Just fix up the non-sensical acquisition order
to 0 (automatic).
2016-10-05 09:14:44 -05:00
Dan Williams
03a6d969ab broadband-modem-huawei: implement Modem.Signal extended signal info interface
Implement the detailed signal info interface for some Huawei 3GPP modems
including those based on HiSilicon chipsets like the E3276.  Known not to
work on many Qualcomm-based Huawei modems like E392, E397, and E367 as
they don't support the ^HCSQ command, but they do support QMI and so
have access to the extended signal interface via QMI.
2016-08-31 09:43:32 -05:00
Dan Williams
a9b69d210d huawei: use AT^DHCP response if available for NDISDUP-capable devices
For non-QMI/non-MBIM Huawei devices that use HiSense chipsets,
the recommended way to create the connection is to use NDISDUP
and either DHCP on the net interface, or the ^DHCP command.
There are some reports of devices that connect successfully, but
don't respond to DHCP requests on the interface.  Try to get
IP addressing info from the device via ^DHCP and fall back to
telling clients to use actual DHCP if that fails.

https://bugzilla.redhat.com/show_bug.cgi?id=1254886
2016-03-13 13:25:19 +01:00
Aleksander Morgado
8009f16ecb huawei: allow responses like ^NDISSTATQry (e.g. Huawei E353) 2015-03-29 12:48:44 +02:00
Yunlian Jiang
977cf658a6 tests: fix memory leaks 2015-03-27 20:31:24 +01:00
David McCullough
bd0ffd24f1 huawei: improve support for network time on Huawei modules
Third revision of Huawei nwtime support.  Takes on feedback from the
mailing list including helpers,  some basic tests and use of the ^NTCT
command to determine network time support (^NWTIME).  Expanded test cases,
more use of g_assert and more logical helper return values/errors.

Signed-off-by: David McCullough <david.mccullough@accelecon.com>
2014-08-11 18:31:46 +02:00
Aleksander Morgado
fc42b2df8c huawei: handle empty response to AT^SYSCFG=?
Some Huawei modems (e.g. E220) may give an empty response for AT^SYSCFG=?, even
if they do support the command. Handle this case by prividing a default fallback
format string when this happens.
2013-12-09 23:07:19 +01:00
Aleksander Morgado
02839b2e44 huawei: new ^SYSCFGEX? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado
9ac136028b huawei: new ^SYSCFG? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado
4e5c35a69f huawei: new ^PREFMODE? response parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado
47640a6507 huawei: new ^SYSCFGEX=? test parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado
677dd7da91 huawei: new ^SYSCFG=? test parser 2013-12-09 23:07:19 +01:00
Aleksander Morgado
ceb578a824 huawei: new ^PREFMODE=? test parser 2013-12-09 23:07:18 +01:00
Aleksander Morgado
0dcf609dcc huawei,tests: enable log traces in the tests 2013-12-09 23:07:18 +01:00
Ben Chan
18053540ea huawei: handle unquoted strings in ^SYSINFOEX response
The original sysinfoex_parse() in MMBroadbandModemHuawei does not handle
unquoted <sysmode_name> and <submode_name> fields in ^SYSINFOEX responses,
which are sen on some Huawei modems (e.g. E303). This patch moves the
^SYSINFOEX parsing code to mm-modem-helpers-huawei.c, fixes the regex for
handling unquoted strings in ^SYSINFOEX responses, and adds unit tests.
2013-10-20 17:01:59 +02:00
Ben Chan
49d4163a2b huawei: fix ^SYSINFO parsing
The original sysinfo_parse() in MMBroadbandModemHuawei incorrectly sets
'out_sys_submode_valid' to TRUE even when <sys_submode> is not present
in a ^SYSINFO response. This patch moves the code to
mm-modem-helpers-huawei.c, fixes the regex for parsing ^SYSINFO
responses, and adds unit tests.
2013-10-20 17:01:51 +02:00
Ben Chan
2b20264215 huawei: handle disconnection via ^NDISSTAT unsolicited message
This patch changes MMBroadbandModemHuawei to use ^NDISSTAT unsolicited
messages to handle network-initiated disconnection. As a ^NDISSTAT
unsolicited message is similar to a ^NDISSTATQRY response, the patch
extends the ^NDISSTATQRY parser code to handle both ^NDISSTAT and
^NDISSTATQRY responses.
2013-09-18 11:37:19 +02: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
Aleksander Morgado
8d0ec0fc24 huawei: new helper to parse ^NDISSTATQRY responses 2013-07-11 09:39:21 +02:00