Modem Shutdown/Startup Scripts
#1
Thumbs Up 
Have you cut a hole in the back cover of your pinephone and regularly switch off your cellular modem with the dip switch to keep the 3 letters from being creepy? If so, you will need these scripts so you can turn off/on the modem without having to restart your phone.

Turning modem off:

Install "minicom"

Code:
sudo apk install minicom


Create file "modem_shutdown" with the following text:

Code:
sudo minicom -S shut_down -D /dev/ttyUSB2

Create file "shut_down" with the following text:

Code:
send AT+QPOWD=1

now make both executable (Probably don't need to make "shut_down" executable)
I also added read/write so I can edit them as needed later.

Code:
sudo chmod 700 modem_shutdown
sudo chmod 700 shut_down

Install gnome-terminal (So you can click "Run in terminal" in the filemanager "Nemo")

Code:
sudo apk install gnome-terminal

now click on "modem_shutdown" in your home or whatever directory you put these files. Be sure to click "open in terminal" and supply your user password. You should see a minicom screen pop up and it will eventually say "Cannot open /dev/ttyUSB2!". Close out the minicom instance. You can now switch off the modem with the dip switch.

Turning modem on:

Create file "modem_startup" with the following text:

Code:
sudo rc-service eg25-manager restart

make it executable

Code:
sudo chmod 700 modem_startup

Flip the dip switch back on and click on "modem_startup" and "Run in terminal" like the shutdown script.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Latest suggestion to fix modem instability? feklee 10 8,401 01-31-2022, 01:16 PM
Last Post: feklee
  PMOS test image: failed EG25 test broke modem fw MtnSk8 4 5,513 02-28-2021, 02:20 PM
Last Post: MtnSk8
  Modem can't dial out jmorris 12 13,569 11-25-2020, 08:24 PM
Last Post: bcnaz
Question Can't figure out audio routing for modem strake 4 6,347 05-22-2020, 04:46 AM
Last Post: nieral

Forum Jump:


Users browsing this thread: 1 Guest(s)