Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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.
|
|
Despite 3GPP TS 23.038 specifies that Unicode SMS messages are
encoded in UCS-2, UTF-16 encoding is commonly used instead on many
modern platforms to allow encoding code points that fall outside the
Basic Multilingual Plane (BMP), such as Emoji.
Update the logic to always use UTF-16 instead of UCS-2 when creating
or parsing PDUs (even if we always report as sending or receiving
UCS-2). For all purposes, UCS-2 is considered a subset of UTF-16
(assuming that code points out of the [U+0000,U+D7FF] and
[U+E000,U+FFFF] ranges are not applicable in UCS-2).
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/250
|
|
Just as an implementation detail to be taken as an extension of
UCS2BE, never really to be used as a real modem charset.
|
|
The iconv() operation would fail because we wouldn't give any proper
charset string to convert to/from. Use our custom GSM encoding support
instead.
|
|
|
|
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.
|
|
test-qcdm-serial-port.c: In function 'wait_for_child':
test-qcdm-serial-port.c:57:52: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (d->child && (now.tv_sec - start.tv_sec > timeout)) {
^
|
|
|
|
|
|
The generic CREG parser is improved to also allow parsing +C5GREG
responses and URCs.
|
|
This fixes the s8500 wave unit test, which was incorrectly parsing the
Act field reported as 'B' as "GSM" (strtol(B)=0)
Also, given that the generic parsing methods are able to parse numbers
from quoted strings, this change allows us to remove the Thuraya
specific CREG matching that just took into consideration quoted
strings. The Thuraya unit tests are also fixed up to provide proper
testing of the logic.
|
|
We already support "SMS only" registration state.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|