Age | Commit message (Collapse) | Author |
|
We are going to allow including the plugin sources built within the
ModemManager daemon binary; moving the sources within the daemon
sources directory makes it easier.
|
|
The behavior of GRegex changed in 2.73.2 once it was ported from pcre1
to pcre2. In some cases it was made more strict, which is fine, in
other cases it exposed some change in how it behaves on certain
matches that is not extremely clear whether it's ok or not.
See https://gitlab.gnome.org/GNOME/glib/-/issues/2729
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/621
Either way, one thing that was assumed was that initializing all
GRegex/GMatchInfo variables to NULL and making sure they're NULL
before they're initialized by glib (especially the GMatchInfo) was a
good and safer approach.
So, whenever possible, g_autoptr() is used to cleanup the allocated
GMatchInfo/GRegex variables, and otherwise, g_clear_pointer() is used
to ensure that no free/unref is attempted unless the given variable is
not NULL, and also so that the variable is reseted to NULL after being
disposed.
|
|
ModemManager handles suspend and resume signals sent from powerd
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/547
|
|
Subsystem vendor ID can be used for identifying PCI modems,
so expose the property.
|
|
It's been observed that running CPOL? would completely break the AT
port of the modules like the GIO225.
Fully disable this feature in the whole option and option-hso plugins,
by creating a new custom SIM object with the features disabled
completely, and setup as a new shared interface object.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/404
|
|
As the profile id is not really set in the base bearer object until
after connected.
|
|
Some of the AT-based connection methods don't have any way to query
connection status, or we don't have a proper implementation for those
yet. Ignore the reload operation in all those.
|
|
By default, fallback to "unknown" mobile equipment error when the
modem gets disconnected by the network and we don't have any way to
know a more detailed reason.
|
|
This is now a requirement when using glib 2.56.
|
|
There is no longer need to perform all the CID selection logic in the
broadband bearer connection procedure, we can rely on the new profile
management operations to do the same thing.
We can do this because we're sure that all the MMBroadbandModem
objects implement the MMModem3gppProfileManager interface.
Additionally, given that we now provide the profile ID value as part
of the MMBearerConnectResult, we no longer need a custom
mm_broadband_bearer_get_3gpp_cid() as we can use the generic
mm_base_bearer_get_profile_id() for the same purpose.
|
|
A modem that creates exclusively bearer objects that work with NET
ports (e.g. all QMI or MBIM modems) must not add any TTY port in the
list of data ports.
A modem that creates exclusively bearer objects that work with TTY
ports (e.g. the generic modem) must not add any NET port in the
list of data ports.
A modem that may use both TTY and NET ports should add all in the list
of data ports.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/324
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/329
|
|
We already have methods to query for interface specific attributes
like class/subclass/protocol, so add a new one for the interface
number, and make sure we use ATTRS{bInterfaceNumber} to load it
always, instead of assuming the ID_USB_INTERFACE_NUM property is set.
|
|
Each different plugin or protocol had a different connection attempt
value. E.g. QMI and MBIM both used 60s max for the connection attempt,
while the u-blox plugin had up to 180s for ECM based connection
setups.
This commit consolidates all plugins and protocols to use the same
timeout values for commands that may take long to respond, e.g. a
connection atempt under low signal quality conditions.
A value of 180s for the connection attempt steps and 120s for a
disconnection attempt step is considered. Note, though, that in some
cases (like a IPv4v6 setup attempt using QMI) we may have more than
one such long step, so this doesn't mean that a connection attempt
will always take less than 180s.
Users of the connection/disconnection APIs should be able to handle
the case where the attempt times out in their side (e.g. with a lower
DBus request timeout), and which would not mean the actual request
they did really failed. E.g. a connection attempt with a DBus timeout
of 30s may fail in the user with a timeout error, but the attempt
would still go on for as much as the plugin/protocol needs.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/270
|
|
CHAP is almost universal nowadays, and so it is a better default
than PAP
Not changed for uBlox, that prefers an error if not specified,
and for Huawei, which uses NONE with user/pwd and has 2 CHAP choices
|
|
|
|
|
|
|
|
|
|
It has the same exact format as MMBaseModemAtCommand, but its contents
are assumed heap allocated.
The only real purpose of this type is to allow defining static
constant MMBaseModemAtCommand variables without warnings when using
-Wdiscarded-qualifiers.
|
|
option/mm-broadband-bearer-hso.c: In function ‘ip_config_ready’:
option/mm-broadband-bearer-hso.c:128:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
128 | num != ctx->cid) {
| ^~
|
|
Useful when clamping a unsigned integer with low threshold set to 0,
which would give us compiler warnings with -Wtype-limits when using
CLAMP(), e.g.:
via/mm-broadband-modem-via.c: In function ‘handle_evdo_quality_change’:
/usr/include/glib-2.0/glib/gmacros.h:811:63: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
811 | #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
| ^
via/mm-broadband-modem-via.c:284:19: note: in expansion of macro ‘CLAMP’
284 | quality = CLAMP (quality, 0, 100);
| ^~~~~
|
|
option/mm-broadband-modem-option.c: In function ‘load_access_technologies_step’:
option/mm-broadband-modem-option.c:565:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
565 | ctx->step++;
| ~~~~~~~~~^~
option/mm-broadband-modem-option.c:567:5: note: here
567 | case ACCESS_TECHNOLOGIES_STEP_OSSYS:
| ^~~~
option/mm-broadband-modem-option.c:587:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
587 | ctx->step++;
| ~~~~~~~~~^~
option/mm-broadband-modem-option.c:589:5: note: here
589 | case ACCESS_TECHNOLOGIES_STEP_OWCTI:
| ^~~~
option/mm-broadband-modem-option.c:600:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
600 | ctx->step++;
| ~~~~~~~~~^~
option/mm-broadband-modem-option.c:602:5: note: here
602 | case ACCESS_TECHNOLOGIES_STEP_LAST:
| ^~~~
|
|
option/mm-broadband-modem-option.c:978:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
978 | { "_OSSYS=1", 3, FALSE, NULL },
| ^~~~~~~~~~
option/mm-broadband-modem-option.c:979:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
979 | { "_OCTI=1", 3, FALSE, NULL },
| ^~~~~~~~~
option/mm-broadband-modem-option.c:980:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
980 | { "_OUWCTI=1", 3, FALSE, NULL },
| ^~~~~~~~~~~
option/mm-broadband-modem-option.c:981:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
981 | { "_OSQI=1", 3, FALSE, NULL },
| ^~~~~~~~~
option/mm-broadband-modem-option.c:1033:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1033 | { "_OSSYS=0", 3, FALSE, NULL },
| ^~~~~~~~~~
option/mm-broadband-modem-option.c:1034:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1034 | { "_OCTI=0", 3, FALSE, NULL },
| ^~~~~~~~~
option/mm-broadband-modem-option.c:1035:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1035 | { "_OUWCTI=0", 3, FALSE, NULL },
| ^~~~~~~~~~~
option/mm-broadband-modem-option.c:1036:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1036 | { "_OSQI=0", 3, FALSE, NULL },
| ^~~~~~~~~
|
|
|
|
|
|
This block is a subclassed method from MMBaseBearer, which we just
happen to also use as part of the 3GPP dial logic in the connection
attempt.
So make it a separate logical block, and call the processing of the
connection attempt if one is found.
This change makes it similar to the same logic in the Icera plugin.
|
|
Same amount of time as in the Icera plugin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Program received signal SIGSEGV, Segmentation fault.
strchr () at ../sysdeps/arm/armv6/strchr.S:28
28 ../sysdeps/arm/armv6/strchr.S: No such file or directory.
(gdb) bt
#0 strchr () at ../sysdeps/arm/armv6/strchr.S:28
#1 0x76b121c8 in g_param_spec_pool_lookup () from ~/buildroot/output/staging/lib/libgobject-2.0.so.0
#2 0x76b0cf44 in g_object_new_valist () from ~/buildroot/output/staging/lib/libgobject-2.0.so.0
#3 0x76b0d39c in g_object_new () from ~/buildroot/output/staging/lib/libgobject-2.0.so.0
#4 0x75f75e40 in mm_plugin_create () at ublox/mm-plugin-ublox.c:99
#5 0x00031550 in load_plugin (path=0xe9b68 "/usr/lib/ModemManager/libmm-plugin-ublox.so") at mm-plugin-manager.c:1521
#6 load_plugins (error=0x7efffa68, self=0xdc4f0) at mm-plugin-manager.c:1574
#7 initable_init (initable=<optimized out>, cancellable=<optimized out>, error=0x7efffa68) at mm-plugin-manager.c:1679
#8 0x76b9b278 in g_initable_new_valist () from ~/buildroot/output/staging/lib/libgio-2.0.so.0
#9 0x76b9b2e0 in g_initable_new () from ~/buildroot/output/staging/lib/libgio-2.0.so.0
#10 0x000324d0 in mm_plugin_manager_new (plugin_dir=0xe9c40 "/usr/lib/ModemManager", error=error@entry=0x7efffa68) at mm-plugin-manager.c:1620
#11 0x0002da08 in initable_init (initable=0xddb40, cancellable=<optimized out>, error=0x7efffa68) at mm-base-manager.c:1113
#12 0x76b9b278 in g_initable_new_valist () from ~/buildroot/output/staging/lib/libgio-2.0.so.0
#13 0x76b9b2e0 in g_initable_new () from ~/buildroot/output/staging/lib/libgio-2.0.so.0
#14 0x0002e81c in mm_base_manager_new (connection=connection@entry=0xe1070, plugin_dir=plugin_dir@entry=0x9efb0 "/usr/lib/ModemManager",
auto_scan=auto_scan@entry=1, initial_kernel_events=initial_kernel_events@entry=0x0, enable_test=0, error=0x7efffa68, error@entry=0x7efffa60)
at mm-base-manager.c:957
#15 0x0002b6ec in bus_acquired_cb (connection=0xe1070, name=<optimized out>, user_data=<optimized out>) at main.c:87
#16 0x76c26864 in connection_get_cb () from ~/buildroot/output/staging/lib/libgio-2.0.so.0
#17 0x76bc76cc in g_task_return_now () from ~/buildroot/output/staging/lib/libgio-2.0.so.0
#18 0x76bc7d50 in g_task_return () from
~/buildroot/output/staging/lib/libgio-2.0.so.0
See similar bug in GStreamer:
https://bugzilla.gnome.org/show_bug.cgi?id=740191
|
|
|
|
|
|
|
|
The Altair, Option HSO and Samsung plugins all use the send-delay=0
setting once the modem object has been created. For consistency, use
the same setting during port probing.
|
|
g_free and g_object_unref are in form of `void (*)(gpointer)`, which
matches the GDestroyNotify signature. An explicit GDestroyNotify cast on
g_free and g_object_unref is thus not needed.
|