Commit Graph

5661 Commits

Author SHA1 Message Date
Lionel Landwerlin
b330752432 plugins: add missing linker flags
https://bugzilla.gnome.org/show_bug.cgi?id=704481
2013-09-19 11:25:41 +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
Ben Chan
aa74ea1aa6 iface-modem: fix MODEM_STATE_IS_INTERMEDIATE macro 2013-09-18 08:40:04 +02:00
Ben Chan
1eee8824fd altair-lte: use mm_base_modem_at_command_full{,_finish} correctly
This patch fixes own_enable_unsolicited_events_ready() to use
mm_base_modem_at_command_full_finish(), instead of
mm_base_modem_at_sequence_full_finish(), as the %STATCM=1 command is
issued via mm_base_modem_at_command_full().
2013-09-17 08:57:32 +02:00
Ben Chan
9aced8311b huawei: ignore ^CONNECT unsolicited messages 2013-09-17 08:55:50 +02:00
Dan Williams
0755beff07 mtk: update udev rules to always match both VID/PID together
See commit c79d266e62.

    If the rules to tag specific USB interface numbers only apply on the PID, we'll
    end up seeing that if the port has a parent with another PID, and that other
    PID also has a rule, port will get tagged multiple times.
2013-09-16 11:54:16 -05:00
Dan Williams
872bd3e837 mtk: add D-Link DWM-156 udev rules
For HW version A5 and possibly later, which are based on MediaTek
chipsets instead of Qualcomm ones.
2013-09-16 11:54:16 -05:00
Quentin.Li
c22eca999b mtk: add plugin for various MediaTek devices
Signed-off-by: Quentin.Li <snowmanli88@gmail.com>
2013-09-16 11:53:58 -05:00
Ben Chan
5d8efff291 iface-modem: free GError when interface initialization is cancelled
This patch fixes an assertion failure 'ctx->fatal_error == NULL' in
initialization_context_complete_and_free(), which happens if
'fatal_error' of the initialization context is set during the modem
interface initialization and the initialization is later cancelled.
2013-09-16 07:51:53 +02:00
Ben Chan
8a857b7b26 broadband-modem: use InProgress instead of WrongState when appropriate
This patch changes MMBroadbandModem to report an
org.freedesktop.ModemManager1.Error.Core.InProgress error, instead of an
org.freedesktop.ModemManager1.Error.Core.WrongState error, when one
tries to initialize a modem that is already being initialized, or to
enable a modem that is already being enabled.
2013-09-13 11:00:07 +02:00
Bjørn Mork
e446037aa7 mbm: add another H5321gw ID
This device ID is used in a Lenovo Thinkpad T430.

Link: http://bugs.debian.org/705942
Reported-by: Etienne Bagnoud <etienne.bagnoud@irovision.ch>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2013-09-11 22:16:42 +02:00
Aleksander Morgado
e755181fd5 broadband-modem: only used CIND? for signal quality if actually reported
The Huawei MU736 supports CIND? but not for signal quality reporting:

AT+CIND=?
   +CIND : ("call",(0,1)), ("message",(0,1)), ("roam",(0,1))
   OK

AT+CIND?
   +CIND:0,0,0
   OK

Which ended up with the following during execution:

ModemManager[3044]: (ttyUSB1) Could not parse CIND signal quality results;
                              signal index (255) outside received range (0-3)

