New upstream version 1.14.6

parent 06dd812c
This diff is collapsed.
ModemManager 1.14.6
-------------------------------------------
This is a new bugfix release of ModemManager.
* QMI:
** Fix missing GError initialization.
* plugins:
** xmm: fix missing GError initialization.
** cinterion: fix missing GError initialization.
** simtech: fix missing GError initialization.
ModemManager 1.14.4
-------------------------------------------
This is a new bugfix release of ModemManager.
* Location interface:
** Allow cell ID only updates.
* Messaging interface:
** Fixed memory leak when SMS parts being processed but device goes away.
** Fixed CDMA SMS UTF-8 translation.
** Allow sending UTF-16 as if it were UCS-2.
* QMI:
** Increased port probing timeout to 25s.
** Return error in facility locks loading if PIN status check fails.
** Return FIXED_DIALING lock status when checking PIN2.
* MBIM:
** Don't fail IPv4 connection if IPv4v6 was requested.
* Plugins:
** telit: new ID_MM_TELIT_PORT_DELAY tag to flag devices that require
extended AT probing.
** telit: added FN980 and LM9x0 MBIM compositions rules.
** telit: fixed LM9x0 udev rules.
** cinterion: configure the PLAS9 to correctly send URCs.
** simtech: add SIM7070/SIM7080/SIM7090 port type hints
* i18n:
** Updated Swedish and Slovak translations.
** Updated package bugreport to use the gitlab issues URL.
* Several other minor improvements and fixes.
ModemManager 1.14.2
-------------------------------------------
This is a new bugfix release of ModemManager.
* Modem interface:
** Avoid connection status flapping if briefly unregistered.
* QMI:
** Fixed parsing of USSD indications with UTF-16 data.
** Perform network registration using SSSP if possible, so that settings like
allowed modes are not silently modified.
** Fixed connection sequence so that early attempt aborts end up correctly
releasing network handles that may have been allocated already.
* Plugins:
** telit: added port type hints for the default MEx10G1 composition.
** quectel: added port type hints for the Quectel 5G RM500.
** quectel: added support for MBIM devices.
** cinterion: increased SWWAN connection attempt timeout to 120s.
** cinterion: if user OR password given, don't set the other as (null).
** cinterion: quote user/password strings in AT^SGAUTH calls.
** cinterion: support ^SGAUTH syntax in IMT family.
** cinterion: ignore ^SYSSTART URC.
** cinterion: simplify parsing of radio/band single SCFG line.
** cinterion: remove limitation to IPv4 only PDP contexts.
* Several other minor improvements and fixes.
ModemManager 1.14.0
-------------------------------------------
This is a new stable release of ModemManager.
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ModemManager 1.14.0.
# Generated by GNU Autoconf 2.69 for ModemManager 1.14.6.
#
# Report bugs to <modemmanager-devel@lists.freedesktop.org>.
# Report bugs to <https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
......@@ -275,10 +275,11 @@ fi
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: modemmanager-devel@lists.freedesktop.org about your
$0: system, including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
$0: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
$0: have one."
fi
exit 1
fi
......@@ -590,9 +591,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ModemManager'
PACKAGE_TARNAME='ModemManager'
PACKAGE_VERSION='1.14.0'
PACKAGE_STRING='ModemManager 1.14.0'
PACKAGE_BUGREPORT='modemmanager-devel@lists.freedesktop.org'
PACKAGE_VERSION='1.14.6'
PACKAGE_STRING='ModemManager 1.14.6'
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues'
PACKAGE_URL=''
# Factoring default headers for most tests.
......@@ -1607,7 +1608,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ModemManager 1.14.0 to adapt to many kinds of systems.
\`configure' configures ModemManager 1.14.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1677,7 +1678,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ModemManager 1.14.0:";;
short | recursive ) echo "Configuration of ModemManager 1.14.6:";;
esac
cat <<\_ACEOF
......@@ -1850,7 +1851,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <modemmanager-devel@lists.freedesktop.org>.
Report bugs to <https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues>.
_ACEOF
ac_status=$?
fi
......@@ -1913,7 +1914,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ModemManager configure 1.14.0
ModemManager configure 1.14.6
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2072,9 +2073,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## ------------------------------------------------------- ##
## Report this to modemmanager-devel@lists.freedesktop.org ##
## ------------------------------------------------------- ##"
( $as_echo "## ---------------------------------------------------------------------------------- ##
## Report this to https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues ##
## ---------------------------------------------------------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
......@@ -2282,7 +2283,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ModemManager $as_me 1.14.0, which was
It was created by ModemManager $as_me 1.14.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3146,7 +3147,7 @@ fi
# Define the identity of the package.
PACKAGE='ModemManager'
VERSION='1.14.0'
VERSION='1.14.6'
cat >>confdefs.h <<_ACEOF
......@@ -15671,8 +15672,8 @@ fi
MM_MAJOR_VERSION=1
MM_MINOR_VERSION=14
MM_MICRO_VERSION=0
MM_VERSION=1.14.0
MM_MICRO_VERSION=6
MM_VERSION=1.14.6
......@@ -21831,7 +21832,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ModemManager $as_me 1.14.0, which was
This file was extended by ModemManager $as_me 1.14.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -21891,13 +21892,13 @@ $config_headers
Configuration commands:
$config_commands
Report bugs to <modemmanager-devel@lists.freedesktop.org>."
Report bugs to <https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ModemManager config.status 1.14.0
ModemManager config.status 1.14.6
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -6,7 +6,7 @@ dnl
m4_define([mm_major_version], [1])
m4_define([mm_minor_version], [14])
m4_define([mm_micro_version], [0])
m4_define([mm_micro_version], [6])
m4_define([mm_version],
[mm_major_version.mm_minor_version.mm_micro_version])
......@@ -25,7 +25,10 @@ m4_define([mm_glib_lt_age], [6])
dnl-----------------------------------------------------------------------------
dnl autoconf, automake, libtool initialization
dnl
AC_INIT([ModemManager],[mm_version],[modemmanager-devel@lists.freedesktop.org],[ModemManager])
AC_INIT([ModemManager],
[mm_version],
[https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues],
[ModemManager])
AM_INIT_AUTOMAKE([1.11.2 subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
......
......@@ -215,6 +215,8 @@
<description>Query network time and timezone information</description>
<description xml:lang="uk">Надсилання запиту щодо часу і часового поясу мережі</description>
<description xml:lang="tr">Ağ zaman ve saat dilimi bilgisini sorgula</description>
<description xml:lang="sv">Fråga efter nätverkstid och tidzonsinformation</description>
<description xml:lang="sk">Požadovanie informácií o sieťovom čase a časovej zóne</description>
<description xml:lang="ru">Запрос информации о времени и часовых поясах в сети</description>
<description xml:lang="pt_BR">Consultar informações de hora e fuso horário da rede</description>
<description xml:lang="pl">Odpytywanie informacji o czasie sieciowym i strefie czasowej</description>
......@@ -223,6 +225,8 @@
<message>System policy prevents querying network time information.</message>
<message xml:lang="uk">Правила системи забороняють надсилання запитів щодо часу мережі.</message>
<message xml:lang="tr">Sistem ilkesi ağ zaman bilgisini sorgulamayı engelliyor.</message>
<message xml:lang="sv">En systempolicy förhindrar frågande av nätverkstidsinformation.</message>
<message xml:lang="sk">Politika systému zabraňuje požadovaniu informácií o sieťovom čase.</message>
<message xml:lang="ru">Системная политика запрещает запрашивать информацию о времени в сети.</message>
<message xml:lang="pt_BR">A política de sistema impede de consultar informações de horário da rede.</message>
<message xml:lang="pl">Ustawienia systemu uniemożliwiają odpytywanie informacji o czasie sieciowym.</message>
......@@ -280,7 +284,7 @@
<description xml:lang="zh_CN">查询和利用网络信息和服务</description>
<description xml:lang="uk">Надіслати запит і використати дані щодо мережі і служби</description>
<description xml:lang="tr">Ağ bilgisi ve hizmetleri sorgula ve yararlan</description>
<description xml:lang="sv">Fråga och nyttja nätverksinformation och tjänster</description>
<description xml:lang="sv">Fråga efter och nyttja nätverksinformation och tjänster</description>
<description xml:lang="sk">Požadovanie a spracovanie sieťových informácií a služieb</description>
<description xml:lang="ru">Запрос, использование сетевой информации и услуг</description>
<description xml:lang="pt_BR">Consultar ou utilizar serviços e informações de rede.</description>
......@@ -322,7 +326,7 @@
<description xml:lang="zh_CN">在移动宽带设备上查询和管理固件</description>
<description xml:lang="uk">Опитування та керування мікропрограмою на пристрої мобільної широкосмугової мережі</description>
<description xml:lang="tr">Mobil geniş bant aygıtındaki donanım yazılımını sorgula ve yönet</description>
<description xml:lang="sv">Fråga och hantera fast programvara för en mobil bredbandsenhet</description>
<description xml:lang="sv">Fråga efter och hantera fast programvara för en mobil bredbandsenhet</description>
<description xml:lang="sk">Požadovanie a správa firmvéru mobilného širokopásmového zariadenia</description>
<description xml:lang="ru">Запрос и управление прошивкой на мобильном широкополосном устройстве</description>
<description xml:lang="pt_BR">Consultar e gerenciar firmware em um dispositivo de banda larga móvel</description>
......
......@@ -647,11 +647,11 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@ENABLE_GTK_DOC_FALSE@maintainer-clean-local:
@ENABLE_GTK_DOC_FALSE@install-data-local:
@ENABLE_GTK_DOC_FALSE@distclean-local:
@ENABLE_GTK_DOC_FALSE@clean-local:
@ENABLE_GTK_DOC_FALSE@uninstall-local:
@ENABLE_GTK_DOC_FALSE@distclean-local:
@ENABLE_GTK_DOC_FALSE@install-data-local:
@ENABLE_GTK_DOC_FALSE@maintainer-clean-local:
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
......
......@@ -136,7 +136,7 @@ is compiled against.</p>
<hr>
<div class="refsect2">
<a name="MM-MICRO-VERSION:CAPS"></a><h3>MM_MICRO_VERSION</h3>
<pre class="programlisting">#define MM_MICRO_VERSION (0)
<pre class="programlisting">#define MM_MICRO_VERSION (6)
</pre>
<p>Evaluates to the micro version number of ModemManager which this source
compiled against.</p>
......
......@@ -36,7 +36,7 @@
</div>
</div></div>
<div><p class="releaseinfo">
For ModemManager version 1.14.0
For ModemManager version 1.14.6
</p></div>
<div><p class="copyright">Copyright © 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 The ModemManager Authors</p></div>
......
......@@ -625,11 +625,11 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@ENABLE_GTK_DOC_FALSE@install-data-local:
@ENABLE_GTK_DOC_FALSE@maintainer-clean-local:
@ENABLE_GTK_DOC_FALSE@uninstall-local:
@ENABLE_GTK_DOC_FALSE@clean-local:
@ENABLE_GTK_DOC_FALSE@distclean-local:
@ENABLE_GTK_DOC_FALSE@clean-local:
@ENABLE_GTK_DOC_FALSE@maintainer-clean-local:
@ENABLE_GTK_DOC_FALSE@install-data-local:
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
......
......@@ -26,7 +26,7 @@
          </p></div></div>
</div></div></div>
<div><p class="releaseinfo">
For libmm-glib version 1.14.0
For libmm-glib version 1.14.6
</p></div>
<div><p class="copyright">Copyright © 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 The ModemManager Authors</p></div>
......
......@@ -56,7 +56,7 @@
*
* Since: 1.0
*/
#define MM_MICRO_VERSION (0)
#define MM_MICRO_VERSION (6)
/**
* MM_CHECK_VERSION:
......
......@@ -243,8 +243,9 @@ mm_location_gps_nmea_get_string_variant (MMLocationGpsNmea *self)
g_return_val_if_fail (MM_IS_LOCATION_GPS_NMEA (self), NULL);
traces = mm_location_gps_nmea_get_traces (self);
built = g_strjoinv ("\r\n", traces);
return g_variant_ref_sink (g_variant_new_string (built));
if (traces)
built = g_strjoinv ("\r\n", traces);
return g_variant_ref_sink (g_variant_new_string (built ? built : ""));
}
/*****************************************************************************/
......
......@@ -1155,8 +1155,6 @@ endif
if ENABLE_PLUGIN_QUECTEL
dist_udevrules_DATA += quectel/77-mm-quectel-port-types.rules
pkglib_LTLIBRARIES += libmm-plugin-quectel.la
libmm_plugin_quectel_la_SOURCES = \
quectel/mm-plugin-quectel.c \
......@@ -1178,6 +1176,9 @@ libmm_plugin_quectel_la_CPPFLAGS = \
$(NULL)
libmm_plugin_quectel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
dist_udevrules_DATA += quectel/77-mm-quectel-port-types.rules
AM_CFLAGS += -DTESTUDEVRULESDIR_QUECTEL=\"${srcdir}/quectel\"
endif
################################################################################
......@@ -1196,7 +1197,7 @@ libmm_plugin_samsung_la_SOURCES = \
libmm_plugin_samsung_la_CPPFLAGS = \
$(PLUGIN_COMMON_COMPILER_FLAGS) \
$(ICERA_COMMON_COMPILER_FLAGS) \
-DMM_MODULE_NAME=\"samsumg\" \
-DMM_MODULE_NAME=\"samsung\" \
$(NULL)
libmm_plugin_samsung_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
......
This diff is collapsed.
......@@ -25,9 +25,11 @@ ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005b", ENV{ID_MM_CINTERION_MODEM_FAM
# PLS62 family non-mbim enumeration
# ttyACM0 (if #0): AT port
# ttyACM1 (if #2): AT port
# ttyACM2 (if #4): unknown
# ttyACM2 (if #4): can be AT or GNSS in some models, best left ignored
# ttyACM3 (if #6): unknown
# ttyACM4 (if #8): unknown
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005b", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005b", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005b", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005b", ENV{.MM_USBIFNUM}=="06", ENV{ID_MM_PORT_IGNORE}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005b", ENV{.MM_USBIFNUM}=="08", ENV{ID_MM_PORT_IGNORE}="1"
......@@ -35,12 +37,12 @@ ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005b", ENV{.MM_USBIFNUM}=="08", ENV{
# PLS62 family mbim enumeration
# ttyACM0 (if #0): AT port
# ttyACM1 (if #2): AT port
# ttyACM2 (if #4): AT port
# ttyACM2 (if #4): can be AT or GNSS in some models, best left ignored
# ttyACM3 (if #6): unknown
# ttyACM4 (if #8): unknown
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005d", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005d", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005d", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005d", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005d", ENV{.MM_USBIFNUM}=="06", ENV{ID_MM_PORT_IGNORE}="1"
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="005d", ENV{.MM_USBIFNUM}=="08", ENV{ID_MM_PORT_IGNORE}="1"
......
......@@ -197,18 +197,24 @@ parse_auth_type (MMBearerAllowedAuth mm_auth)
}
}
/* AT^SGAUTH=<cid>[, <auth_type>[, <passwd>, <user>]] */
/* Cinterion authentication is done with the command AT^SGAUTH,
whose syntax depends on the modem family, as follow:
- AT^SGAUTH=<cid>[, <auth_type>[, <user>, <passwd>]] for the IMT family
- AT^SGAUTH=<cid>[, <auth_type>[, <passwd>, <user>]] for the rest */
static gchar *
build_auth_string (MMBroadbandBearerCinterion *self,
MMCinterionModemFamily modem_family,
MMBearerProperties *config,
guint cid)
{
const gchar *user;
const gchar *passwd;
gboolean has_user;
gboolean has_passwd;
MMBearerAllowedAuth auth;
BearerCinterionAuthType encoded_auth = BEARER_CINTERION_AUTH_UNKNOWN;
gboolean has_user;
gboolean has_passwd;
const gchar *user;
const gchar *passwd;
g_autofree gchar *quoted_user = NULL;
g_autofree gchar *quoted_passwd = NULL;
user = mm_bearer_properties_get_user (config);
passwd = mm_bearer_properties_get_password (config);
......@@ -222,6 +228,8 @@ build_auth_string (MMBroadbandBearerCinterion *self,
if (encoded_auth == BEARER_CINTERION_AUTH_NONE) {
if (has_user || has_passwd)
mm_obj_warn (self, "APN user/password given but 'none' authentication requested");
if (modem_family == MM_CINTERION_MODEM_FAMILY_IMT)
return g_strdup_printf ("^SGAUTH=%u,%d,\"\",\"\"", cid, encoded_auth);
return g_strdup_printf ("^SGAUTH=%u,%d", cid, encoded_auth);
}
......@@ -236,7 +244,21 @@ build_auth_string (MMBroadbandBearerCinterion *self,
encoded_auth = BEARER_CINTERION_AUTH_PAP;
}
return g_strdup_printf ("^SGAUTH=%u,%d,%s,%s", cid, encoded_auth, passwd, user);
quoted_user = mm_port_serial_at_quote_string (user ? user : "");
quoted_passwd = mm_port_serial_at_quote_string (passwd ? passwd : "");
if (modem_family == MM_CINTERION_MODEM_FAMILY_IMT)
return g_strdup_printf ("^SGAUTH=%u,%d,%s,%s",
cid,
encoded_auth,
quoted_user,
quoted_passwd);
return g_strdup_printf ("^SGAUTH=%u,%d,%s,%s",
cid,
encoded_auth,
quoted_passwd,
quoted_user);
}
/******************************************************************************/
......@@ -376,7 +398,6 @@ dial_3gpp_context_step (GTask *task)
case DIAL_3GPP_CONTEXT_STEP_FIRST: {
MMBearerIpFamily ip_family;
/* Only IPv4 supported by this bearer implementation for now */
ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (ctx->self)));
if (ip_family == MM_BEARER_IP_FAMILY_NONE || ip_family == MM_BEARER_IP_FAMILY_ANY) {
gchar *ip_family_str;
......@@ -387,20 +408,17 @@ dial_3gpp_context_step (GTask *task)
g_free (ip_family_str);
}
if (ip_family != MM_BEARER_IP_FAMILY_IPV4) {
g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Only IPv4 is supported by this modem");
g_object_unref (task);
return;
}
ctx->step++;
} /* fall through */
case DIAL_3GPP_CONTEXT_STEP_AUTH: {
gchar *command;
command = build_auth_string (self, mm_base_bearer_peek_config (MM_BASE_BEARER (ctx->self)), ctx->cid);
command = build_auth_string (self,
mm_broadband_modem_cinterion_get_family (MM_BROADBAND_MODEM_CINTERION (ctx->modem)),
mm_base_bearer_peek_config (MM_BASE_BEARER (ctx->self)),
ctx->cid);
if (command) {
mm_obj_dbg (self, "dial step %u/%u: authenticating...", ctx->step, DIAL_3GPP_CONTEXT_STEP_LAST);
/* Send SGAUTH write, if User & Pass are provided.
......@@ -433,7 +451,7 @@ dial_3gpp_context_step (GTask *task)
mm_base_modem_at_command_full (ctx->modem,
ctx->primary,
command,
90,
180,
FALSE,
FALSE,
NULL,
......
......@@ -88,6 +88,8 @@ struct _MMBroadbandModemCinterionPrivate {
GArray *cnmi_supported_ds;
GArray *cnmi_supported_bfr;
/* ignore regex */
GRegex *sysstart_regex;
/* +CIEV indications as configured via AT^SIND */
GRegex *ciev_regex;
......@@ -105,6 +107,14 @@ struct _MMBroadbandModemCinterionPrivate {
MMBaseModemAtCommandAlloc *cmds;
};
MMCinterionModemFamily
mm_broadband_modem_cinterion_get_family (MMBroadbandModemCinterion * modem)
{
g_assert_nonnull (modem);
return modem->priv->modem_family;
}
/*****************************************************************************/
/* Enable unsolicited events (SMS indications) (Messaging interface) */
......@@ -795,17 +805,17 @@ sind_psinfo_enable_ready (MMBaseModem *_self,
}
static void
parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *_self,
GAsyncResult *res,
GTask *task)
set_urc_dest_port_ready (MMBaseModem *_self,
GAsyncResult *res,
GTask *task)
{
MMBroadbandModemCinterion *self;
g_autoptr(GError) error = NULL;
self = MM_BROADBAND_MODEM_CINTERION (_self);
if (!iface_modem_3gpp_parent->enable_unsolicited_events_finish (_self, res, &error))
mm_obj_warn (self, "couldn't enable parent 3GPP unsolicited events: %s", error->message);
if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (_self), res, &error))
mm_obj_dbg (self, "couldn't guarantee unsolicited events are sent to the correct port: %s", error->message);
if (self->priv->sind_psinfo_support == FEATURE_SUPPORTED) {
/* Enable access technology update reporting */
......@@ -822,6 +832,25 @@ parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *_self,
g_object_unref (task);
}
static void
parent_enable_unsolicited_events_ready (MMIfaceModem3gpp *self,
GAsyncResult *res,
GTask *task)
{
g_autoptr(GError) error = NULL;
if (!iface_modem_3gpp_parent->enable_unsolicited_events_finish (self, res, &error))
mm_obj_warn (self, "couldn't enable parent 3GPP unsolicited events: %s", error->message);
/* Make sure unsolicited events are sent to an AT port (PLS9 can default to DATA port) */
mm_base_modem_at_command (MM_BASE_MODEM (self),
"^SCFG=\"URC/DstIfc\",\"app\"",
5,
FALSE,
(GAsyncReadyCallback)set_urc_dest_port_ready,
task);
}
static void
modem_3gpp_enable_unsolicited_events (MMIfaceModem3gpp *self,
GAsyncReadyCallback callback,
......@@ -1946,6 +1975,8 @@ mm_broadband_modem_cinterion_init (MMBroadbandModemCinterion *self)
self->priv->ciev_regex = g_regex_new ("\\r\\n\\+CIEV:\\s*([a-z]+),(\\d+)\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
self->priv->sysstart_regex = g_regex_new ("\\r\\n\\^SYSSTART.*\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
}
static void
......@@ -1967,6 +1998,7 @@ finalize (GObject *object)
g_array_unref (self->priv->cnmi_supported_bfr);
g_regex_unref (self->priv->ciev_regex);
g_regex_unref (self->priv->sysstart_regex);
G_OBJECT_CLASS (mm_broadband_modem_cinterion_parent_class)->finalize (object);
}
......@@ -2098,15 +2130,45 @@ shared_cinterion_init (MMSharedCinterion *iface)
iface->peek_parent_time_interface = peek_parent_time_interface;
}
static void
setup_ports (MMBroadbandModem *_self)
{
MMBroadbandModemCinterion *self = (MM_BROADBAND_MODEM_CINTERION (_self));
MMPortSerialAt *port;
/* Call parent's setup ports first always */
MM_BROADBAND_MODEM_CLASS (mm_broadband_modem_cinterion_parent_class)->setup_ports (_self);
/* Primary */
port = mm_base_modem_get_port_primary (MM_BASE_MODEM (self));
if (port) {
mm_port_serial_at_add_unsolicited_msg_handler (
port,
self->priv->sysstart_regex,
NULL, NULL, NULL);
}
/* Secondary */
port = mm_base_modem_get_port_secondary (MM_BASE_MODEM (self));
if (port) {
mm_port_serial_at_add_unsolicited_msg_handler (
port,
self->priv->sysstart_regex,
NULL, NULL, NULL);
}
}
static void
mm_broadband_modem_cinterion_class_init (MMBroadbandModemCinterionClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
MMBroadbandModemClass *broadband_modem_class = MM_BROADBAND_MODEM_CLASS (klass);
g_type_class_add_private (object_class, sizeof (MMBroadbandModemCinterionPrivate));
/* Virtual methods */
object_class->finalize = finalize;
broadband_modem_class->setup_ports = setup_ports;
}
/*****************************************************************************/
......@@ -2125,10 +2187,12 @@ parent_signal_check_support_ready (MMIfaceModemSignal *self,
GAsyncResult *res,
GTask *task)
{
gboolean parent_supported;
GError *error = NULL;
parent_supported = iface_modem_signal_parent->check_support_finish (self, res, NULL);
g_task_return_boolean (task, parent_supported);
if (!iface_modem_signal_parent->check_support_finish (self, res, &error))
g_task_return_error (task, error);
else
g_task_return_boolean (task, TRUE);
g_object_unref (task);
}
......@@ -2143,7 +2207,7 @@ check_smoni_support (MMBaseModem *_self,
if (mm_base_modem_at_command_finish (_self, res, NULL)) {
mm_obj_dbg (self, "SMONI supported");
self->priv->smoni_support = FEATURE_SUPPORTED;
g_task_return_boolean (task, TRUE); // otherwise the whole interface is not available