(fixed) LTE connectivity lost very often

Hi,
I often use my librem 5 with LTE enabled. But it often loose the connectivity (cannot ping 1.1.1.1 anymore, for example).
It can happen anytime. I thought it was linked to suspend mode, but it is not.

In this “no network” situation:

  • wwan0 IP is 100.81.127.60, gateway is 100.81.127.61 (given by my ISP one hour before).
  • I cannot ping anything (tested with 1.1.1.1, 9.9.9.9).
  • I have the 4G icon on top left of the screen, everything seems normal.

I did a few tests:
If I set gnome settings, Mobile, mobile data “OFF”, wwan0 is down
If I set gnome settings, Mobile, mobile data “ON”, wwan0 is up again, with the same IP/gateway.

If I reset the modem with sudo mmcli -m any --reset , my ISP gave me a completely different IP and route (100.64.182.178, gateway 100.64.182.177), and everything works again.

This sequence is done at the same geographical place, it is not linked to an antenna/cell change. My ISP is forcibly ending something every few hours.

There are several problems here:

  • The librem5 does not detect this weird network state.
  • My ISP seems to force the IP change… is there a RFC for that ?
  • Am I alone, or lot of librem5 users reset or play with the modem kill switch in this situation ?

Can someone tell me how to renew DHCP without resetting the modem, to do more tests ?
If someone has a good LTE spec knowledge and has some ideas to test, I can reproduce this situation very easily.

2 Likes

Maybe try

ifconfig zzz down
ifconfig zzz up

where zzz is the appropriate interface name.

That may need more consideration and analysis. If for some reason the old IP address is just not working any more then it’s not exactly that you are forced to do anything. Likewise, it may be that a fairly random IP address from a large pool is assigned, so that asking for an IP address is overwhelmingly likely to result in a different IP address.

I think there are other posts in this forum about the modem sometimes getting itself into an unhappy state, where it needs a reset to recover. This may have nothing to do with your provider. Best to search for and review other posts.

2 Likes

My 34 year old HP3000 is in my garage. Since I have residential provider, my IP address has a tendency to change with the weather. Like every neighborhood power failure or ISP update. To tie it down takes a business account.

In any case my machine runs a job (a.k.a. cron in linux but this ain’t linux) that runs at the top of the hour every hour, it makes sure my machine’s internet domain is tied to the current IP of my house.

1 Like

So basically you are your own DDNS provider.

It seems so.

Program was compiled and donated to my machine by an HP3K buddy. Apparently he has done it before and sent me his copy.

1 Like

Hi @irvinewade,
I am not sure about the diagnostic, indeed. Reset the modem made the IP change, but IP change may not be mandatory.
Turning the wwan0 interface down and up does not change anything (that’s what the toggle switch in gnome settings do). Toggling does not refresh ip/route.
That’s why I asked how to release/refresh IP using dhcp discover. As I cannot ping anything, trying DHCP discover is a (weak) track to see if network is still functionnal in this state. I am not 100% sure that toggling wwan0 trigger DHCP refresh.
Form the modem point of view (mmcli -m any status), everything is green (and I can receive calls or sms). wwan0 is just a void where every packet seems to disappear!

1 Like

Maybe you are seeing this issue:

4 Likes

Indeed. Many thanks @Skalman for the hint… I will try to disable the sleep to see if this still happens (after a reset).

Here are the commands, for people who do not want to go through the issue:

purism@pureos:~$ sudo mmcli -m any --reset 
successfully reseted the modem
(wait 10s)
purism@pureos:~$ cat /sys/bus/usb/devices/1-1.2/power/control
auto
purism@pureos:~$ echo 'on' | sudo tee /sys/bus/usb/devices/1-1.2/power/control
on
purism@pureos:~$ cat /sys/bus/usb/devices/1-1.2/power/control
on
1 Like

As an aside, your mobile network provider may or may not even be using DHCP to assign an IP address. I obviously can’t speak for your provider but it is not uncommon for a mobile network to use PPP instead to assign an IP address. So before bothering about the details of DHCP you need to confirm that DHCP is in use.

(One ISP here that I am using, but not using on the Librem 5, actually gives you the choice of what layers of protocol you use and hence, as a result, how you end up getting an IP address.)

Thanks for hunting that up.

1 Like

Well… I spent the last 24hours with usb sleep turned off, moving from one place to another, using librem5 system sleep : I never lost the connectivity ! That’s the first time. A big reliability leap.

Many, many, many thanks @Skalman to have me redirected to this issue !

3 Likes

Good that you got a reliability improvement :slight_smile: Note however that disabling the USB runtime-suspend feature like that, means that power consumption goes up, so it’s not really a solution, just a woraround. The issue is not really solved.

2 Likes

I also see this issue - though I use mobian trixie. I will also try to turn off the usb sleep. Does it reduce battery life significantly? Can you still suspend the system?

1 Like

@Pirate_Praveen : It is not so significant, but I didn’t measure it properly.
I use system sleep (suspend to ram after 2 minutes, on battery).
I turned off the usb sleep 3 days ago with the command upper, and now everytime I wake up my phone, LTE is back online.
It is also really reliable when I use the phone as a usb network access for my laptop.
3 days without resetting the modem is a first :slight_smile:

2 Likes

I tried setting the delay to 2s and 5s without much change, so turned off auto suspend like you suggested.

1 Like

Turning off auto suspend did not solve the problem entirely and it created problems with suspend. After the phone resumes from suspend, it was not auto registering. So I switched back to auto mode and with 5000 ms auto suspend delay. It has reduced the frequency of physical resets required to a tolerable level.

1 Like

Maybe it depends on ISP ? I go on testing the on value for /sys/bus/usb/devices/1-1.2/power/control … One week later, no more problem.

Connectivity is up in two seconds after wakeup from suspend, and it never drops when using the librem5 as usb modem on my computer.
As soon as I got more time, I will do a power consumption test.

1 Like