Commit Graph

5661 Commits

Author SHA1 Message Date
Ben Chan
c28ff0d547 modem-helpers: recognize "3G" as UMTS access technology
Some modems (e.g. ZTE MF190) report UMTS access technology as "3G":

  --> 'AT+ZPAS?<CR>'
  <-- '<CR><LF>+ZPAS: "3G","CS_PS"<CR><LF><CR><LF>OK<CR><LF>'
2014-01-29 10:15:17 -06:00
Guido Günther
c5cfa2cad1 broadband-modem-qmi: Fix compilation error due to removed variable
otherwise we fail with:

CC       ModemManager-mm-broadband-modem-qmi.o
mm-broadband-modem-qmi.c: In function ‘process_gsm_info’:
mm-broadband-modem-qmi.c:4182:18: error: ‘egprs_support_valid’ undeclared (first use in this function)
                 &egprs_support_valid,  &egprs_support,
                  ^
mm-broadband-modem-qmi.c:4182:18: note: each undeclared identifier is reported only once for each function it appears in
mm-broadband-modem-qmi.c:4182:40: error: ‘egprs_support’ undeclared (first use in this function)
                 &egprs_support_valid,  &egprs_support,
2014-01-26 20:05:50 +01:00
Guido Günther
3c2800f02e broadband-modem-qmi: Fix compilation error due to variable type change
otherwise we fail with:

