10-22-2021, 01:44 AM
(10-21-2021, 03:40 PM)lacriz Wrote:I would stop/start or restart ModemManager via systemctl since it's already integrated by the system as a systemd service. Now you are circumventing the service with unknown consequences (unless you checked how ModemManager.service is configured). It's much cleaner if you interact with the service and not the utility itself.Code:if [ -e /dev/ttyUSB2 ]
echo "modem works"
else
echo "modem does not work, restarting now ..."
sudo killall ModemManager
sudo /usr/bin/ModemManager &
fi
Your phone always crashing in deep sleep is a much bigger problem though that I would investigate. I don't have anything off the top of my head, but I would check what happens in the logs with journalctl or dmesg.