Age | Commit message (Collapse) | Author |
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/990
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
|
|
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
|
|
Stat value may be multidigit e.g. 10 or 11.
Signed-off-by: Kirill Buksha <kirbuk200@gmail.com>
|
|
The 'stat' field in CREG responce may contain multi-digit numbers, such as "10"
meaning "registered for "CSFB not preferred", roaming". Furtermore, some modems
use value "11" to indicate that only emergency services are available.
Signed-off-by: Kirill Buksha <kirbuk200@gmail.com>
|
|
Add some test responses from the Quectel EG915Q and some other Quectel devices.
Then try to parse those responses.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
When matching profiles ignore disabled ones. When activating a
specific profile index, return an error if that profile is marked
as disabled.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Missing ! for strncmp() meant the test was backwards and would
erroneously report 1xRTT and EVDOr0 when those access technologies
were not in use.
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
`CSCB` has the form
```
CSCB: [0|1],"<channel-list>","<data-coding-scheme>"
```
If the first parameter is `0` this specifies the accepted types if `1`
it specifies rejected.
So far seen in the wild were CSCB strings with accepted types only and a
coding scheme of "" so this is what we handle for the moment.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
|
|
This will allow us to fetch cell broadcast messages.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
Signed-off-by: Dan Williams <dan@ioncontrol.co>
|
|
If CID parsing from the +CGDCONT response fails, the very last PDP
structure allocated is not put on the list yet and therefore
mm_3gpp_pdp_context_list_free() wouldn't free it.
Let's put it on the list first, as to not leak it on error.
|
|
Rework the AT string quote operation to build the output with the
GString helper, instead of manually calculating how many bytes we'll
need in the output. It just makes it clearer.
|
|
IPv4v6 (dual-stack)
To address limitations in reading IP_TYPE information (in some cases) for profile requests,
default to IPv4v6 (dual-stack) for profile requests and IPv4 only for user requests (to ensure backward compatibility)
if nothing specific is requested. This ensures network compatibility across IPv4 and IPv6 networks,
preventing potential connectivity issues in IPv6 environments.
|
|
SIM A7600E-H sends only 3 parameters in CGDCONT read response (+CGDCONT: 1,"IP","nate.sktelecom.com").
The parsing regex requeres 4 parameters, so the response is not matched.
In addition fourth parameter is not used by parsing code.
|
|
|
|
The Broadmobi BM818 has some additional carriage returns in the RING message
Fixes: #626
Signed-off-by: Angus Ainslie <angus@akkea.ca>
|
|
|
|
We setup all output variables with g_autofree and then use
g_steal_pointer() to return the needed ones.
|
|
We setup all output variables with g_autofree 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
|
|
The rights each contributor has are the ones stated by the GPL/LGPL,
not more and not less.
|
|
The numeric fields in the +COPS=? response were relying on a very weak
parsing logic, assuming that they were single-digit numeric values and
not using the common string to integer conversion utilities.
This commit improves the conversion from the 3GPP/ETSI defined network
availability and access technology values to the MM defined ones,
providing enum-based matches even if the numeric values are the same.
The commit also fixes the parsing of access technology values > 10,
required to report 5G related values.
|
|
The new 5GNR related values are >= 10, so don't expect one single
digit (\d), expect one or more (\d+).
|
|
+CGDCONT? may list profiles with IDs that are illegal to write, i.e.
+CGDCONT=? returns a minimum ID larger than some of the existing
profiles. E.g. for Fibocom L610-EU, +CGDCONT=? returns
+CGDCONT: (1-7),"IP",,,(0-3),(0-4)
+CGDCONT: (1-7),"IPV6",,,(0-3),(0-4)
+CGDCONT: (1-7),"IPV4V6",,,(0-3),(0-4)
+CGDCONT: (1-7),"PPP",,,(0-3),(0-4)
+CGDCONT: (1-7),"Non-IP",,,(0-3),(0-4)
while the default EPS bearer is established at profile 0:
+CGDCONT: 0,"IP","xxx","xxx.xxx.xxx.xxx",0,0
[...]
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
|
|
multimode device
We use capability switching logic exclusively for configuring GSM/UMTS+CDMA/EVDO devices
(regardless of whether it has LTE/5GNR or not) to add or remove the GSM/UMTS and CDMA/EVDO
capabilities.
Based on the same logic, we will allow 4 combinations for GSM/UMTS+CDMA/EVDO+LTE+5GNR device:
"GSM/UMTS+CDMA/EVDO+LTE+5GNR", "GSM/UMTS+LTE+5GNR", "CDMA/EVDO+LTE+5GNR" and "LTE+5GNR"
Similarly, we will allow 4 combinations for GSM/UMTS+CDMA/EVDO+LTE device:
"GSM/UMTS+CDMA/EVDO+LTE", "GSM/UMTS+LTE", "CDMA/EVDO+LTE" and "LTE"
And, we will allow 3 combinations for GSM/UMTS+CDMA/EVDO device:
"GSM/UMTS+CDMA/EVDO", "GSM/UMTS" and "CDMA/EVDO"
Also, supported combination modes should be based on current capabilities and not entirely
upon supported radio interfaces.
1) If current capability has "gsm-umts" or "cdma-evdo" or both, do not
support 4G only, 5G only, or 4G+5G combination modes
2) If current capability neither has "gsm-umts" nor "cdma-evdo", only support
combination modes involving 4G and 5G.
|
|
The modem may report the 'apn-type' field is the one to be used as
index; if that's the case, allow setting and deleting profiles based
on the given 'apn-type' field.
This change also makes the internal profile management operations use
one index field or another, based on what the protocol implements.
|
|
|
|
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
Includes updates by Aleksander Morgado to fix coding style issues.
|
|
Support is added to set eid dbus interface property using
MBIM protocol when the inserted sim is esim.
|
|
Calls in a CLCC response in data-only or fax-only mode
do not count as actuall calls.
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/409
|
|
Use mm_obj_warn() instead.
|
|
MNC digit count information is lost on conversion to integers. Make it
possible for the caller to get this information through a separate
boolean.
|
|
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.
|
|
The new helpers allow converting a PDP context list returned from the
+CGDCONT? parser to a list of 3GPP profile objects.
The new mm_3gpp_profile_list_find_best() method is equivalent to the
mm_3gpp_select_best_cid() one, but using profile objects as
input/output instead of specific settings.
The unit tests that were testing mm_3gpp_select_best_cid() are also
converted to use mm_3gpp_profile_list_find_best().
|
|
|
|
|
|
There is no point in providing a configurable default IP family in the
bearer object, because we can always assume IPv4 as being the only
default expected.
Simplify the logic and also provide a new method to get the normalize
the IP family, using IPv4 as default always.
|
|
Implement Sim.SetPreferredNetworks method by using the AT+CPOL command.
|
|
The ModemManager1.Sim.PreferredNetworks property contains the preferred
networks (and access technologies, if available) configured to the
SIM card.
This commit implements preferred networks reading with AT+CPOL.
|
|
Instead of blindly assuming that we can take whatever string given as
valid UTF-8, we'll always attempt to convert from the current modem
charset into UTF-8. Before we were doing this for hex-encoded UCS2,
but not for example for GSM-7.
And due to the now applied GSM-7 conversion, the mf627a/mf627b +COPS
parsing unit tests are updated accordingly, because when converting
from an input string that contains byte 0x40 ('@' in UTF-8) as if it
were GSM-7, the 0x40 is taken as character '¡', encoded as 0xc2,0xa1
in UTF-8).
|
|
It makes much more sense than returning a gchar array, as gchar is
signed.
|