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
  Mobian repository status henrythemouse 16 8,600 04-10-2024, 10:02 AM
Last Post: diederik
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 15 1,869 03-25-2024, 09:07 AM
Last Post: anonymous
  cant verify mobian image at website gnugpg penguins_rule 0 120 03-18-2024, 08:54 PM
Last Post: penguins_rule
  unofficial kali linux for pinephone help needed pinesmell 5 3,590 01-08-2024, 02:50 PM
Last Post: ERPlegend
  mobian installed to eMMC - how to install tow-boot grump_fiddle_reinstall 6 1,912 11-22-2023, 11:46 AM
Last Post: aLoop100o
  What actions needed to keep on mobian testing user641 3 1,779 09-05-2023, 06:44 AM
Last Post: Zebulon Walton
  Mobian boot failed with zstd message after upgrade. Mahgue 0 622 09-01-2023, 11:29 AM
Last Post: Mahgue
  how to update mobian over tor vusra 13 6,826 07-09-2023, 08:57 PM
Last Post: vusra
  opensnitch outbound firewall now works on mobian vusra 2 1,882 07-09-2023, 01:37 AM
Last Post: vusra
  Using Nativefier on PP64 with Mobian paulcarton 0 621 07-05-2023, 03:57 AM
Last Post: paulcarton

Forum Jump:


Users browsing this thread: 1 Guest(s)