temp/modemmanager: Fix missing text messages in deep sleep and reduce probing time

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Dylan Van Assche 2020-11-27 20:14:54 +01:00 committed by clayton craft
parent a7b8e0289b
commit 42e857ab79
No known key found for this signature in database
GPG key ID: 23A30DA6D406B355
4 changed files with 111 additions and 3 deletions

View file

@ -0,0 +1,44 @@
From 44932947cb3c6cfbded0ba48c1133f95fdfa0c1f Mon Sep 17 00:00:00 2001
From: Dylan Van Assche <me@dylanvanassche.be>
Date: Fri, 27 Nov 2020 19:54:46 +0100
Subject: [PATCH] build: Allow elogind for suspend/resume support
Added elogind to supported suspend/resume hooks. Upstreaming at https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/407
---
configure.ac | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index e3c9a4f8..032c4c4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,13 +248,14 @@ dnl
PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd >= 209],[have_libsystemd=yes],[have_libsystemd=no])
PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 183],[have_libsystemd_login=yes],[have_libsystemd_login=no])
+PKG_CHECK_MODULES(LIBELOGIND, [libelogind >= 209], [have_elogind=yes], [have_elogind=no])
AC_ARG_WITH(systemd-suspend-resume,
AS_HELP_STRING([--with-systemd-suspend-resume=no|yes],
[Enable systemd suspend/resume support [[default=auto]]]),,
[with_systemd_suspend_resume=auto])
if test "x$with_systemd_suspend_resume" = "xauto"; then
- if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes"; then
+ if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes" || test "x$have_elogind" = "xyes"; then
with_systemd_suspend_resume=yes
else
with_systemd_suspend_resume=no
@@ -263,8 +264,8 @@ fi
case $with_systemd_suspend_resume in
yes)
- if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno"; then
- AC_MSG_ERROR(libsystemd or libsystemd-login development headers are required)
+ if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno" && test "x$have_elogind" = "xno"; then
+ AC_MSG_WARN(libsystemd, libsystemd-login or elogind must be available at runtime for suspend/resume support)
fi
AC_DEFINE(WITH_SYSTEMD_SUSPEND_RESUME, 1, [Define if you have systemd suspend-resume support])
;;
--
2.25.1

View file

