Reboot Modem on Pinephone in Mobian
#2
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
FILE=/dev/ttyUSB2

while :
do
if test -c "$FILE"; then
  sleep 5
else
  systemctl restart eg25-manager
  sleep 60
fi
done
  Reply


Messages In This Thread
RE: Reboot Modem on Pinephone in Mobian - by 8bit - 06-04-2021, 11:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 77 44,309 10-27-2025, 10:19 AM
Last Post: biketool
Exclamation Cannot flash the modem firmware anonymous 8 9,310 10-26-2025, 11:27 AM
Last Post: anonymous
  cryptocurrency on mobian/pinephone biketool 35 58,926 10-08-2025, 06:21 AM
Last Post: biketool
  Mobian MMS/SMS text problem bcnaz 16 27,535 09-15-2025, 02:42 AM
Last Post: georgegohl888
  XLibre for Mobian Hiraghm 1 2,224 06-30-2025, 01:38 AM
Last Post: Haroldkent
  Axolotl on PinePhone / Mobian arno_nuehm 223 279,425 06-25-2025, 01:19 PM
Last Post: anonymous
  VoIP account on mobian dialer j_s 0 2,004 06-15-2025, 04:19 PM
Last Post: j_s
  Mobian Pinephone Notification LED biketool 2 2,563 06-07-2025, 03:19 PM
Last Post: KC9UDX
  Vivaldi Web browser nearly native for Mobian biketool 3 3,016 05-06-2025, 02:19 AM
Last Post: biketool
  mobian calamares fail merom 2 2,998 04-29-2025, 02:10 PM
Last Post: mdk

Forum Jump:


Users browsing this thread: 1 Guest(s)