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
  Pinephone + Keyboard for sale, little use ruemoo 4 382 10-28-2024, 08:37 PM
Last Post: AltonFox
  Modem Issues with the Pinephone Temmie19 2 243 10-16-2024, 07:54 AM
Last Post: Temmie19
  various tricks to open the pinephone shengchieh 3 1,330 09-16-2024, 03:42 AM
Last Post: biketool
  my pinephone melted norayr 6 2,032 04-04-2024, 07:22 PM
Last Post: Zebulon Walton
  Pinephone refusing to charge while suspended tiol 1 1,566 04-02-2024, 10:54 AM
Last Post: joH_N_Doe64
  pinephone can provide more than 500mA to a usb-c displayport device? unrznbl 2 913 03-21-2024, 08:52 AM
Last Post: unrznbl
  pinephone keyboard + dock question tuxcall 7 4,176 02-05-2024, 03:17 PM
Last Post: wigan
  Unsatisfactory GPS reception on PinePhone? LinAdmin2 53 65,818 12-17-2023, 11:42 AM
Last Post: robin.com.au
  PinePhone Pro not booting (Cap error!, pctl timeout) jealda 2 2,057 11-16-2023, 05:03 AM
Last Post: DrYak
  Pinephone frame damages Uturn 2 1,615 10-23-2023, 02:49 AM
Last Post: Uturn

Forum Jump:


Users browsing this thread: 5 Guest(s)