From b1f2b851972c28382dbe24c716f1d083964e2821 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 27 Apr 2017 18:21:20 +0200 Subject: [PATCH] modemmanager: delay the launch of MM for XBee Cellular The XBee Cellular needs more time to settle down before MM is able to detect it on boot. As this is connected to one of the 'ttymxc' serial ports, use that port to conditionally delay the launch of MM. Signed-off-by: Javier Viguera --- .../modemmanager/modemmanager/cellularifupdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown index f38082719..15e993c8d 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown @@ -7,6 +7,13 @@ POLLING_WAIT=5 [ -z "${IF_APN}" ] && exit 0 background_connect() { + # The XBee Cellular needs more time to settle down before MM is able + # to detect it. As the XBee is connected to a 'ttymxc' serial port, + # we check those ports to conditionally delay the launch of MM. + if echo "${IF_PORT}" | grep -qs ttymxc; then + sleep 25 + fi + # Ensure ModemManager is running killall -0 ModemManager 2>/dev/null || ModemManager --log-file=/var/log/modemmanager.log &