Commit Graph

7680 Commits

Author SHA1 Message Date
Aleksander Morgado
64f18f036b build: require libqmi 1.30.2
We need the new "Get All Call Info" request support.
2021-09-08 11:57:59 +02:00
Aleksander Morgado
2e44a5921b build,meson: add sms-c examples to build 2021-09-08 11:43:55 +02:00
Aleksander Morgado
86421f06bd examples: new SMS sending example in C using the async API 2021-09-08 11:21:45 +02:00
Aleksander Morgado
ccc7989324 examples: new SMS sending example in C using the sync API 2021-09-08 11:21:45 +02:00
Aleksander Morgado
34e671f41c broadband-modem-qmi: don't error out on empty call list
Only error out if the required TLVs are missing.
2021-09-08 10:26:04 +02:00
Aleksander Morgado
f2901446e0 iface-modem-voice: avoid warning with -Wincompatible-pointer-types
../src/mm-iface-modem-voice.c: In function ‘mm_iface_modem_voice_reload_all_calls’:
  ../src/mm-iface-modem-voice.c:2549:64: warning: passing argument 2 of ‘((MMIfaceModemVoice *)g_type_interface_peek((void *)((GTypeInstance *)self)->g_class,  mm_iface_modem_voice_get_type()))->load_call_list’ from incompatible pointer type [-Wincompatible-pointer-types]
   2549 |                                                                reload_all_calls_ready,
        |                                                                ^~~~~~~~~~~~~~~~~~~~~~
        |                                                                |
        |                                                                void (*)(MMIfaceModemVoice *, GAsyncResult *, GTask *) {aka void (*)(struct _MMIfaceModemVoice *, struct _GAsyncResult *, struct _GTask *)}
  ../src/mm-iface-modem-voice.c:2549:64: note: expected ‘GAsyncReadyCallback’ {aka ‘void (*)(struct _GObject *, struct _GAsyncResult *, void *)’} but argument is of type ‘void (*)(MMIfaceModemVoice *, GAsyncResult *, GTask *)’ {aka ‘void (*)(struct _MMIfaceModemVoice *, struct _GAsyncResult *, struct _GTask *)’}
2021-09-08 10:14:26 +02:00
Aleksander Morgado
03b75c85d0 broadband-modem-qmi: refactor process_get_all_call_info() to avoid handling the GTask
The process_get_all_call_info() was not completing the input GTask on
every possible code path (e.g. when remote party number or call info
wasn't available).

The method is now updated to avoid processing the GTask itself,
instead it will attempt to build the call list and return a GError on
any kind of failure.
2021-09-08 10:12:20 +02:00
Dylan Van Assche
15d66197b3 mm-broadband-modem-qmi: add AT URCs fall back for calls
Enable AT URCs for calls on top of QMI Voice indications
for AT+QMI devices only. Some AT+QMI devices send unreliable
QMI indications when the host is resuming. In such cases,
AT URCs can be used as a fall back to make calls reliable.

While AT+QMI devices relied before on AT commands to load
call list information and handle AT URCs for async updates,
this is now handled through QMI by forcefully reloading the
call list instead of processing the AT URCs.
This approach is disabled by default through the
MM_IFACE_MODEM_VOICE_INDICATION_CALL_LIST_RELOAD_ENABLED property.
This property is set to true in case of QMI modems.
2021-09-08 10:02:51 +02:00
Dylan Van Assche
92ad38432c mm-modem-helpers: only parse calls in voice mode
Calls in a CLCC response in data-only or fax-only mode
do not count as actuall calls.
2021-09-08 07:59:16 +00:00
Aleksander Morgado
97d15c49a3 build,meson: add missing Call object support in introspection 2021-09-07 10:55:43 +00:00
Aleksander Morgado
b72069395b build,autotools: add missing Call object support in introspection 2021-09-07 10:55:43 +00:00
Aleksander Morgado
145bbb4010 test,lsudev: add attribute format to println()
../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);
        |     ^~~~~~~~~~~~~~~~~~~~~~~
2021-09-07 10:55:43 +00:00
Aleksander Morgado
ba5ad78ed9 libmm-glib,location-3gpp: remove unused variable
../libmm-glib/mm-location-3gpp.c: In function ‘mm_location_3gpp_new_from_string_variant’:
  ../libmm-glib/mm-location-3gpp.c:400:16: warning: unused variable ‘operator_code’ [-Wunused-variable]
    400 |         gchar *operator_code;
        |                ^~~~~~~~~~~~~
2021-09-07 10:55:43 +00:00
Aleksander Morgado
f8bf6673db libmm-glib,3gpp-profile: fix profile comparison logic
Conveniently warned by the compiler...

  ../libmm-glib/mm-3gpp-profile.c: In function ‘mm_3gpp_profile_cmp’:
  ../libmm-glib/mm-3gpp-profile.c:98:1: warning: control reaches end of non-void function [-Wreturn-type]
     98 | }
        | ^
