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.
|
|
We setup all output variables with g_autoptr() and then use
g_steal_pointer() to return the needed ones.
|
|
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.
|
|
g_date_time_new, and g_date_time_new_utc return NULL if inputs are out
of range, and currently mm_new_iso8601_time passes the GDateTime created
by those two functions to date_time_format_iso8601 without checking for
NULL values, causing a g_date_time_format_iso8601 crash if PDU data is
corrupted with wrong date.
To prevent this, mm_new_iso8601_time now can return NULL and set a new
GError if GDateTime created by g_date_time_new is NULL.
Fixes #546
|
|
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
Includes updates by Aleksander Morgado to fix coding style issues.
|
|
Reported at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1371
|
|
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
|
|
|
|
Also providing support to report errors when attempting to decode the
strings.
|
|
|
|
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.
|
|
no longer need to check the charset because of the fix in charsets,
that now accepts GSM and UCS2.
|
|
|
|
|
|
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/mm-modem-helpers-cinterion.c: In function 'mm_cinterion_build_band':
cinterion/mm-modem-helpers-cinterion.c:409:54: error: cast increases required alignment of target type [-Werror=cast-align]
bands_string = mm_common_build_bands_string ((MMModemBand *)bands->data, bands->len);
^
|
|
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.
|
|
|
|
The GSM supplementary services related changes, as well as the rework
done to manage calls per call id, is copyrighted by Purism SPC.
|
|
|
|
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).
|
|
This CL converts a few g_regex_match_full() expressions to their
equivalent g_regex_match() in order to simplify the code, i.e.
g_regex_match_full (regex, str, strlen (str), 0, 0, &match_info, NULL)
is equivalent to:
g_regex_match_full (regex, str, -1, 0, 0, &match_info, NULL)
or simply:
g_regex_match (regex, str, 0, &match_info)
|
|
g_match_info_free() already check if the given pointer is NULL and does
nothing on a NULL pointer.
|
|
The default AT^SCFG="Radio/Band" value for Cinterion PLS8-J devices is
"16819472". Add UMTS band 19 and LTE band 19 entries based on the
information given in the PLS8 datasheet.
|
|
This info comes from PLS8-X/E/J/V/US, HC25 & PHS8 references, the
last two can be found publicly via Google search.
Swapped bit-mask locations for G850 & PCS bands as they may have
changed with FW or where accidently put in the wrong place.
Updated many 3G & 4G bit-mask fields.
|
|
Updated to use the non-deprecated MMModemBand values.
|
|
If the modem supports ^SIND psinfo reporting, we enable the URC and
flag the access technology polling unsupported, so that we only update
access technology via the +CIEV URCs.
E.g.:
(ttyACM1): --> 'AT^SIND="psinfo",1<CR>'
(ttyACM1): <-- '<CR><LF>^SIND: psinfo,1,10<CR><LF><CR><LF>OK<CR><LF>'
Reporting initial access technologies...
Modem /org/freedesktop/ModemManager1/Modem/0: access technology changed (unknown -> hsdpa, hsupa)
...
(ttyACM1): <-- '<CR><LF>+CIEV: psinfo,4<CR><LF>'
Modem /org/freedesktop/ModemManager1/Modem/0: access technology changed (hsdpa, hsupa -> edge)
...
|
|
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
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|