Just avoid this, and make CIND? be used for signal quality retrieval only if
(1) CIND? is actually supported and (2) CIND? reports signal quality
information.
2013-09-11 17:08:27 +02:00
Aleksander Morgado
0ff4da71e3 error-helpers: don't warn when unknown errors are found
Just add the messages with debug level, so that they don't get reported at
syslog. Having this kind of warnings in syslog is not useful, specially because
we wouldn't know which was the specific command that issued the warning. Errors
due to critical issues will anyway be reported in syslog in some way or another.
2013-09-11 17:00:43 +02:00
Aleksander Morgado
4f451cf767 qmi-port: use the new qmi-proxy if available 2013-09-10 18:47:35 +02:00
Colin Walters
f7776a3784 libmm-glib: don't include internal header from public header
This broke gnome-control-center in gnome-ostree.  It should be
included in the C file where stuff from the private header is
actually used.
2013-09-10 11:15:18 -05:00
Aleksander Morgado
0d96662a0a sim-huawei: fix refcount
g_async_result_get_source_object() returns a full reference, which needs to get
unref-ed when no longer used.
2013-09-10 09:47:50 +02:00
Dan Williams
73978cbe6f sim-huawei: add SIM class to handle ICCID request
Use AT^ICCID if possible to read the ICCID.
2013-09-10 09:42:37 +02:00
Dan Williams
11a7e3dfdf core: add helper for parsing and validating the ICCID 2013-09-10 09:42:36 +02:00
Aleksander Morgado
ac343d390b iface-modem-oma: fix OMA session state reporting
Reported by Arman Uguray <armansito@google.com>
2013-09-09 10:20:42 +02:00
Aleksander Morgado
cf78c385d6 libmm-glib: fix return type
Reported by Arman Uguray <armansito@google.com>
2013-09-09 10:20:42 +02:00
Aleksander Morgado
7751f2d6ed mmcli,oma: support for the new OMA interface 2013-09-09 10:20:40 +02:00
Aleksander Morgado
03dc346add broadband-modem-qmi: implement OMA CancelSession() 2013-09-09 10:19:21 +02:00
Aleksander Morgado
76835446eb iface-modem-oma: ensure the session id is known when accepting/rejecting it 2013-09-09 10:19:20 +02:00
Aleksander Morgado
3ba2fee6fc broadband-modem-qmi: never add UNKNOWN OMA session types to the pending list 2013-09-09 10:19:20 +02:00
Aleksander Morgado
461d75dae9 broadband-modem-qmi: implement OMA AcceptNetworkInitiatedSession() 2013-09-09 10:19:20 +02:00
Aleksander Morgado
0c7def2f34 broadband-modem-qmi: implement OMA StartClientInitiatedSession() 2013-09-09 10:19:20 +02:00
Aleksander Morgado
72be4f1d57 broadband-modem-qmi: implement OMA Setup() 2013-09-09 10:19:20 +02:00
Aleksander Morgado
959c7b9cde broadband-modem-qmi: implement OMA feature loading 2013-09-09 10:19:20 +02:00
Aleksander Morgado
e6a7c85661 broadband-modem-qmi: handle OMA indications 2013-09-09 10:19:20 +02:00
Aleksander Morgado
df47f1ac8f broadband-modem-qmi: check support for OMA capabilities 2013-09-09 10:19:18 +02:00
Aleksander Morgado
d37b21e116 iface-modem-oma: new object interface to handle the OMA DBus interface 2013-09-09 10:18:23 +02:00
Aleksander Morgado
8ab38ae968 libmm-glib: support for the 'OMA' interface 2013-09-09 10:15:18 +02:00
Aleksander Morgado
32de7d6fef introspection,api: new 'Oma' interface 2013-09-09 10:12:55 +02:00
Dan Williams
b8e8c2a56d telit: install udev rules 2013-09-06 21:36:01 -05:00
Aleksander Morgado
0c618274e8 build: require libqmi 1.6.0
We were already requiring some features from 1.5.0 (dev version), so depend
on the stable 1.6.0 now that it's out.
2013-09-05 15:32:54 +02:00
Aleksander Morgado
2968859525 huawei: check NDISDUP support in the port once
Don't query udev for the tag every time we recreate a bearer, just do it once.
For some reason, re-querying the same tag after the first time doesn't always
return the proper result.
2013-09-05 07:37:27 +02:00
Ben Chan
5120290705 huawei: fix uninitialized variable issues
This patch fixes the following uninitialized variable issues, which was
introduced in the previous commit "huawei: retry connect/disconnect attempt
upon ^NDISSTATQRY? failures" (commit 57c657bd06).

