pinephone drops cellular network
#11
This is still a problem, not related to temperature. Psensor said ~25C on all when the SIM or the modem (I’m too n00b to know what or why) fell out. It’s back on after reboot, for an unknown amount of time before it falls out again.
  Reply
#12
(07-07-2021, 10:12 AM)Line Wrote: This is still a problem, not related to temperature. Psensor said ~25C on all when the SIM or the modem (I’m too n00b to know what or why) fell out. It’s back on after reboot, for an unknown amount of time before it falls out again.
i have this issue as well. and is partially reported https://gitlab.com/mobian1/issues/-/issues/251 . i use mobian.

i noticed that some sunxi kernels were removed from repositories but i still had them installed. i removed those kernels and see it if it improves it.

kernels i removed: 5.11 sunxi
kernels i run now: 5.10 sunxi
  Reply
#13
the USB hub restarts randomly because the modem has sudden fluctuations of energy consumption, it specifically happens when you are issuing AT commands for the GPS or other configurations, you can write a script to check the modem in regular intervals and bring it back online with D-Bus and ofonoctl commands
  Reply
#14
(07-08-2021, 06:43 AM)mouffa Wrote: the USB hub restarts randomly because the modem has sudden fluctuations of energy consumption, it specifically happens when you are issuing AT commands for the GPS or other configurations, you can write a script to check the modem in regular intervals and bring it back online with D-Bus and ofonoctl commands

What would a script like that look like?
  Reply
#15
an easy way to check the modem is to use grep or awk to check the output of ofonoctl, if the modem is down it depends on how exactly it is down and then take the necessary steps according to the situation
  Reply
#16
(07-25-2021, 04:47 PM)ragreenburg Wrote: What would a script like that look like?

Sorry no one helped you at the time, but here's a thread with examples: https://forum.pine64.org/showthread.php?tid=14099

And here's a slightly modified/excessively commented version that I made a few days ago. You'll need to change the path of the logfile to something that makes sense for your setup, of course. Also, if you're using a non-systemd distro, the "systemctl" commands will be different. For example, in pmOS, "systemctl stop eg25-manager" would be replaced with "service eg25-manager stop".

Code:
#!/bin/bash

sleep 30s #Gives modem time to boot (in case this is run at startup)
modem=/dev/ttyUSB2 #Defines a variable representing the modem's USB connection

while : #Infinite loop
do
if test -c "$modem"; then #If the modem is accessible
  sleep 15s
  else #If the modem is inaccessible
  echo "Modem disconnected at" $(date -u) >> /home/alarm/Scripts/ModemSentinel.log #Prints GMT timestamped message to the logfile
  systemctl stop eg25-manager
  sleep 15s #Instantly restarting eg25-manager doesn't always work
  systemctl start eg25-manager
  sleep 40s #Modem takes a while to wake up
  if test ! -c "$modem"; then #If the modem is still not visible
    echo "Modem reconnection failed; rebooting system." >> /home/alarm/Scripts/ModemSentinel.log #Record failure to the logfile
    shutdown -r now #Reboot. If you're using Megi's multiboot image, reboots will get stuck at the boot menu. To avoid this, go to the boot menu, select your primary OS, and hold down the power button. This will make it so you boot directly to your primary OS, but the boot menu can still be accessed by holding volume down while turning the Pinephone on.
    else
    echo "Modem reconnected successfully." >> /home/alarm/Scripts/ModemSentinel.log #Record success to the logfile
  fi
fi
done
  Reply
#17
(08-26-2021, 09:52 AM)3Gluddite Wrote:
(07-25-2021, 04:47 PM)ragreenburg Wrote: What would a script like that look like?

Sorry no one helped you at the time, but here's a thread with examples: https://forum.pine64.org/showthread.php?tid=14099

And here's a slightly modified/excessively commented version that I made a few days ago. You'll need to change the path of the logfile to something that makes sense for your setup, of course.

Code:
#!/bin/bash

sleep 30s #Gives modem time to boot (in case this is run at startup)
modem=/dev/ttyUSB2 #Defines a variable representing the modem's USB connection

