Commit Graph

1879 Commits

Author SHA1 Message Date
Aleksander Morgado
281f656000 icera: fix warnings with -Wshadow
icera/mm-broadband-modem-icera.c: In function ‘modem_create_bearer’:
  icera/mm-broadband-modem-icera.c:873:42: error: declaration of ‘properties’ shadows a global declaration [-Werror=shadow]
    873 |                      MMBearerProperties *properties,
        |                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  icera/mm-broadband-modem-icera.c:57:20: note: shadowed declaration is here
     57 | static GParamSpec *properties[PROP_LAST];
        |                    ^~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
1e39e2a7dd simtech,helpers: fix warnings with -Wdiscarded-qualifiers
simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_single’:
  simtech/tests/test-modem-helpers-simtech.c:98:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
     98 |         { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }
        |                                                                ^~~~~~~~~~~
  simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_multiple’:
  simtech/tests/test-modem-helpers-simtech.c:113:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    113 |         { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "123456789" },
        |                                                                 ^~~~~~~~~~~
  simtech/tests/test-modem-helpers-simtech.c:114:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    114 |         { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "987654321" },
        |                                                                 ^~~~~~~~~~~
  simtech/tests/test-modem-helpers-simtech.c: In function ‘test_clcc_urc_complex’:
  simtech/tests/test-modem-helpers-simtech.c:130:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    130 |         { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "123456789" },
        |                                                                 ^~~~~~~~~~~
  simtech/tests/test-modem-helpers-simtech.c:131:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    131 |         { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" },
        |                                                                 ^~~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
71afc23261 huawei,helpers: fix warnings with -Wimplicit-fallthrough
huawei/mm-modem-helpers-huawei.c: In function ‘parse_mode_combination_string’:
  huawei/mm-modem-helpers-huawei.c:991:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
    991 |         *preferred = MM_MODEM_MODE_NONE;
        |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
  huawei/mm-modem-helpers-huawei.c:993:5: note: here
    993 |     default:
        |     ^~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
dcce64a116 huawei: fix warnings with -Wsign-compare
huawei/mm-modem-helpers-huawei.c: In function ‘mm_huawei_parse_prefmode_response’:
  huawei/mm-modem-helpers-huawei.c:550:18: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘const unsigned int’} [-Werror=sign-compare]
    550 |         if (mode == combination->prefmode)
        |                  ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
d6c3d8929e huawei,tests: fix warnings with -Wdiscarded-qualifiers
CC       huawei/tests/test_modem_helpers_huawei-test-modem-helpers-huawei.o
  huawei/tests/test-modem-helpers-huawei.c:1176:41: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1176 |     { "^TIME: 14/08/05 04:00:21", TRUE, "2014-08-05T04:00:21" },
        |                                         ^~~~~~~~~~~~~~~~~~~~~
  huawei/tests/test-modem-helpers-huawei.c:1177:43: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   1177 |     { "^TIME: 2014/08/05 04:00:21", TRUE, "2014-08-05T04:00:21" },
        |                                           ^~~~~~~~~~~~~~~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
52e4a6744c cinterion,helpers: fix warnings with -Wdiscarded-qualifiers
CC       cinterion/tests/test_modem_helpers_cinterion-test-modem-helpers-cinterion.o
  cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_single’:
  cinterion/tests/test-modem-helpers-cinterion.c:749:64: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    749 |         { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }
        |                                                                ^~~~~~~~~~~
  cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_multiple’:
  cinterion/tests/test-modem-helpers-cinterion.c:764:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    764 |         { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "123456789" },
        |                                                                 ^~~~~~~~~~~
  cinterion/tests/test-modem-helpers-cinterion.c:765:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    765 |         { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "987654321" },
        |                                                                 ^~~~~~~~~~~
  cinterion/tests/test-modem-helpers-cinterion.c: In function ‘test_slcc_urc_complex’:
  cinterion/tests/test-modem-helpers-cinterion.c:781:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    781 |         { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE,  "123456789" },
        |                                                                 ^~~~~~~~~~~
  cinterion/tests/test-modem-helpers-cinterion.c:782:65: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    782 |         { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "987654321" },
        |
2020-01-31 14:52:49 +01:00
Aleksander Morgado
20c23edb83 altair,helpers: fix warnings with -Wsign-compare
CC       altair/tests/test_modem_helpers_altair_lte-test-modem-helpers-altair-lte.o
  In file included from /usr/lib/glib-2.0/include/glibconfig.h:9,
                   from /usr/include/glib-2.0/glib/gtypes.h:32,
                   from /usr/include/glib-2.0/glib/galloca.h:32,
                   from /usr/include/glib-2.0/glib.h:30,
                   from altair/tests/test-modem-helpers-altair-lte.c:20:
  altair/tests/test-modem-helpers-altair-lte.c: In function ‘test_parse_cid’:
  altair/tests/test-modem-helpers-altair-lte.c:98:58: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
     98 |     g_assert (mm_altair_parse_cid ("%CGINFO:blah", NULL) == -1);
        |                                                          ^~
  /usr/include/glib-2.0/glib/gmacros.h:937:25: note: in definition of macro ‘G_LIKELY’
    937 | #define G_LIKELY(expr) (expr)
        |                         ^~~~
  altair/tests/test-modem-helpers-altair-lte.c:98:5: note: in expansion of macro ‘g_assert’
     98 |     g_assert (mm_altair_parse_cid ("%CGINFO:blah", NULL) == -1);
        |     ^~~~~~~~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
