iamromulan / quectel-rgmii-configuration-notes

Notes on using a Quectel modem directly connected to Ethernet
65 stars 9 forks source link

losing connection mutiple times a day #1

Open gbarrett1988 opened 4 months ago

gbarrett1988 commented 4 months ago

Hey first off thanks for the awesome guide. I love to learn new things and cellular tech is a pretty fun way for me to save some $ on internet.

I'm a bit stuck though and just thought I'd reach out here since I've been reading the guide and the quectel AT commands PDF for a few weeks now with no luck. I live in town so 5G SA is pretty strong where I live. When this device first boots up I'm usually getting a solid 300dl/30ul on tmo.

However, randomly throughout the day it just stops providing internet until I reboot it. Do you have any suggestions of what settings I might check?

possible issue 1

I've noticed with top the device is often reporting a high cpu load average for a single core processor:

image

I've traced this back to a few potential culprits:

/usr/bin/ipacm # which is I'm not sure yet
/sbin/init # sysd call
image

possible issue 2:

A couple of failed services that seem suspect. wlanmgr is likely related to wifi which this thing is not being used for so I think that can be forgotten.

image

Anyways, I'm going to keep chipping away at it but any troubleshooting thoughts since I'm a bit of a newbie to cell modems would be helpful.

burneystarke commented 3 months ago

What firmware are you running? RM520NGLAAR01A07M4G has been the most stable for me.

High CPU load may be related to telnet portion of the socat package. Did you enable the telnet micropython server?

Anecdotally, I had stability issues on tmobile when I used IPV4 ONLY in my apn profile.

iamromulan commented 3 months ago

Hey first off thanks for the awesome guide. I love to learn new things and cellular tech is a pretty fun way for me to save some $ on internet.

I'm a bit stuck though and just thought I'd reach out here since I've been reading the guide and the quectel AT commands PDF for a few weeks now with no luck. I live in town so 5G SA is pretty strong where I live. When this device first boots up I'm usually getting a solid 300dl/30ul on tmo.

However, randomly throughout the day it just stops providing internet until I reboot it. Do you have any suggestions of what settings I might check?

possible issue 1

I've noticed with top the device is often reporting a high cpu load average for a single core processor:

image

I've traced this back to a few potential culprits:

/usr/bin/ipacm # which is I'm not sure yet
/sbin/init # sysd call
image

possible issue 2:

A couple of failed services that seem suspect. wlanmgr is likely related to wifi which this thing is not being used for so I think that can be forgotten.

image

Anyways, I'm going to keep chipping away at it but any troubleshooting thoughts since I'm a bit of a newbie to cell modems would be helpful.

Apologies I didn't see this until now.

Install tailscale and ttyd from the toolkit. I betcha you're able to still access it through tailscale when it goes down. I think it has something to do with the link between the Ethernet chipset and the module.

WLAN: yes just as these support an Ethernet chipset there's a wifi module or 2 it can utilize as well. I haven't seen a PCB with that ability yet though. Maybe the Quectel dev board has it?

MickMorley commented 2 weeks ago

What firmware are you running? RM520NGLAAR01A07M4G has been the most stable for me.

High CPU load may be related to telnet portion of the socat package. Did you enable the telnet micropython server?

Anecdotally, I had stability issues on tmobile when I used IPV4 ONLY in my apn profile.

@burneystarke, are you still on firmware RM520NGLAAR01A07M4G? I don't know where to find the release notes so I am am unaware of the downsides to use an older firmware or not.

@gbarrett1988, any update on your issue?

iamromulan commented 2 weeks ago

See this comment https://github.com/iamromulan/quectel-rgmii-configuration-notes/discussions/11#discussioncomment-9806774

MickMorley commented 2 weeks ago

I am able to recreate this with the MR5210 board. I have a single PC connected to the modem. When the PC goes to sleep for a duration (TBD), the modem will disconnect from the WAN due to idle (I am guessing).

I see the same failed services from "Possible Issue 1". The modem will gracefully reconnect to the WAN because I can run a ping 8.8.8.8 in the Console of Simple Admin.

My laptop is still able to connect and view the Simple Admin and Console, however, the problem is no Internet connection is routed through to the PC.

dmesg does not show any "linkdown" errors. The ip addr command shows a state if UP for eth0

Does anyone know the commands to start/stop a network interface?

ifdown is not working

*I am currently waiting on the new recommended board. If possible would like to troubleshoot and salvage what I have in the meantime. I am running the firmware RM520NGLAAR01A07M4G_01.203.01.203

MickMorley commented 2 weeks ago

I found the issue is due to the network interfaces rmnet_data{n}

By default it uses rmnet_data0, when the system disconnects it automatically brings up rmnet_data1. When this happens the Internet to the PC goes out.

If I run a ip link set rmnet_data0 down then rmnet_data1 will start up. If I try to start up rmnet_data0 and bring down rmnet_data1 it will not provide internet back to the PC.

When rmnet_data0 goes down, it looks like the routes are not properly updated

after a fresh reboot (everything working)

ip route list
default via 192.0.0.1 dev rmnet_data0 mtu lock 1472 
192.0.0.0/27 dev rmnet_data0 proto kernel scope link src 192.0.0.2 
192.0.0.1 dev rmnet_data0 scope link src 192.0.0.2 metric 10 
192.168.225.0/24 dev bridge0 proto kernel scope link src 192.168.225.1

after rmnet_data0 goes down (simulate via ip link set rmnet_data0 down)

ip route list
default via 192.0.0.1 dev rmnet_data1 mtu lock 1472 
192.0.0.0/27 dev rmnet_data1 scope link 
192.0.0.1 dev rmnet_data1 scope link src 192.0.0.2 metric 10 
192.168.225.0/24 dev bridge0 proto kernel scope link src 192.168.225.1

after rmnet_data1 goes down (simulate via ip link set rmnet_data1 down)

ip route list
default via 192.0.0.1 dev rmnet_data0 mtu lock 1472 
192.0.0.0/27 dev rmnet_data0 scope link 
192.0.0.1 dev rmnet_data0 scope link src 192.0.0.2 metric 10 
192.168.225.0/24 dev bridge0 proto kernel scope link src 192.168.225.1 

The routes are not added back properly. If I run a ip route del 192.0.0.0/27 dev rmnet_data0 scope link and ip route add 192.0.0.0/27 dev rmnet_data0 proto kernel scope link src 192.0.0.2 to match the fresh ip route command. It still does not work.

I tried restarting the network bridge0 and eth0 using ip link set bridge0 down && ip link set bridge0 up to see if I can get it to come back and nothing.