while : #Infinite loop
do
if test -c "$modem"; then #If the modem is accessible
  sleep 15s
  else #If the modem is inaccessible
  echo "Modem disconnected at" $(date -u) >> /home/alarm/Scripts/ModemSentinel.log #Prints GMT timestamped message to the logfile
  systemctl stop eg25-manager
  sleep 15s #Instantly restarting eg25-manager doesn't always work
  systemctl start eg25-manager
  sleep 40s #Modem takes a while to wake up
  if test ! -c "$modem"; then #If the modem is still not visible
    echo "Modem reconnection failed; rebooting system." >> /home/alarm/Scripts/ModSent.log #Record failure to the logfile
    shutdown -r now #Reboot. If you're using Megi's multiboot image, reboots will get stuck at the boot menu. To avoid this, go to the boot menu, select your primary OS, and hold down the power button. This will make it so you boot directly to your primary OS, but the boot menu can still be accessed by holding volume down while turning the Pinephone on.
    else
    echo "Modem reconnected successfully." >> /home/alarm/Scripts/ModemSentinel.log #Record success to the logfile
  fi
fi
done

Thank you for this!
  Reply
#18
My pleasure. I've been having the same problem for a while, and workaround information is surprisingly difficult to find.

Feel free to share the script, of course. Hopefully, someone much smarter than me will see it and add a similar watchdog function directly to eg25-manager.
  Reply
#19
Reddit user Atticus83 has shared a modem resetting script that launches a GUI from the app drawer. His version is a one-shot instead of a watchdog and uses mmcli to check for the modem (probably more elegant than monitoring USB ports?), but it's the same general idea with the benefit of a pretty launcher.

A question to anyone who actually knows what he's doing: assuming that monitoring the modem's USB connections and running mmcli -m both work to detect a modem malfunction, does that give us any clues about what's actually going wrong with the modem?
  Reply
#20
I think I may be having this same issue. I have been playing with the GPS in my PinePhone, and have noticed in the past two days that my modem does not stay active for more than about 10 seconds. I don't have a SIM card in my phone, so I have been using screen to interact with the modem over ttyUSB2

Code:
sudo screen /dev/ttyUSB2 115200

I then issue the following command to turn GPS on and check the status of GPS

Code:
AT+QGPS?
+QGPS: 0

OK
AT+QGPS=1
OK
AT+QGPS?
+QGPS: 1

OK
AT+QGPS?
+QGPS: 0

OK

As can be seen above, the GPS status is 1 momentarily, and then returns to 0. During this time, NMEA messages are delivered on ttyUSB1, but then cease

I am using Manjaro ARM Plasma

Edit: I think my issue may be related to https://gitlab.manjaro.org/manjaro-arm/p...-fix.patch as sudo systemctl status eg25-manager shows it falls into the codepath linked here: https://gitlab.com/mobian1/devices/eg25-...nss.c#L225
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  various tricks to open the pinephone shengchieh 2 521 03-23-2024, 09:27 AM
Last Post: Ferriah
  pinephone can provide more than 500mA to a usb-c displayport device? unrznbl 2 157 03-21-2024, 08:52 AM
Last Post: unrznbl
  my pinephone melted norayr 2 410 02-26-2024, 04:53 PM
Last Post: tllim
  pinephone keyboard + dock question tuxcall 7 2,445 02-05-2024, 03:17 PM
Last Post: wigan
  Unsatisfactory GPS reception on PinePhone? LinAdmin2 53 53,731 12-17-2023, 11:42 AM
Last Post: robin.com.au
  PinePhone Pro not booting (Cap error!, pctl timeout) jealda 2 1,199 11-16-2023, 05:03 AM
Last Post: DrYak
  Pinephone frame damages Uturn 2 781 10-23-2023, 02:49 AM
Last Post: Uturn
  PinePhone Keyboard KJ6OHG 11 7,599 08-23-2023, 03:25 AM
Last Post: Kali
  PinePhone constantly vibrating and won't take charge ImmyChan 5 5,197 07-23-2023, 03:49 PM
Last Post: kb-zealot
  Using optical drives with Pinephone cdforever 2 1,047 07-18-2023, 01:28 PM
Last Post: cdforever

Forum Jump:


Users browsing this thread: 1 Guest(s)