Age | Commit message (Collapse) | Author |
|
|
|
This will make it slightly easier to port mm_port_serial_at_command() to
use GTask, since we won't have to keep a pointer to the result in GTask
after _finish() has been called.
In most cases the caller needs the value anyway, so this doesn't add too
much hasle.
|
|
GCC 13 is unhappy to cast a MMLogLevel to a guint32:
[188/539] Compiling C object src/plugins/test-shared-icera.p/icera_tests_test-modem-helpers-icera.c.o
In file included from ../src/plugins/icera/tests/test-modem-helpers-icera.c:27:
../src/mm-log-test.h:25:1: warning: conflicting types for ‘_mm_log’ due to enum/integer mismatch; have ‘void(void *, const gchar *, const gchar *, const gchar *, guint32, const gchar *, ...)’ {aka ‘void(void *, const char *, const char *, const char *, unsigned int, const char *, ...)’} [-Wenum-int-mismatch]
25 | _mm_log (gpointer obj,
| ^~~~~~~
In file included from ../src/mm-log-test.h:20:
../src/mm-log.h:61:6: note: previous declaration of ‘_mm_log’ with type ‘void(void *, const gchar *, const gchar *, const gchar *, MMLogLevel, const gchar *, ...)’ {aka ‘void(void *, const char *, const char *, const char *, MMLogLevel, const char *, ...)’}
61 | void _mm_log (gpointer obj,
| ^~~~~~~
That's perfectly fine, just use the enum type directly.
|
|
GCC 13 is unhappy about mixing enums and ints. However, if we fix the
type un mmtty's _mm_log() prototype, the compiler will find something
else to be irritiated about:
[1/2] Compiling C object test/mmtty.p/mmtty.c.o
../test/mmtty.c: In function ‘_mm_log’:
../test/mmtty.c:283:5: warning: enumeration value ‘MM_LOG_LEVEL_MSG’ not handled in switch [-Wswitch-enum]
283 | switch (level) {
| ^~~~~~
[2/2] Linking target test/mmtty
Fix that first.
|
|
|
|
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/483
|
|
Different options are set as `feature`, also every possible plugin,
but this may cause confusion.
All options set as `feature` but plugins have been made `boolean` to
avoid further confusions.
`help2man` is also installed in the CI image because is required to
build different libraries.
|
|
|
|
Use G_GUINT64_FORMAT to properly format a guint64 type.
|
|
../test/lsudev.c: In function ‘println’:
../test/lsudev.c:68:5: warning: function ‘println’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
68 | g_string_append_vprintf (output, fmt, args);
| ^~~~~~~~~~~~~~~~~~~~~~~
|
|
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
|
|
So that we simulate enabling the spew control, as we do during
probing.
|
|
|
|
The _mm_log() implementation provided in 'mm-log-test.h' relies on
g_test_verbose() to decide whether the logs are printed or not. We are
not running under the GTest setup in mmtty, so that would not work
properly.
Just provide a custom _mm_log() method that checks for the
verbose_flag instead.
|
|
|
|
|
|
|
|
So that we can provide the specific object id in every log associated
to a given object.
|
|
mmsmspdu.c: In function ‘show_part_info’:
mmsmspdu.c:86:5: error: enumeration value ‘MM_SMS_ENCODING_UNKNOWN’ not handled in switch [-Werror=switch-enum]
86 | switch (encoding) {
| ^~~~~~
|
|
mmrules.c: In function ‘print_rule’:
mmrules.c:97:13: error: switch missing default case [-Werror=switch-default]
97 | switch (rule_match->type) {
| ^~~~~~
mmrules.c:113:5: error: switch missing default case [-Werror=switch-default]
113 | switch (rule->result.type) {
| ^~~~~~
|
|
lsudev.c: In function ‘println’:
lsudev.c:64:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
64 | for (i = 0; i < indent; i++)
| ^
|
|
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.
|
|
This reverts commit 3eb623e73b546a444c1fc717f4ed105b3b2d5eae.
This change is plain wrong. The correct order was already fixed in
commit 42dab8e8.
|
|
Solving build issues with truly strict linkers, as in:
http://lists.busybox.net/pipermail/buildroot/2019-December/268817.html
|
|
Symbols are resolved forward, so if libhelpers depends on libmm-glib,
it needs to be specified first.
|
|
|
|
The tool monitors SMS message additions and SMS state updates, e.g.:
$ sudo ./test/mmsmsmonitor
[/org/freedesktop/ModemManager1/SMS/0] sms found: received
[/org/freedesktop/ModemManager1/SMS/1] sms found: received
[/org/freedesktop/ModemManager1/SMS/2] sms found: received
[/org/freedesktop/ModemManager1/SMS/3] sms found: received
[/org/freedesktop/ModemManager1/SMS/4] sms found: received
[/org/freedesktop/ModemManager1/SMS/5] sms found: received
[/org/freedesktop/ModemManager1/SMS/6] sms found: received
[/org/freedesktop/ModemManager1/SMS/7] new sms: receiving
[/org/freedesktop/ModemManager1/SMS/7] sms updated: received
|
|
|
|
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.
|
|
Instead of relying on the udev daemon and GUDev to manage the devices reported
by the kernel, we can now run ModemManager relying solely on the kernel events
reported via the new ReportKernelEvent() API. Therefore, the '--no-auto-scan'
option is implicit for the ModemManager daemon when udev is disabled in the
build.
Additionally, a new custom implementation of the kernel device object is
provided, which uses sysfs to load the properties and attributes required in
each kernel device, instead of using a GUdevDevice.
The udev rule files are kept in place, and a simple custom parser is provided
which preloads all rules in memory once and then applies them to the different
kernel objects reported via ReportKernelEvent(), e.g. to set port type hints.
A simple unit test setup is prepared to validate the udev rules during the
`check' Makefile target.
|
|
The mm_base_modem_grab_port() now receives a MMKernelDevice directly from the
plugin, which is then stored in the MMPort corresponding to the port.
This means that we have direct access to e.g. all properties set by udev rules
everywhere, and we don't need additional GUdevClient objects (e.g. like the one
used in the Huawei plugin to detect NDISDUP support during runtime).
For virtual ports (e.g. generated during unit tests), we have a new 'generic'
kernel device object which just provides the values from the kernel device
properties given during its creation.
|
|
We try to combine in common envvars the compiler and linker flags shared by the
different components, and where possible, also re-using the implicit AM_CFLAGS
and AM_LDFLAGS variables that automake provides, and which apply to all objects
being built in the same Makefile.am.
The internal libmodem-helpers.la library is also renamed to libhelpers.la
|
|
|
|
The new tester allows to play with the AT-capable TTY using the same code as
ModemManager itself.
$ sudo ./test/mmtty -d /dev/ttyHS0 --verbose
opening serial port '/dev/ttyHS0'...
(ttyHS0) opening serial port...
(ttyHS0): port attributes not fully set
(ttyHS0) device open count is 1 (open)
flashing serial port '/dev/ttyHS0'...
ready
> AT+GCAP
(ttyHS0): --> 'AT+GCAP<LF><CR>'
(ttyHS0): <-- '<CR><LF>+GCAP: +CGSM,+DS,+ES<CR><LF><CR><LF>OK<CR><LF>'
+GCAP: +CGSM,+DS,+ES
> AT+GMI
(ttyHS0): --> 'AT+GMI<LF><CR>'
(ttyHS0): <-- '<CR><LF>Option N.V.<CR><LF><CR><LF>OK<CR><LF>'
Option N.V.
> ^C
cancelling the main loop...
(ttyHS0) device open count is 0 (close)
(ttyHS0) closing serial port...
(ttyHS0) serial port closed
(ttyHS0) forced to close port
|
|
Old python tests using the old ModemManager interface are removed, as mmcli
provides already a much nicer way to test the DBus interface.
Also, mm-test.py and the PPPD plugin get removed, which were also using the old
interface, and which were not very useful for testing newer non-PPP based
modems.
https://bugzilla.gnome.org/show_bug.cgi?id=702061
|
|
Usage:
mmcli-test-sms [MODEM INDEX] [all|ucs2|gsm7|data] [NUMBER]"
If [NUMBER] is not given, a dummy number will be used and NO SMS will be sent.
If you give a proper [NUMBER], we will try to send the SMS.
|
|
|
|
|
|
Since udev 147 the gudev API is no longer marked as experimental, and therefore
`G_UDEV_API_IS_SUBJECT_TO_CHANGE' is no longer needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Might as well keep it simple.
|
|
|
|
|
|
Python usually uses Unicode, but often the shell encoding
will be in UTF-8, so Python needs some help converting the
message to Unicode. Use LANG to do that if we can.
|