Reboot Modem on Pinephone in Mobian - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139) +---- Thread: Reboot Modem on Pinephone in Mobian (/showthread.php?tid=14099) |
Reboot Modem on Pinephone in Mobian - eggmatters - 06-04-2021 I've had my Pinephone for some weeks now, and I'm trying to solve one important nagging issue. The Broadband modem will just die and not come back up. I'm suspecting that it may be a weak or absent carrier signal but, I have very little to go on. I'm not finding any mmcli commands that would allow me to reboot the modem. When this happens, it's as if the device is gone, or has been completely unmounted and mmcli fails as there is no device and my only recourse is to reboot the system. What would be the best approach to:
Here is the modem when it is actually healthy Code: ----------------------------------- The index seems to increase when waking up from suspend (Modem/0 -> Modem/1 -> Modem/2) Thank your for looking into this, my first Pine64 post! RE: Reboot Modem on Pinephone in Mobian - 8bit - 06-04-2021 There's probably a better way, but you can monitor if /dev/ttyUSB0..3 exists. Those 4 serial ports disappear when the modem disconnects. Then restarting eg25-manager will bring the modem back up. It takes 30+ seconds to boot up before the serial ports will return. You can see what is happening in dmesg. This is a simple bash script that I used. It has to run as root. It is an endless loop. You could take out the loop and the delays and run it with cron, as root. Or run it as a service. Code: #!/bin/bash RE: Reboot Modem on Pinephone in Mobian - eggmatters - 06-04-2021 (06-04-2021, 11:03 AM)8bit Wrote: There's probably a better way, but you can monitor if /dev/ttyUSB0..3 exists. Those 4 serial ports disappear when the modem disconnects. Then restarting eg25-manager will bring the modem back up. It takes 30+ seconds to boot up before the serial ports will return. You can see what is happening in dmesg. This looks promising. Thanks for the script! I'll give it a whirl and let you know how it turns out. RE: Reboot Modem on Pinephone in Mobian - lagrang3 - 06-07-2021 (06-04-2021, 11:03 AM)8bit Wrote: There's probably a better way, but you can monitor if /dev/ttyUSB0..3 exists. Those 4 serial ports disappear when the modem disconnects. Then restarting eg25-manager will bring the modem back up. It takes 30+ seconds to boot up before the serial ports will return. You can see what is happening in dmesg. I am having problems with the modem as well. Based on your suggestion I created the following script `/home/mobian/bin/test-and-connect-modem.sh` that restarts the serial port if the devices are not present. Code: #!/bin/bash Then in order to check this regularly I suggest using `cron` jobs as root: Code: sudo crontab -e and set the following rule that executes every minute Code: * * * * * /home/mobian/bin/test-and-connect-modem.sh RE: Reboot Modem on Pinephone in Mobian - Gribouille - 06-07-2021 Hello, For your information, look at the thread "pinephone drops cellular network" in the 'Hardware' part : https://forum.pine64.org/showthread.php?tid=13885 . RE: Reboot Modem on Pinephone in Mobian - eggmatters - 06-17-2021 The systemctl restart eg25-manager restart works like a charm. There was an update where it did seem to stabilize but, I still have to rely on this script. Works great. Meant to go and look at Gribouille's suggestion but my entire phone just bricked. Mobian won't boot from flash, Manjaro boots but KDE locks the screen after 3 seconds and won't respond to user touch when unlocked. Good times. |