huawei/mm-broadband-bearer-huawei.c:127:9: error: variable 'ipv4_available' is used uninitialized whenever '||' condition is true
      [-Werror,-Wsometimes-uninitialized]
    if (!response ||
        ^~~~~~~~~
huawei/mm-broadband-bearer-huawei.c:141:9: note: uninitialized use occurs here
    if (ipv4_available && ipv4_connected) {
        ^~~~~~~~~~~~~~
huawei/mm-broadband-bearer-huawei.c:127:9: note: remove the '||' if its condition is always false
    if (!response ||
        ^~~~~~~~~~~~
huawei/mm-broadband-bearer-huawei.c:115:28: note: initialize the variable 'ipv4_available' to silence this warning
    gboolean ipv4_available;
                           ^
                            = 0
huawei/mm-broadband-bearer-huawei.c:484:9: error: variable 'ipv4_available' is used uninitialized whenever '||' condition is true
      [-Werror,-Wsometimes-uninitialized]
    if (!response ||
        ^~~~~~~~~
huawei/mm-broadband-bearer-huawei.c:498:9: note: uninitialized use occurs here
    if (ipv4_available && !ipv4_connected) {
        ^~~~~~~~~~~~~~
huawei/mm-broadband-bearer-huawei.c:484:9: note: remove the '||' if its condition is always false
    if (!response ||
        ^~~~~~~~~~~~
huawei/mm-broadband-bearer-huawei.c:472:28: note: initialize the variable 'ipv4_available' to silence this warning
    gboolean ipv4_available;
                           ^
                            = 0
2013-09-05 07:34:39 +02:00
Prathmesh Prabhu
57c657bd06 huawei: retry connect/disconnect attempt upon ^NDISSTATQRY? failures
The Huawei MU736 modem sometimes responds to the ^NDISSTATQRY? query with a
'+CME ERROR: 100' error. This patch works around the issue by ignoring a few
of these error responses in a connect / disconnect attempt. The overall timeout
for the connect/disconnect operation is not affected by this change.
2013-09-04 09:05:19 +02:00
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
60e1ac6919 iface-modem: allow reset and factory reset operation in every state 2013-09-02 09:03:53 +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
0f2a0aa0bc at-serial-port: allow enabling/disabling unsolicited message handlers
This patch adds an 'enable' flag in MMAtUnsolicitedMsgHandler and
mm_at_serial_port_enable_disable_unsolicited_msg_handler() to allow
enabling and disabling of unsolicited message handlers. The enable flag
is set to TRUE by mm_at_serial_port_add_unsolicited_msg_handler().
2013-08-26 15:59:29 +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
7e9ae21550 broadband-modem-qmi: avoid processing invalid TLVs in GetSignalStrength response
E.g. in the GetSignalStrength output we get EV-DO-only TLVs, even if EV-DO is
not the current access technology, what ends up generating the following:

$ sudo mmcli -m 0 --signal-get

/org/freedesktop/ModemManager1/Modem/0
  -------------------------
  Refresh rate: '5' seconds
  -------------------------
  EV-DO  | RSSI: '0.00' dBm
         | EcIo: '0.00' dBm
         | SINR: '9.00' dBm
         |   Io: '-106.00' dB
  -------------------------
  UMTS   | RSSI: '94.00' dBm
         | EcIo: '-6.00' dBm

Instead, we will now assume that the RSSI list always contains the valid access
technologies being reported, and use that list to decide whether we process some
of the per-technology TLVs. We now end up getting:

$ sudo mmcli -m 0 --signal-get

/org/freedesktop/ModemManager1/Modem/0
  -------------------------
  Refresh rate: '5' seconds
  -------------------------
  UMTS   | RSSI: '94.00' dBm
         | EcIo: '-8.00' dBm
2013-08-21 13:29:50 +02:00
Aleksander Morgado
75aa4a0df7 libmm-glib,time: fix gtk-doc comments 2013-08-21 12:57:05 +02:00