2021-09-07 10:55:43 +00:00
Aleksander Morgado
12ada44156 libmm-glib,simple-status: avoid shadowing 'properties' variable
../libmm-glib/mm-simple-status.c: In function ‘mm_simple_status_new_from_dictionary’:
  ../libmm-glib/mm-simple-status.c:426:21: warning: declaration of ‘properties’ shadows a global declaration [-Wshadow]
    426 |     MMSimpleStatus *properties;
        |                     ^~~~~~~~~~
  ../libmm-glib/mm-simple-status.c:55:20: note: shadowed declaration is here
     55 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2021-09-07 10:55:43 +00:00
Aleksander Morgado
93a0476b4d libmm-glib,manager: fix warning with -Wdiscarded-qualifiers
In file included from /usr/include/glib-2.0/glib.h:50,
                   from ../libmm-glib/mm-common-helpers.h:18,
                   from ../libmm-glib/mm-manager.c:27:
  /usr/include/glib-2.0/glib/ghash.h:68:61: note: expected ‘gpointer’ {aka ‘void *’} but argument is of type ‘const char *’
     68 |                                             gpointer        key,
        |                                             ~~~~~~~~~~~~~~~~^~~
  ../libmm-glib/mm-manager.c:81:43: warning: passing argument 2 of ‘g_hash_table_insert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     81 |         g_hash_table_insert (lookup_hash, "org.freedesktop.ModemManager1.Modem.Simple",                   GSIZE_TO_POINTER (MM_TYPE_MODEM_SIMPLE));
        |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /usr/include/glib-2.0/glib.h:50,
                   from ../libmm-glib/mm-common-helpers.h:18,
                   from ../libmm-glib/mm-manager.c:27:
2021-09-07 10:55:43 +00:00
Aleksander Morgado
5fc5c8ba18 build,meson: fix wrong install of simtech port types on thuraya plugin 2021-09-07 10:55:43 +00:00
Aleksander Morgado
7060962c0a build,meson: ignore warnings for missing field initializers
We would usually explicitly skip initializing fields that are going to
be zero-ed anyway.
2021-09-07 10:55:43 +00:00
Aleksander Morgado
2c8cab3670 build,meson: disable float comparison warnings
We have several symbols defined as floating point numbers that
identify "unknown" values, e.g. MM_LOCATION_LONGITUDE_UNKNOWN. We want
to be able to compare with those values directly, even if they're
floats.
2021-09-07 10:55:43 +00:00
Aleksander Morgado
2bb699fc96 meson: introspection support enabled by default 2021-09-07 10:55:43 +00:00
Iñigo Martínez
77d1c24361 build: Port to meson
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.
2021-09-07 10:55:43 +00:00
Teemu Ikonen
fa19b2b9b1 cli, location: Fix multi-sentence NMEA message output
Multi-sentence NMEA messages were printed as is, that is with
linebreaks, which made mmcli --location-get output look broken.

Split NMEA sentences with linebreaks to separate output list items, so
that they line up correctly.
2021-09-01 15:50:38 +00:00
Aleksander Morgado
7177eeea99 build: use WITH_QRTR exclusively to check for QRTR support
The user may request to disable QRTR support using `--without-qrtr`
even if libqmi has QRTR support.
2021-08-31 15:33:15 +02:00
Teemu Ikonen
d6dafe5cb4 location-gps-nmea: Fix handling of multi-sentence NMEA messages
Fixes the regexp in check_append_or_replace() to accept

 1. more multi-sentence NMEA messages (ALM, GSV, RTE, SFI)
 2. multi-sentence NMEA messages from all talkers, not just GPS
    (i.e. GPGSV, GLGSV, GAGSV etc.)
2021-08-30 06:49:59 +00:00
Andrew Lassalle
5af93dbfee broadband-modem-mbim: Fix password on initial EPS bearer settings
Currently, we are sending the username twice instead of username and
password. Fix the password value.
2021-08-27 09:42:15 -07:00
Aleksander Morgado
a20f2c0523 AUTHORS: update for 1.18.0 2021-08-10 00:01:01 +02:00
Aleksander Morgado
a41d6f6b15 NEWS: fix required libmbim version in 1.18 2021-08-09 23:52:36 +02:00
Aleksander Morgado
c04b43a67e build: bump version to 1.17.900 (1.18-rc1) 2021-08-09 23:04:05 +02:00
Aleksander Morgado
2a59ba7b1a NEWS: update for 1.18.0 2021-08-09 23:03:39 +02:00
Aleksander Morgado
686e37ff84 api: remove Modem.Sar interface
There is no real implementation for it yet, so let's recover these
changes once 1.18 has been released.
2021-08-09 23:03:23 +02:00
Aleksander Morgado
30e94927e7 build: require libqmi 1.30.0 2021-08-09 22:48:06 +02:00
Aleksander Morgado
55fd225be8 build: require libmbim 1.26.0 2021-08-09 22:48:06 +02:00
Aleksander Morgado
965c43fec7 port-qmi: limit MTU to max RMNET packet size
The maximum MTU that the master interface can support should be less
or equal than RMNET_MAX_PACKET_SIZE, as defined in the
`rmnet_private.h` file in the linux sources (not a public header).