@ -0,0 +1,27 @@
From 94ea3cd9ec1e59071a29ca6ed33386bf50c6355d Mon Sep 17 00:00:00 2001
From: Dylan Van Assche <me@dylanvanassche.be>
Date: Fri, 27 Nov 2020 20:08:47 +0100
Subject: [PATCH] broadband-modem: Do not send ATH during probing
ATH (AT hangup) rejects an incoming call during probing. This is a hack,
needs improvement, but suggested by the maintainer: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/194
---
src/mm-broadband-modem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 97c60b68..9e55b011 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -7607,7 +7607,7 @@ modem_voice_check_support (MMIfaceModemVoice *self,
/* Check ATH support */
mm_base_modem_at_command (MM_BASE_MODEM (self),
- "H",
+ "I",
3,
FALSE,
(GAsyncReadyCallback)ath_format_check_ready,
--
2.25.1

View file

@ -0,0 +1,28 @@
From 9a4e5a7c2da36288cd66c1500dcd0e1ba844c9cc Mon Sep 17 00:00:00 2001
From: Dylan Van Assche <me@dylanvanassche.be>
Date: Wed, 25 Nov 2020 19:58:25 +0100
Subject: [PATCH] serial-parsers: do not fail to detect a valid response with a
call or text incoming
Upstreaming at
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/406
---
src/mm-serial-parsers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mm-serial-parsers.c b/src/mm-serial-parsers.c
index b511302e..248cc685 100644
--- a/src/mm-serial-parsers.c
+++ b/src/mm-serial-parsers.c
@@ -108,7 +108,7 @@ mm_serial_parser_v1_new (void)
parser = g_slice_new (MMSerialParserV1);
- parser->regex_ok = g_regex_new ("\\r\\nOK(\\r\\n)+$", flags, 0, NULL);
+ parser->regex_ok = g_regex_new ("\\r\\nOK(\\r\\n)+", flags, 0, NULL);
parser->regex_connect = g_regex_new ("\\r\\nCONNECT.*\\r\\n", flags, 0, NULL);
parser->regex_sms = g_regex_new ("\\r\\n>\\s*$", flags, 0, NULL);
parser->regex_cme_error = g_regex_new ("\\r\\n\\+CME ERROR:\\s*(\\d+)\\r\\n$", flags, 0, NULL);
--
2.25.1

View file

@ -3,7 +3,7 @@
pkgname=modemmanager
pkgver=9999
_pkgver=1.14.8
pkgrel=1
pkgrel=2
pkgdesc="ModemManager library"
url="http://www.freedesktop.org/wiki/Software/ModemManager"
arch="armhf armv7 aarch64"
@ -11,6 +11,8 @@ license="GPL-2.0-or-later AND LGPL-2.1-or-later"
depends_dev="libmm-glib"
makedepends="$depends_dev gobject-introspection-dev gtk-doc vala
libgudev-dev polkit-dev libmbim-dev libqmi-dev linux-headers"
# Needed because of patch modifying configure.ac
makedepends="$makedepends automake autoconf autoconf-archive"
checkdepends="glib-dev"
options="!check" # https://bugs.freedesktop.org/show_bug.cgi?id=101197
subpackages="
@ -24,6 +26,9 @@ subpackages="
source="https://www.freedesktop.org/software/ModemManager/ModemManager-$_pkgver.tar.xz
$pkgname.rules
$pkgname.initd
0001-build-Allow-elogind-for-suspend-resume-support.patch
0002-broadband-modem-Do-not-send-ATH-during-probing.patch
0003-serial-parsers-do-not-fail-to-detect-a-valid-respons.patch
rpmsg.patch
rpmsg-udev.rules
utf16.patch"
@ -35,7 +40,7 @@ export MAKEFLAGS=-j$JOBS
build() {
# Note: --enable-gtk-doc is disabled to speed up build time
./configure \
./autogen.sh \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
@ -46,7 +51,8 @@ build() {
--with-polkit=permissive \
--disable-static \
--with-dbus-sys-dir=/etc/dbus-1/system.d \
--enable-vala=yes
--enable-vala=yes \
--with-systemd-suspend-resume=yes
make
}
@ -88,6 +94,9 @@ check() {
sha512sums="2457214fecd7d4d9fef291f756ef19973b98a05d07721cd57bdaee704cd6b9e96d27f6741bd8d245a0495f1d338e65db12f19b2d9a8dd6a5cddfb050614381c6 ModemManager-1.14.8.tar.xz
8d736f477649e42c05b34ac55391353c7f0c17138d039e049b16b07624d86fd9968ef1aa14672a63decf8b2c0ae984a34a0770322198b326775efba58f566685 modemmanager.rules
e2769401c52c3fff0b8057c13c6f7f2e5656c2963239ecbd647a01e66a344f6852cf2ba065358248315945bdf6ebbc4976903565b12ace2d15df6586dcc1de5b modemmanager.initd
cdb3bce108f6f31818b0b229fb01da1e9f114c7b6db67648c59714a07c0374700f172858071e6f0c9377957a7bb1cdb005755d88fbd4ca94448c3541e51516b2 0001-build-Allow-elogind-for-suspend-resume-support.patch
ed830556918d62e68ccd3672c7cb60d17041356071c05480ff0cbaf97d448927ff01d304e85b40b1bfc49faa4af8c07cc7205adc945b436ae324f21259104273 0002-broadband-modem-Do-not-send-ATH-during-probing.patch
97534f3a9f501a13fad0de7d432d9b2f684bc9639db74d56954d1f314812db66f06b97201ba53ec668f3e1dd924380afc66ef35a4cd2267ad1c526cdcb1c5f08 0003-serial-parsers-do-not-fail-to-detect-a-valid-respons.patch
64270c00630f3dd73b5e06547e441f5cf8d75b96032da423c4132af2fc84b2c35042800e105c66bae354d61c66b716cc602421ac0ff82f7b4a8f0ce798855e24 rpmsg.patch
0928a7b658d0eeb37daf40930ea930b266151df743c2c7b1d863bce9447fedb904924a5e673732d5bc765dc2ec6d8f4a2b47bc946575e8f18712c0f7ee81fb73 rpmsg-udev.rules
7a88ea53600377e4a6bd652fa90036b7d8284dbaeb02c39f79501fc6f1368519291786df2fd8112b9b606da759d6e758be30fe558bab3a85a70e07e366362530 utf16.patch"