Commit Graph
2258 Commits
Author SHA1 Message Date
Aleksander Morgado b28230411a port-serial: always set the forced_close flag if forced to close 2014-02-13 13:41:06 +01:00
Aleksander Morgado 0d0f5de161 base-modem: allow looking for a subset of the available ports 2014-02-13 13:41:03 +01:00
Aleksander Morgado 2b46f65879 base-modem: allow grabbing non-tty AT ports 2014-02-13 13:41:01 +01:00
Aleksander Morgado 070f4938f3 plugin: allow probing non-tty AT ports 2014-02-13 13:40:58 +01:00
Aleksander Morgado 38ebf7c95b port-serial-at: allow specifying subsystem when creating a 'MMPortSerialAt'
Don't just assume that all AT ports are TTYs.
2014-02-13 13:40:55 +01:00
Aleksander Morgado 9432674087 port-serial: use the GIOChannel also for writing data 2014-02-13 13:40:52 +01:00
Aleksander Morgado 3ef71e4541 port-serial: allow non-tty 'MMPortSerial' objects
Allow having 'MMPortSerial' objects for non-tty devices. This will allow us e.g.
handling /dev/cdc-wdm ports speaking the AT protocol.
2014-02-13 13:40:50 +01:00
Aleksander Morgado 6fc14f6611 port-serial: remove unneeded method 2014-02-13 13:40:47 +01:00
Aleksander Morgado a2f4fbe373 port-serial-qcdm: commands are never cached
The QCDM port commands are never cached, so remove the option from the command()
method. Will also simplify command caching afterwards as it will be an AT-only
thing.
2014-02-13 13:40:44 +01:00
Aleksander Morgado 5792bcc876 port: remove 'constructor' checking for property validity
A constructor cannot return NULL, specially when there are subclasses, as it
would segfault. Just remove it, as it doesn't really do anything useful.
2014-02-13 13:40:42 +01:00
Aleksander Morgado ef77e35a7f port: use a 'priv' pointer to handle the private info 2014-02-13 13:40:39 +01:00
Aleksander Morgado 3f8f88499e port-serial: use a 'priv' pointer to handle the private info 2014-02-13 13:40:36 +01:00
Aleksander Morgado dbe13520ee port-serial-at: use a 'priv' pointer to handle the private info 2014-02-13 13:40:33 +01:00
Aleksander Morgado e909edcf1f port-serial: use GIO Async API like method for command() 2014-02-13 13:40:30 +01:00
Aleksander Morgado 8122153a88 port-serial: use GIO Async API like method for flash() 2014-02-13 13:40:27 +01:00
Aleksander Morgado 6e35f0a888 port-serial: use GIO Async API like method for reopen() 2014-02-13 13:40:24 +01:00
Aleksander Morgado d4dfd661b9 port-serial-at: use GIO Async API like methods 2014-02-13 13:40:21 +01:00
Aleksander Morgado 81ee07832d port-serial-qcdm: use GIO Async API like methods 2014-02-13 13:40:17 +01:00
Aleksander Morgado 1d57a008df port-serial-qcdm: remove unneeded private info 2014-02-13 13:40:14 +01:00
Aleksander Morgado 0c86840dde ports: rename 'libserial' to 'libport' 2014-02-13 13:40:11 +01:00
Aleksander Morgado c236e18692 ports: rename 'MMMbimPort' to 'MMPortMbim' 2014-02-13 13:40:07 +01:00
Aleksander Morgado 403e013f15 ports: rename 'MMQmiPort' to 'MMPortQmi' 2014-02-13 13:40:04 +01:00
Aleksander Morgado 6f235b9948 ports: rename 'MMAtSerialPort' to 'MMPortSerialAt' 2014-02-13 13:40:01 +01:00
Aleksander Morgado 0d1602bf0f ports: rename 'MMQcdmSerialPort' to 'MMPortSerialQcdm' 2014-02-13 13:39:57 +01:00
Aleksander Morgado e505ea0a58 ports: rename 'MMGpsSerialPort' to 'MMPortSerialGps' 2014-02-13 13:39:54 +01:00
Aleksander Morgado 9cde02111b ports: rename 'MMSerialPort' to 'MMPortSerial' 2014-02-13 13:39:51 +01:00
Julian Oes 9447527c35 blacklist: ignore all devices from VID 0x26a, no modems from 3D Robotics 2014-02-04 12:11:59 +01:00
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 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 a282237ae5 port-probe: buffer_full_id is a signal handler, not a GSource 2014-01-25 20:56:01 +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
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
Ben Chan 5c00736f44 iface-modem,sim: make SIM interface initialization cancellable 2014-01-11 23:33:35 +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
Yegor Yefremov 84bdcb04ed trivial: resolve maybe-uninitialized warnings
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2014-01-07 09:40:05 -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
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
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
Ben Chan 073163fb0b core: fix some typos in comments 2013-12-05 13:04:18 -06:00