Only applicable to RMNET link management (i.e. not to qmi_wwan
add_mux/del_mux).

Fixes https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/71
2021-08-09 12:22:26 +00:00
Aleksander Morgado
5adc469701 port-qmi: only consider port setup not needed if data modes match
When not requesting multiplexing support, only assume we don't need
any additional setup if multiplexing is disabled AND if the data modes
match between kernel and device.

This fixes the connection setup in MSM8916 (rpmsg+bam/dmux).
2021-08-09 12:22:26 +00:00
Aleksander Morgado
185e492c0a core: new '--test-multiplex-requested' option
The new option will change the default setting in MBIM and QMI bearers
to "request" when no explicit "multiplex" configuration is given by
the user.

This option will help test the multiplexing support in the modems
before it's made a default in a future release.
2021-08-09 12:22:26 +00:00
Aleksander Morgado
c49f3f5f46 bearer-qmi: don't enable multiplexing by default unless in IPA
The next 1.18 release will have multiplexing support, but not enabled
by default, to avoid breaking setups that don't expect the new virtual
net interfaces for the multiplexed sessions.

The exception is Qualcomm SoCs using the IPA driver, where
multiplexing is fully required.
2021-08-09 12:22:26 +00:00
Aleksander Morgado
0628514239 bearer-mbim: don't enable multiplexing by default
The next 1.18 release will have multiplexing support, but not enabled
by default, to avoid breaking setups that don't expect the new virtual
net interfaces for the multiplexed sessions.
2021-08-09 12:22:26 +00:00
Aleksander Morgado
168ec6ba09 broadband-bearer: default to 'none' if no multiplexing config provided 2021-08-09 12:22:26 +00:00
Aleksander Morgado
8d019a399c base-bearer: remove default multiplex support symbol
Using "requested" as a common default for every possible
implementation works, because it can handle setups without
multiplexing capabilities (e.g. plain AT+PPP modems) and also setups
without non-multiplexing capabilities (e.g. IPA based SoCs).

But if we don't want "requested" as default, then there will be
failing cases; e.g. we cannot use "none" as default for all as it
would break IPA, and we cannot use "required" as default for all as it
would break AT+PPP setups.

So, remove the common default, it's not flexible enough.
2021-08-09 12:22:26 +00:00
Aleksander Morgado
4a07ab39f1 broadband-modem-qmi: fix max bearers computation in IPA based setups
In IPA based setups, there are only multiplexed bearers supported,
there is no way to not enable multiplexing.

We change the logic that computes the maximum number of multiplexed
and non-multiplexed bearers, so that we check which are the current
kernel data modes before computing them.
2021-08-09 12:22:26 +00:00
Aleksander Morgado
04dba846c9 bearer-list: if non-multiplexing not supported, 0 max non-multiplexed bearers 2021-08-09 12:22:26 +00:00
Aleksander Morgado
9d2782cc5a bearer-list: if multiplexing not supported, 0 max multiplexed bearers
Fixes warnings on AT+PPP based devices:

   ModemManager[602870]: <debug> [1626948725.168355] [modem0] allowed up to 1 active bearers

   (ModemManager:602870): GLib-GObject-WARNING **: 12:12:05.185: value "0" of type 'guint' is invalid or out of range for property 'max-active-multiplexed-bearers' of type 'guint'
2021-08-09 12:22:26 +00:00
Freedom Liu
f720467016 foxconn: add T99W175 carrier mapping table 2021-08-09 17:47:27 +08:00
Freedom Liu
10521ce248 foxconn: update T77W968 carrier mapping table 2021-08-09 15:40:03 +08:00
Freedom Liu
33e2b023ef foxconn: Rename carrier-mapping to t77w968-carrier-mapping 2021-08-09 15:37:22 +08:00
Aleksander Morgado
180bd63381 ci: switch to build libqrtr-glib from git using meson 2021-08-06 10:47:13 +02:00
Aleksander Morgado
7eb6495c48 ci: switch to build libqmi from git using meson 2021-08-06 10:19:29 +02:00
Aleksander Morgado
b77c15f8b5 broadband-modem-mbim: minor rework in SIM event related comments 2021-08-04 14:21:44 +02:00
Aleksander Morgado
bcf5f2bc8b broadband-modem-mbim: also report as available not fully ready SIMs
If a SIM card is not fully ready or in a failed state in the
non-active slot, we should still report them as available.
2021-08-04 14:21:39 +02:00
ZhangMingjie
3004e99fcb broadband-modem-mbim: deal with the slot info status notification event for DSSA 2021-08-04 11:02:43 +02:00