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 previously used COPS command to set to LTE-only mode did not work
for an ELS81 modem.
Now ^SXRAT is used to switch modes instead of COPS, if SXRAT is
supported by the modem.
|
|
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.
|
|
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
Includes updates by Aleksander Morgado to fix coding style issues.
|
|
The g_regex_match_full() method may return FALSE without setting the
GError, so that case needs to be considered.
In addition to that, the following g_assert() was not doing what it
should have been, as it was comparing the address of the variable and
not the variable itself; rework the code to avoid that as well:
g_assert (access_tech != MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN);
|
|
The g_regex_match_full() method may return FALSE without setting the
GError, so that case needs to be considered.
Reported by Jan Mazura.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347
|
|
E.g. in a Cinterion PLS8-E (REVISION 04.004) to match the following
line:
^SCFG: "MEopMode/Prov/Cfg","fallback*"
Fix suggested by Jan Mazura.
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347
|
|
There is no need to reload it on every settings update attempt; just
load it once when the 3GPP interface is initialized, and re-use the
loaded value on every new update attempt.
|
|
|
|
|
|
the AT^SCFG="Radio/Band" command does not return a different answer
for different charsets.
This code was working previously because the charset was left to default (GSM)
at the time of this operation, and therefore the string was unchanged anyway.
|
|
|
|
from UTF-8"
This reverts commit 6a7dd87f30b2cc1b459abab38a0805aa8ba1bfbc.
Reverting because the merge request was set to squash all together....
|
|
This would really be an implementation detail, not a real use
case. Just don't warn in this case, as in the conversion in the
opposite direction.
|
|
We can safely cast the data in a GArray to gpointer first, and then
to the pointer type we require.
cinterion/tests/test-modem-helpers-cinterion.c: In function 'common_test_scfg':
cinterion/tests/test-modem-helpers-cinterion.c:56:56: error: cast increases required alignment of target type [-Werror=cast-align]
expected_bands_str = mm_common_build_bands_string ((const MMModemBand *)expected_bands->data,
^
cinterion/tests/test-modem-helpers-cinterion.c:58:47: error: cast increases required alignment of target type [-Werror=cast-align]
bands_str = mm_common_build_bands_string ((const MMModemBand *)bands->data,
^
cinterion/tests/test-modem-helpers-cinterion.c: In function 'common_test_scfg_response':
cinterion/tests/test-modem-helpers-cinterion.c:209:56: error: cast increases required alignment of target type [-Werror=cast-align]
expected_bands_str = mm_common_build_bands_string ((const MMModemBand *)expected_bands->data,
^
cinterion/tests/test-modem-helpers-cinterion.c:211:47: error: cast increases required alignment of target type [-Werror=cast-align]
bands_str = mm_common_build_bands_string ((const MMModemBand *)bands->data,
^
|
|
Not all Cinterion modems support AT+CESQ.
However a much larger group of them support AT^SMONI
This commit uses the latter instead of the default former.
|
|
|
|
|
|
So that we can provide the specific object id in every log associated
to a given object.
|
|
CC cinterion/tests/test_modem_helpers_cinterion-test-modem-helpers-cinterion.o
cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_single’:
cinterion/tests/test-modem-helpers-cinterion.c:749:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
749 | { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }
| ^~~~~~~~~~~
cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_multiple’:
cinterion/tests/test-modem-helpers-cinterion.c:764:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
764 | { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" },
| ^~~~~~~~~~~
cinterion/tests/test-modem-helpers-cinterion.c:765:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
765 | { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "987654321" },
| ^~~~~~~~~~~
cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_complex’:
cinterion/tests/test-modem-helpers-cinterion.c:781:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
781 | { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" },
| ^~~~~~~~~~~
cinterion/tests/test-modem-helpers-cinterion.c:782:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
782 | { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" },
|
|
|
Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol.
|
|
The debug-level logs won't be printed e.g. during 'make check', but
will be included when running the tester manually.
|
|
|
|
|
|
This command will give us URCs whenever the extended list of current
calls changes, which includes information about the actual state of
each call, even for calls in waiting state.
Therefore, as this is a URC that applies to all calls, it's enabled
and disabled as part of the modem voice interface, instead of doing it
as part of the call object itself (i.e. not treated as an in-call URC).
|
|
The sort_band() method used in the tester was totally wrong, it was
comparing the addresses of the variables instead of the MMModemBand
values.
Use the common mm_common_bands_garray_sort() instead, which works as
expected.
|
|
Updated to use the non-deprecated MMModemBand values.
|
|
Two main changes in the regex:
* Ignore double quotes around interval numbers.
* Ignore second set of values (i.e. the one after the comma), as it
may not even be given).
We now support at least these two formats:
^SCFG: "Radio/Band",("1-511","0-1")
^SCFG: "Radio/Band\",("1"-"147")
Reported-by: Colin Helliwell <colin.helliwell@ln-systems.com>
|
|
* Allow whitespaces prefixing the values row.
* Allow more than one \r\n between the title and the table header.
Reported-by: Colin Helliwell <colin.helliwell@ln-systems.com>
|
|
https://lists.freedesktop.org/archives/modemmanager-devel/2017-February/003911.html
|
|
g_type_init() has been deprecated (and also marked with the attribute
'deprecated') since glib 2.36 as the type system is automatically
initialized. Since the minimum version of glib required by ModemManager
is 2.36, calling g_type_init() isn't necessarily in the ModemManager
code.
|
|
And consolidate the connection status checks done during connection and
disconnection so that we re-use the same logic.
|
|
We get as input the ^SWWAN index we're interested in, and we loop
through the list of ^SWWAN lines looking for the one we need.
This updated helper method allows working with multi-line ^SWWAN
responses, e.g. given when more than one PDP context is active.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|