Age | Commit message (Collapse) | Author |
|
Try to simplify a bit the logic that selects the flow control to be
used during connectivity:
* We detect early if the requested flow control (via udev tags) is
actually supported by the modem (as eported by AT+IFC=?), and if it
isn't, we error out directly.
* We try to set in a single place the AT commands to be used to setup
the flow control, once we have decided which one we're going to
use.
* Use the string builder helpers to log the flow control values.
|
|
|
|
|
|
MMFlowControl is a flags enumeration, so change the property type to
match that, or we'll end up with nasty criticals during runtime.
(ModemManager:30758): GLib-GObject-CRITICAL **: 10:54:26.435: g_param_spec_enum: assertion 'G_TYPE_IS_ENUM (enum_type)' failed
Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff71f2a96 in ?? () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff71f2a96 in () at /usr/lib/libglib-2.0.so.0
#1 0x00007ffff71f3def in g_logv () at /usr/lib/libglib-2.0.so.0
#2 0x00007ffff71f3fe0 in g_log () at /usr/lib/libglib-2.0.so.0
#3 0x00007ffff72d90ac in g_param_spec_enum () at /usr/lib/libgobject-2.0.so.0
#4 0x000055555564caf2 in mm_port_serial_class_init (klass=0x5555557607c0) at mm-port-serial.c:2101
#5 0x000055555564759a in mm_port_serial_class_intern_init (klass=0x5555557607c0) at mm-port-serial.c:49
#6 0x00007ffff72ea9b4 in g_type_class_ref () at /usr/lib/libgobject-2.0.so.0
#7 0x00007ffff72eab5a in g_type_class_ref () at /usr/lib/libgobject-2.0.so.0
#8 0x00007ffff72d0f53 in g_object_new_valist () at /usr/lib/libgobject-2.0.so.0
#9 0x00007ffff72d103a in g_object_new () at /usr/lib/libgobject-2.0.so.0
#10 0x000055555564e187 in mm_port_serial_at_new (name=0x55555576e280 "ttyUSB4", subsys=MM_PORT_SUBSYS_TTY) at mm-port-serial-at.c:533
#11 0x0000555555602512 in serial_open_at (self=0x555555715390) at mm-port-probe.c:1285
#12 0x00007ffff71ecb49 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#13 0x00007ffff71ecf59 in () at /usr/lib/libglib-2.0.so.0
#14 0x00007ffff71ed272 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#15 0x00005555555957e0 in main (argc=3, argv=0x7fffffffe458) at
main.c:181
Also, rename the property to match the naming convention of other
properties in the same object.
|
|
Set the flow control used in the data connection from the one
set in the port.
|
|
Set the serial port flow control from the udev tag
ID_MM_TTY_FLOW_CONTROL before accessing the port.
|
|
Add flow control property to the MMPortSerial class, and use it when
setting the port flow control.
|
|
Add function for parsing the content of the udev tag
ID_MM_TTY_FLOW_CONTROL.
|
|
All these values are usually specified in hex, not in dec.
|
|
Devices will expect SUPL server given as either IP:PORT or FQDN:PORT,
so just avoid saying we require a 'URL' because it's not true.
We will use a new helper method to parse and validate user-provided
SUPL server address.
|
|
On CDMA-only connections we won't have a CID defined, so instead of
getting in a loop of warnings reporting "cid not defined", early error
out with an UNSUPPORTED error so that the connection check isn't tried
any more.
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/83
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In order to avoid having the result values in 2 places (context and
result) when the GTask is completed, we will steal the pointer from
the context before it's set as result of the GTask.
|
|
duplicating with g_memdup
corrects segfault introduced in 7d8f0600e6de32721112949b65d48108ea640b51
Signed-off-by: Paul Bartell <p.bartell@temperednetworks.com>
|
|
g_free() handles a NULL pointer properly, so there is no need to have a
NULL check before calling g_free().
|
|
|
|
|
|
|
|
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
|
|
Fixes: 9e42a19742de55cf5c0ba4d68069c1845e9392e6
|
|
Fixes: c0cc694c67d9e71f200fb23e20473cc9b31d9ec0
|
|
This patch fixes the following compiler warning:
xmm/mm-modem-helpers-xmm.c:388:38: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &inner_error);
^
|
|
This patch fixes the following compiler warning:
mm-shared-qmi.c:447:9: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration]
memset (buf, 0, sizeof (buf));
^
|
|
Implement a new interface to keep the code shared between the QMI and
non-QMI modem implementations.
While doing that, also fix the parent interface pointer handling, so
that it isn't a static pointer applicable to all modems, and make it a
per-modem specific pointer. Without this fix, ModemManager would crash
if e.g. running with both a QMI and non-QMI Cinterion modem at the
same time.
The new shared Cinterion logic will be in charge of managing all GPS
sources not already managed by the parent interface. E.g. if the
parent implementation already supports QMI-based GPS location (using
the LOC service for example) prefer that to the custom AT-based
logic.
|
|
|
|
|
|
|
|
|
|
Same thing as we do for Icera.
|
|
|
|
|
|
With support for managing bands and modes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Most of all the other APIs we have are expecting binary data (e.g.
UCS-2 encoded strings) in ASCII hex format, because they were going
to be used in text AT commands. For binary protocols allowing binary
data, we need use a more generic API that provides an explicit data
size.
|
|
|
|
The 'result codes' naming is much more AT-protocol specific, 'events'
is more generic.
|