759ab6d94d telit,helpers: fix format of flags built during #BND request generation
We explicitly need 64bit values for 3G flags and 4G flags.
2020-01-31 14:52:49 +01:00
Aleksander Morgado
ee8e81e55c telit,helpers: use correct flag to check caps when building #BND request 2020-01-31 14:52:49 +01:00
Aleksander Morgado
53784f95aa tests,fixture: fix warnings with -Wsign-compare
tests/test-fixture.c:130:28: error: comparison of integer expressions of different signedness: ‘gboolean’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
    130 |         if (modem_expected == n_modems) {
        |                            ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
7655f3b35c telit: fix warnings with -Wdiscarded-qualifiers
telit/tests/test-mm-modem-helpers-telit.c:48:9: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
     48 |         "#BND: (0-3)", TRUE, FALSE, FALSE, FALSE, 4,
        |         ^~~~~~~~~~~~~
  ...
2020-01-31 14:52:49 +01:00
Aleksander Morgado
b0f9ddd295 icera: fix warnings with -Wsign-compare
icera/mm-modem-helpers-icera.c:256:13: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
    256 |         num != expected_cid) {
        |             ^~
2020-01-31 14:52:49 +01:00
Aleksander Morgado
1c078531a0 build: use AX_IS_RELEASE() and AX_COMPILER_FLAGS()
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.
2020-01-30 11:59:14 +01:00
Aleksander Morgado
40e9434cc3 altair-lte: use autoptr support from glib 2020-01-15 18:56:01 +01:00
Aleksander Morgado
88983fd157 cinterion: use common re-registration logic when needed
If the modem requires +COPS re-registration after setting modes,
use the common logic provided by the 3GPP interface, which
already knows e.g. whether the registration was automatic or the
actual requested operator id in case of being manual.
2020-01-06 20:17:08 +00:00
Aleksander Morgado
a1966222e9 ublox: use common re-registration logic when needed
If the modem requires +COPS re-registration after setting bands or
modes, use the common logic provided by the 3GPP interface, which
already knows e.g. whether the registration was automatic or the
actual requested operator id in case of being manual.

This will also make the u-blox plugin use the common +COPS set command
implemented in the broadband modem object, which has the fallback to
use the MCCMNC encoded in the current charset if needed.
2020-01-06 20:17:08 +00:00
Aleksander Morgado
a23040756b novatel-lte: fallback to parent scan method
There is no need to run +COPS=? in the same way as the parent does it,
just fallback to the parent implementation.
2020-01-06 20:17:08 +00:00
Aleksander Morgado
7d1e949137 ublox: ignore error when disconnecting last LTE bearer
This is required in the TOBY-L2 and TOBY-L4 modules in order to report
a proper disconnection, even if there is none in reality. The default
LTE bearer is always reported connected while registered in LTE.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/166
2019-12-16 14:39:22 +01:00
Aleksander Morgado
42aa9cc2f6 ublox: implement support to enable and detect +UUDTMF URCs
Also, make sure we enable/disable the voice related unsolicited events
in both primary and secondary ports, because it may happen that the
primary port is connected with PPP and we're using the secondary port
for control.
2019-12-05 15:48:55 +01:00
Aleksander Morgado
8d96d1d660 cinterion: fix using correct finish() method in AT command
When using mm_base_modem_at_command_full(), the corresponding
mm_base_modem_at_command_full_finish() should be used.
2019-12-05 15:45:38 +01:00
Aleksander Morgado
32d1f1deda sierra: implement manual CDMA activation 2019-12-03 08:43:40 +00:00
Aleksander Morgado
af08492209 sierra: implement automatic CDMA activation 2019-12-03 08:43:39 +00:00
Aleksander Morgado
8fa622ddbb novatel: implement manual CDMA activation
Including IOTA-based update, e.g. for Sprint.
2019-12-03 08:43:39 +00:00
Aleksander Morgado
5712c71593 novatel: implement automatic CDMA activation 2019-12-03 08:43:39 +00:00
Aleksander Morgado
f7418da3bc huawei: avoid using the QCDM port during a voice call 2019-12-02 22:15:53 +00:00
Aleksander Morgado
09080073ff build: setup plugin selection logic 2019-11-27 10:11:43 +00:00
Aleksander Morgado
1d1f597b55 telit: setup as loadable 'shared' utils 2019-11-27 10:11:43 +00:00
Aleksander Morgado
7bcb8c9515 foxconn: setup as loadable 'shared' utils 2019-11-27 10:11:43 +00:00
Aleksander Morgado
fce7892058 xmm: setup as loadable 'shared' utils 2019-11-27 10:11:43 +00:00
Aleksander Morgado
b765e88e57 novatel: setup as loadable 'shared' utils 2019-11-27 10:11:43 +00:00
Aleksander Morgado
2d779b97c4 option: setup as loadable 'shared' utils 2019-11-27 10:11:43 +00:00
Aleksander Morgado
23df25f25c sierra: setup as loadable 'shared' utils 2019-11-27 10:11:43 +00:00
Aleksander Morgado
9907407fd1 mbm: skip setting up as common utils library
The Ericsson MBM modem management is only used by the MBM plugin.
2019-11-27 10:11:43 +00:00
Aleksander Morgado
a6d76cfceb icera: setup as loadable 'shared' utils 2019-11-27 10:11:43 +00:00
Aleksander Morgado
b1c3f1eb1c plugin-manager: dynamically load 'shared' util libraries 2019-11-27 10:11:43 +00:00
Aleksander Morgado
1bd6980510 plugins: add README explaining plugin relationships 2019-11-27 10:11:43 +00:00
Amol Lad
8f4b5b52ee sierra: add port hints for EM7565 modem 2019-11-19 16:01:41 +05:30
Aleksander Morgado
d7d2b9108e foxconn: new plugin to support the T77W968
The Dell DW5821e is really a re-branded Foxconn T77W968.
2019-11-13 12:31:58 +01:00
Aleksander Morgado
ad371cecd1 dell,dw5821e: add support for the DW5821e with eSIM variant
Same port layout as the default one, just a different PID.
2019-11-07 12:30:26 +01:00
Daniele Palmas
c9e603a388 telit: add AT$GPSNMUN description 2019-11-05 15:52:31 +01:00
Krzysztof Drobinski
4a2e907e30 telit: minor coding style fix 2019-11-02 17:34:13 +01:00
Eric Caruso
c79d945073 mm-modem-helpers-telit: fix undefined bitshifts
Since this plugin uses a bitmask to represent bands, we have
to be wary of shifting outside the precision of the bitmask
storage type. In this case, it was possible to generate 1 << 31
in a signed integer type as an intermediate step of B3G_FLAG,
which is undefined behavior (and usually results in INT_MIN,
breaking comparisons with the value).

Bug was reported to the chromium tracker at crbug.com/1019301

Original patch updated by Aleksander Morgado to leave
MM_MODEM_BAND_TELIT_3G_LAST as MM_MODEM_BAND_UTRAN_19, as that is the
highest 3G band supported by the current implementation. Worth noting
that this was not a real bug as the maximum flag we would have been
setting was (1 << 19) anyway.
2019-10-31 15:36:50 +01:00
Aleksander Morgado
e0f0d62369 telit: fix crash if AT$GPSP=? is supported but no GPS data port
We would have been de-referencing a NULL GError.
2019-10-31 15:14:27 +01:00
Aleksander Morgado
5def58d327 telit: minor coding style fixes 2019-10-31 15:12:54 +01:00
Krzysztof Drobinski
eb3f17ddcc telit: Allow enabling GNSS events if NMEA port was detected 2019-10-30 17:53:22 +01:00
Sven Schwermer
da729943b1 quectel: Add port type hints for BG96
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2019-10-30 11:22:19 +01:00
Sven Schwermer
9e63037c5a quectel: Fix port type hints for EG91
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2019-10-30 11:15:23 +01:00
Krzysztof Drobinski
ef30dd800c telit: increase timeout for AT#REBOOT
It was observed that sporadically it may take more than 5 seconds for modem to
respond to AT#REBOOT. Increase the timeout on AT command to not report
unnecessary errors to the user.
2019-10-21 11:40:39 +02:00
Aleksander Morgado
45cf1ba20a cinterion: don't cache voice support check AT commands
The result of these commands may be different before and after SIM-PIN
unlock, so never cache them.
2019-10-17 08:31:46 +00:00
Aleksander Morgado
667d1613a8 x22x: add support for the Alcatel X602D
As discussed in https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/130

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/130
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/129
2019-10-17 09:27:21 +02:00