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 <javier.viguera@digi.com>
This commit is contained in:
parent
7554f05b5f
commit
b1f2b85197
|
|
@ -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 &
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue