Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
So that we can provide the specific object id in every log associated
to a given object.
|
|
test-error-helpers.c: In function ‘test_error_helpers_connection_error’:
test-error-helpers.c:36:39: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare]
36 | for (i = enum_class->minimum; i <= enum_class->maximum; i++) { \
| ^~
|
|
test-qcdm-serial-port.c: In function ‘print_buf’:
test-qcdm-serial-port.c:79:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare]
79 | for (i = 0; i < len; i++) {
| ^
test-qcdm-serial-port.c: In function ‘server_wait_request’:
test-qcdm-serial-port.c:163:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
163 | } while (total < sizeof (readbuf));
| ^
|
|
test-modem-helpers.c: In function ‘test_cgev_indication’:
test-modem-helpers.c:2165:9: error: enumeration value ‘MM_3GPP_CGEV_UNKNOWN’ not handled in switch [-Werror=switch-enum]
2165 | switch (type) {
| ^~~~~~
cc1: all warnings being treated as errors
|
|
test-modem-helpers.c: In function ‘test_creg_match’:
test-modem-helpers.c:1127:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
1127 | for (i = 0; i < array->len; i++) {
| ^
|
|
test-modem-helpers.c: In function ‘test_cmgl_response_generic’:
test-modem-helpers.c:294:20: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
294 | .pdu = "07914306073011F00405812261F700003130916191314095C27"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
|
|
test-at-serial-port.c:29:7: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
29 | { "\r\n", "\r\n" },
| ^~~~~~
test-at-serial-port.c:29:15: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
29 | { "\r\n", "\r\n" },
| ^~~~~~
|
|
The autoconf macros AX_COMPILER_FLAGS_{CFLAGS|GIR|LDFLAGS} test
for compiler and linker support of various flags, and add the flags to
the generated output.
If the command-line option '--enable-compile-warnings' is specified to
'configure', a number of additional warning options is also added to the
output. This is the default.
This update requires the presence of the GNU autoconf-archive in the
system.
|
|
|
|
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
|
|
Defining the new error codes in the headers is not enough, we also
need to add support in the error helpers in order to create proper
GErrors with the expected error codes.
|
|
|
|
Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol.
|
|
Therefore, avoid needing TEST_SMS_PART_ENABLE_TRACE build symbol.
|
|
The debug-level logs won't be printed e.g. during 'make check', but
will be included when running the tester manually.
|
|
|
|
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 regex was expecting empty values in several of the fields, which
is wrong. Instead of matching empty fields, just ignore all fields
that we don't require in our 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.
|
|
Fix the test for invalid characters, because now I allow hex chars in
the account number.
And add new tests with real China Mobile ICCIDs that contain hex chars
in the account number.
|
|
The mm_3gpp_parse_iccid() method does validation of the ICCID string
and was originally implemented to handle +CRSM reported values. The
implementation was looking for 20-digit strings, even for 19-digit
ICCIDs (those finished with a trailing 'F').
We now extend the logic to also validate ICCID strings reported as
19-digit values directly, and when that happens we won't allow
swapping of the digits (a +CRSM specific requirement) or trailing 'F'
characters (as that is only required when reporting 19-digit ICCIDs
with 20-digit strings).
This change allows us to e.g. use the u-blox specific AT+CCID command
and validate the returned ICCID with the same helper method, which
currently fails:
(ttyACM2): --> 'AT+CCID<CR>'
(ttyACM2): <-- '<CR><LF>+CCID: 8934077700015848638<CR><LF><CR><LF>OK<CR><LF>'
couldn't load SIM identifier: 'Invalid ICCID response size (was 19, expected 20)'
|
|
g_free() handles a NULL pointer properly, so there is no need to have a
NULL check before calling g_free().
|
|
The PDP contexts that are found with an empty APN configured are right
now used as placeholders that can be overwritten with the user
provided APN if no direct match is found.
We want to keep that logic in place, but for the case where we do get
an empty APN requested by the user, we need to perform the full
context match, so that the first PDP context matching the empty APN is
used.
Right now we're overwriting with the empty APN again the last PDP
context found with an empty APN, which doesn't make much sense:
Apr 27 08:15:21 ModemManager[4251]: <debug> Found '3' PDP contexts
Apr 27 08:15:21 ModemManager[4251]: <debug> PDP context [cid=1] [type='ipv4'] [apn='']
Apr 27 08:15:21 ModemManager[4251]: <debug> PDP context [cid=2] [type='ipv4'] [apn='broadband']
Apr 27 08:15:21 ModemManager[4251]: <debug> PDP context [cid=15] [type='ipv4'] [apn='']
Apr 27 08:15:21 ModemManager[4251]: <debug> Found PDP context with CID 1 and no APN
Apr 27 08:15:21 ModemManager[4251]: <debug> Found PDP context with CID 15 and no APN
Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3) device open count is 3 (open)
Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3) device open count is 2 (close)
Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3): --> 'AT+CGDCONT=15,"IP",""<CR>'
Apr 27 08:15:21 ModemManager[4251]: <debug> (ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
|
|
As a precursor to a generic load_unlock_retries method, move the
CSIM Response parser from the Telit plugin into the core code.
|
|
|
|
Instead of having a method that returns the expected length after the
conversion and the amount of input UTF-8 characters that couldn't be
converted to the given charset, simplify the logic and just define a
method that returns a boolean specifying whether the conversion is
possible or not.
Also, include unit tests.
|
|
|
|
These tests don't need fixtures, so use the simpler g_test_add_func()
methods to add tests associated to a test path.
|
|
Also:
* define the leading '+' as a escaped value
* allow any number of spaces between '+CCLK' and the string value.
|
|
|
|
|
|
Telit LTE modems could reply to +WS46=? with:
+WS46: (12,22,25,28-31)
This patch extends +WS46=? response parser to support ranges.
|
|
Don't blindly try '+CMER=3,0,0,1' to enable and '+CMER=0' to disable
Mobile Equipment Event Reporting. We now query the device for the
supported formats and use that info to build commands that will work.
|
|
|
|
Instead of having the parser return separate list of supported flow
controls for TE and TA, we simplify it by only returning those
settings that apply to both TE and TA.
This logic isn't perfect either, though, as some settings (e.g. '3' in
TE in some modems, specifying a different XON/XOFF behavior) may not
have a corresponding setting in the other end.
The most common cases we care about (i.e. standard XON/XOFF, RTS/CTS)
should be properly reported with this logic.
|
|
The operator code (MCCMNC) may also be given encoded in the current
charset (e.g. UCS2).
Based on a patch from Colin Helliwell <colin.helliwell@ln-systems.com>
|
|
The method doing the operator name normalization takes as input the
current configured modem charset. If this is UCS2, we will now just
assume this is a hint: the string may or may not come in hex/UCS2.
This logic makes the custom operator name loading in Huawei unneeded,
if the modem is configured in UCS2, we still properly process operator
names coming in plain ASCII.
|
|
We want a parser that returns the full list of combinations found.
|
|
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.
|
|
Added support for 4-digit format years (i.e. YYYY), and also made the
timezone information optional, as per +CSDF in 3GPP TS 27.007.
https://bugs.freedesktop.org/show_bug.cgi?id=95319
|