Age | Commit message (Collapse) | Author |
|
|
|
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 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.
|
|
When we enable MBIMEx v2.0, the "Signal State" responses and
indications no longer report a valid RSSI value; and instead, they
report per access technology RSRP/RSRQ values.
>>>>>> Header:
>>>>>> length = 116
>>>>>> type = indicate-status (0x80000007)
>>>>>> transaction = 0
>>>>>> Fragment header:
>>>>>> total = 1
>>>>>> current = 0
>>>>>> Contents:
>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
>>>>>> cid = 'signal-state' (0x0000000b)
>>>>>> Fields:
>>>>>> Rssi = '99'
>>>>>> ErrorRate = '99'
>>>>>> SignalStrengthInterval = '5'
>>>>>> RssiThreshold = '2'
>>>>>> ErrorRateThreshold = '4294967295'
>>>>>> RsrpSnr = '{
>>>>>> [0] = {
>>>>>> Rsrp = '0'
>>>>>> Snr = '0'
>>>>>> RsrpThreshold = '4294967295'
>>>>>> SnrThreshold = '4294967295'
>>>>>> SystemType = '5g-nsa'
>>>>>> },
>>>>>> [1] = {
>>>>>> Rsrp = '49'
>>>>>> Snr = '45'
>>>>>> RsrpThreshold = '4294967295'
>>>>>> SnrThreshold = '4294967295'
>>>>>> SystemType = 'lte'
>>>>>> },
>>>>>> }'
|
|
|
|
|
|
Support is added to set eid dbus interface property using
MBIM protocol when the inserted sim is esim.
|
|
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).
|
|
All BCD-encoded strings used by MM currently have the low nybble
of each byte come before the high nybble, but some strings (such
as the EID string returned by QMI Get Slot Status) are meant to
be read in order with the high nybble before the low one. As such,
extend mm_bcd_to_string to decode both.
|
|
The generic CREG parser is improved to also allow parsing +C5GREG
responses and URCs.
|
|
|
|
It's not used anywhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
| ^~~~~
|
|
mm-modem-helpers.c:4019:45: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
4019 | { MM_MODEM_3GPP_FACILITY_SIM, "SC" },
| ^~~~
mm-modem-helpers.c:4020:45: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
4020 | { MM_MODEM_3GPP_FACILITY_PH_SIM, "PS" },
| ^~~~
mm-modem-helpers.c:4021:45: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
4021 | { MM_MODEM_3GPP_FACILITY_PH_FSIM, "PF" },
| ^~~~
mm-modem-helpers.c:4022:45: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
4022 | { MM_MODEM_3GPP_FACILITY_FIXED_DIALING, "FD" },
| ^~~~
mm-modem-helpers.c:4023:45: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
4023 | { MM_MODEM_3GPP_FACILITY_NET_PERS, "PN" },
| ^~~~
mm-modem-helpers.c:4024:45: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
4024 | { MM_MODEM_3GPP_FACILITY_NET_SUB_PERS, "PU" },
| ^~~~
mm-modem-helpers.c:4025:45: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
4025 | { MM_MODEM_3GPP_FACILITY_PROVIDER_PERS, "PP" },
| ^~~~
mm-modem-helpers.c:4026:45: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
4026 | { MM_MODEM_3GPP_FACILITY_CORP_PERS, "PC" }
| ^~~~
|
|
If the charset selected via CSCS is UCS2, the modem may decide to
return all the strings in the +COPS=? response in UCS2:
<debug> (ttyACM0): --> 'AT+COPS=?<CR>'
<debug> (ttyACM0): <-- '<CR><LF>+COPS: (2,"004D006F007600690073007400610072","004D006F007600690073007400610072","00320031003400300037",7)
<debug> Found network '00320031003400300037' ('004D006F007600690073007400610072','004D006F007600690073007400610072'); availability: current, access tech: lte
|
|
|
|
Rework how the broadband bearer runs CGDCONT? and CGDCONT=? and setup
a helper method to perform the CID selection logic.
Also, implement unit tests for the CID selection logic.
|
|
|
|
|
|
|
|
|
|
The +CGEV indications allow us to get notified of packet domain
events like network-initiated or ME-initiated disconnections on
specific connected contexts, as well as full PS detach events (all
contexts disconnected). If the modem supports these indications, we
will enable them with +CGEREP and will then process them when they are
emitted by the modem.
If a full PS detach event happens, we will explicitly disconnect all
connected bearers.
If a deactivation inidication is received for a single context, we
will look for the associated bearer by CID and explicitly disconnect
it.
|
|
This patch adds a mm_bcd_to_string() helper function to convert a byte
array representing a binary-coded decimal (BCD) number to a string
representing the equivalent decimal number.
|
|
Devices like the Netgear AC313U require explicit context monitoring,
otherwise the device may end up disconnected internally and MM would
still think that the connection is ongoing.
|
|
|
|
And check that the string given in the tag is actually a valid one.
|