CC       ModemManager-mm-broadband-modem-qmi.o
mm-broadband-modem-qmi.c: In function ‘get_signal_info_ready’:
mm-broadband-modem-qmi.c:2309:5: error: passing argument 3 of ‘signal_info_get_quality’ from incompatible pointer type [-Werror]
     if (!signal_info_get_quality (ctx->self, output, &quality)) {
     ^
mm-broadband-modem-qmi.c:2236:1: note: expected ‘gint8 *’ but argument is of type ‘guint *’
 signal_info_get_quality (MMBroadbandModemQmi *self,
 ^
cc1: all warnings being treated as errors
2014-01-26 20:05:31 +01:00
Guido Günther
983c197c6b broadband-modem-qmi: Fix compilation error due to variable name change
otherwise we fail with:

CC       ModemManager-mm-broadband-modem-qmi.o
mm-broadband-modem-qmi.c: In function ‘modem_load_current_bands’:
mm-broadband-modem-qmi.c:1881:35: error: ‘ctx’ undeclared (first use in this function)
     if (qmi_client_check_version (ctx->client, 1, 19)) {
                                   ^
mm-broadband-modem-qmi.c:1881:35: note: each undeclared identifier is reported only once for each function it appears in
2014-01-26 20:05:01 +01:00
Aleksander Morgado
fdba981f8e huawei: fix leaked string 2014-01-26 19:56:58 +01:00
Aleksander Morgado
48585c250b udev: apply udev rules upon 'move' events as well
Otherwise, we may end up losing the tags we expect if the device gets a 'move'
event just after the initial 'add'.
2014-01-26 19:33:45 +01:00
Aleksander Morgado
b7adbf97a5 port-probe: the 'buffer-full' signal is only used during AT probing
Make sure we cleanup the 'buffer-full' signal handler when moving from AT
probing to QCDM probing, so that we don't try to remove a signal handler from
a QCDM port in which we haven't set it.

E.g. avoids:

ModemManager[1493]: <debug> [1390731359.108502] [mm-port-probe.c:239] mm_port_probe_set_result_qcdm(): (tty/ttyHS2) port is QCDM-capable

(ModemManager:1493): GLib-GObject-WARNING **: gsignal.c:2585: instance '0x7431b0' has no handler with id '16'
2014-01-26 11:25:06 +01:00
Aleksander Morgado
72d83898da huawei: fix some leaked 'GStrv' arrays 2014-01-26 11:01:42 +01:00
Aleksander Morgado
0cfc825e11 huawei: fix leaked 'GUdevDevice' 2014-01-26 10:55:43 +01:00
Aleksander Morgado
a282237ae5 port-probe: buffer_full_id is a signal handler, not a GSource 2014-01-25 20:56:01 +01:00
Aleksander Morgado
93108fdb60 novatel: fix leaked 'GSimpleAsyncResult' 2014-01-25 20:45:34 +01:00
Aleksander Morgado
95249239a2 sierra: fix leaked 'GStrv' with CDMA modems 2014-01-25 20:01:32 +01:00
Aleksander Morgado
529e94b039 broadband-modem: fix leaked 'QcdmResult' 2014-01-25 19:34:57 +01:00
Aleksander Morgado
561c8b715e bearer-mbim: fix leaked 'MMBearerIpConfig' objects 2014-01-24 21:26:46 +01:00
Aleksander Morgado
ae86ce1cbb bearer-mbim: fix leaked 'MMBearerProperties' 2014-01-24 21:10:28 +01:00
Aleksander Morgado
1547be5181 bearer-mbim: fix several leaked 'MbimMessage' objects
mbim_device_command_finish() returns always a new reference to the response.
2014-01-24 21:09:10 +01:00
Aleksander Morgado
26793e10d6 release: update NEWS 2014-01-24 19:15:46 +01:00
Aleksander Morgado
3914808120 zte: support for QMI-based modems
E.g. the ZTE MF190

[/dev/cdc-wdm1] QMI Device supports 4 services:
[/dev/cdc-wdm1]    ctl (1.2)
[/dev/cdc-wdm1]    wds (1.3)
[/dev/cdc-wdm1]    dms (1.2)
[/dev/cdc-wdm1]    nas (1.0)
2014-01-24 18:35:40 +01:00
Aleksander Morgado
19b0a7e28f altair-lte: add 'mm' prefix in the exported helper methods 2014-01-18 14:16:59 +01:00
Thieu Le
87f0f808bf altair-lte: set subscription state using PCO
This patch sets the subscription state using Verizon's PCO values.
2014-01-18 14:08:31 +01:00
Aleksander Morgado
afabde0f2c build: fix linker flags when building plugins
MM_LIBS was missing in PLUGIN_COMMON_LINKER_FLAGS, and replace GUDEV_LDFLAGS
with GUDEV_LIBS.
2014-01-17 11:58:18 +01:00
Mario Blättermann
22eb8816f1 po: add German translation 2014-01-13 18:01:21 +01:00
Ben Chan
5c00736f44 iface-modem,sim: make SIM interface initialization cancellable 2014-01-11 23:33:35 +01:00
Ben Chan
50f3f41c3a huawei: avoid creating Connect3gppContext when no data port is available
This patch modifies MMBroadbandBearerHuawei such that connect_3gpp
simply reports an error via g_simple_async_report_error_in_idle, without
creating a Connect3gppContext, if no data port is available.
2014-01-09 13:12:26 +01:00
Ben Chan
fd1a1839ae serial-port: fail open/reopen after a serial port has been forced close
After a MMSerialPort object is forced close, it may be opened again if some
other object still holds a reference to it. When the MMSerialPort object is
eventually disposed, mm_serial_port_close_force is invoked on the object but
does nothing as 'priv->forced_close' is already set to TRUE. 'priv->watch_id'
is still active, which could potentially lead to a crash if data_available is
called after the MMSerialPort object is finalized. This patch prevents such a
scenario by failing mm_serial_port_open / mm_serial_port_reopen after the
MMSerialPort has been forced close.
2014-01-09 13:10:07 +01:00
Ben Chan
910a55a0f2 novatel-lte: remove unused macro definitions 2014-01-08 10:09:06 +01:00
Ben Chan
76d52c2df3 huawei: avoid calling g_object_unref on NULL
This patch prevents connect_3gpp_context_complete_and_free from calling
'g_object_unref (ctx->data)' when connect_3gpp finds no data port (i.e.
ctx->data is set to NULL).
2014-01-08 10:09:06 +01:00
Yegor Yefremov
84bdcb04ed trivial: resolve maybe-uninitialized warnings
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2014-01-07 09:40:05 -06:00
Ben Chan
1601069e50 novatel-lte: explicitly use primary port for connection/disconnection sequence
The Novatel LTE modem only uses its primary AT port for AT commands.
Instead of referencing any existing secondary port, this patch changes
MMBroadbandBearerNovatelLte to explicitly use the primary port during the
connection and disconnection sequence.
2014-01-07 08:53:59 +01:00
Ben Chan
6c1c0d5e2b altair-lte: explicitly use primary port for connection/disconnection sequence
The Altair LTE modem only uses its primary AT port for AT commands.
Instead of referencing any existing secondary port, this patch changes
MMBroadbandBearerAltairLte to explicitly use the primary port during the
connection and disconnection sequence.
2014-01-07 08:53:10 +01:00
Ben Chan
22b0de736b huawei: handle ^NDISSTAT disconnected notification only on a connected bearer
If the bearer is not actually connected and the modem (inappropriately)
indicates a disconnected status via a ^NDISSTAT unsolicited message, it
could potentially lead to the following assertion in
connect_3gpp_context_step. This patch addresses such an issue.

    g_assert (ctx->self->priv->network_disconnect_pending_id == 0);

0x7f940c2ecd95   [libc-2.15.so]            - raise.c:64                         raise
0x7f940c2ee217   [libc-2.15.so]            - abort.c:91                         abort
0x7f940c8e6086   [libglib-2.0.so.0.3400.3] - gtestutils.c:1877                  g_assertion_message
0x7f940c8e6553   [libglib-2.0.so.0.3400.3] - gtestutils.c:1888                  g_assertion_message_expr
0x7f940cba5710   [libmm-plugin-huawei.so]  - mm-broadband-bearer-huawei.c:240   connect_3gpp_context_step
0x7f940cd4a51e   [ModemManager]            - mm-broadband-bearer.c:1246         connect
0x7f940cd662b7   [ModemManager]            - mm-iface-modem-simple.c:588        connection_step
0x7f940cd66e6e   [ModemManager]            - mm-iface-modem-simple.c:267        register_in_3gpp_or_cdma_network_ready
0x7f940ca0e296   [libgio-2.0.so.0.3400.3]  - gsimpleasyncresult.c:775           g_simple_async_result_complete
0x7f940ca0e398   [libgio-2.0.so.0.3400.3]  - gsimpleasyncresult.c:787           complete_in_idle_cb
0x7f940c8c2ff4   [libglib-2.0.so.0.3400.3] - gmain.c:2715                       g_main_context_dispatch
0x7f940c8c3377   [libglib-2.0.so.0.3400.3] - gmain.c:3290                       g_main_context_iterate
0x7f940c8c37c9   [libglib-2.0.so.0.3400.3] - gmain.c:3484                       g_main_loop_run
0x7f940cd3b425   [ModemManager]            - main.c:142                         main
0x7f940c2d9464   [libc-2.15.so]            - libc-start.c:234                   __libc_start_main
0x7f940cd3afa8   [ModemManager]            + 0x0001efa8
2014-01-06 18:23:58 -06:00
Ben Chan
2a946bd72c novatel-lte: remove unnecessary MM_BASE_MODEM() casts 2014-01-06 18:06:09 -06:00
Jens Seidel
885a453dad mbm: add another C5621 ID
This device ID is used in a Lenovo Helix.
2014-01-03 11:31:58 -06:00
Aleksander Morgado
0ddbbaab17 sms-mbim: increase timeout when sending SMS part to 30s
Aligned to the value used also in QMI, and likely a much better value than the
original 10s.

See:
  http://lists.freedesktop.org/archives/libmbim-devel/2013-December/000079.html
2014-01-03 12:38:01 +01:00
Ben Chan
496f298832 altair-lte: remove unnecessary MM_BASE_MODEM() casts 2014-01-03 12:30:02 +01:00
Ben Chan
dac652321b altair-lte: refactor code for handling 'data' in DetailedConnectContext 2014-01-03 12:30:00 +01:00
Ben Chan
cddc4af7bd huawei: report an error when ^PREFMODE reports no valid values
This patch fixes mm_huawei_parse_prefmode_test to always report an error when
returning NULL, which avoid a potential crash when the caller tries to access
the error.
2014-01-03 12:20:33 +01:00
Aleksander Morgado
52d34ce0db bearer-mbim: parse replies on failure
Based on a patch from: Bjørn Mork <bjorn@mork.no>

Some messages provide an additional NwError cause code from
the network in case of failure. This means that we need to
parse the reply even if the status indicates failure, to be
able to return the exact failure cause.
2013-12-19 18:43:14 +01:00
Ben Chan
ab12d17bfb iface-modem: fix crash in wait_for_final_state_context_complete_and_free
When wait_for_final_state_context_complete_and_free is invoked, if the callback
associated with the GSimpleAsyncResult object of the WaitForFinalStateContext
object updates the modem state via mm_iface_modem_update_state, state_changed
is invoked, which causes wait_for_final_state_context_complete_and_free to be
invoked again on the same WaitForFinalStateContext object. That leads to the
following crash, which is observed sometimes when a modem is being disabled.

Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )

0x7fcb7728f202   [libgobject-2.0.so.0.3400.3] - gobject.c:2916              g_object_unref
0x7fcb7743205c   [ModemManager]               - mm-broadband-modem.c:8034   disabling_context_complete_and_free
0x7fcb77434d64   [ModemManager]               - mm-broadband-modem.c:8130   disabling_wait_for_final_state_ready
0x7fcb770c0b86   [libgio-2.0.so.0.3400.3]     - gsimpleasyncresult.c:775    g_simple_async_result_complete
0x7fcb7740cdbc   [ModemManager]               - mm-iface-modem.c:101]       wait_for_final_state_context_complete_and_free
0x7fcb7740ce19   [ModemManager]               - mm-iface-modem.c:128]       state_changed_wait_expired
0x7fcb76f78c33   [libglib-2.0.so.0.3400.3]    - gmain.c:4026]               g_timeout_dispatch
0x7fcb76f78087   [libglib-2.0.so.0.3400.3]    - gmain.c:2715]               g_main_context_dispatch
0x7fcb76f78437   [libglib-2.0.so.0.3400.3]    - gmain.c:3290]               g_main_context_iterate
0x7fcb76f78891   [libglib-2.0.so.0.3400.3]    - gmain.c:3484]               g_main_loop_run
0x7fcb773f4d55   [ModemManager]               - main.c:142]                 main
0x7fcb7698a9c6   [libc-2.15.so]               - libc-start.c:234]           __libc_start_main
0x7fcb773f48b8   [ModemManager]               + 0x000218b8]
2013-12-17 01:37:13 +01:00
Aleksander Morgado
004924b038 broadband-modem-qmi: fix segfault when using AT-fallback mode for messaging
The default broadband modem implementation doesn't have a method to disable
unsolicited messages for SMS.
2013-12-16 12:37:20 +01:00
Aleksander Morgado
5b078edc21 release: bump version to 1.1.900 (1.2-rc1)
Also bump soname of libmm-glib, as the interface has grown since the last tag.
2013-12-10 14:27:35 +01:00
Ben Chan
5aa2f11535 sim-mbim: prevent potential leak when loading SIM idenitifier and IMSI
This patch addresses a potential memory leak when load_sim_identifier or
load_imsi in MMSimMbim is called but the caller does not provide a
GAsyncReadyCallback.
2013-12-10 10:28:06 +01:00
Ben Chan
4c213d460e broadband-modem-mbim: prevent potential leak when scanning networks
This patch addresses a potential memory leak when scan_networks in
MMBroadbandModemMbim is called but the caller does not provide a
GAsyncReadyCallback.

Reported by Aleksander Morgado <aleksander@lanedo.com>
2013-12-10 10:26:57 +01:00
Ben Chan
ebadb6786a sim-mbim: prevent potential leak when loading operator idenitifier and name
This patch addresses a potential memory leak when
load_operator_identifier or load_operator_name in MMSimMbim is called
but the caller does not provide a GAsyncReadyCallback.

Reported by Aleksander Morgado <aleksander@lanedo.com>
2013-12-10 10:24:52 +01: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
e81fdd07c3 huawei: new current mode setting based on the supported combinations 2013-12-09 23:07:19 +01:00
Aleksander Morgado
c337f52e30 huawei: new current mode loading based on the supported combinations 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