[GH-ISSUE #13] Quectel does not connect automatically (possible simple solution) #11

Open
opened 2026-02-27 14:46:43 +03:00 by kerem · 0 comments
Owner

Originally created by @TheWojtek on GitHub (Oct 27, 2025).
Original GitHub issue: https://github.com/natecarlson/quectel-rgmii-configuration-notes/issues/13

So, if someone wants to hook up his/her Quectel RM520N-GL to a router, maybe it will help.

I went through configuring an RM520N-GL placed in a Waveshare M.2 to Gigabit Ethernet adapter for rural internet access and have a couple of remarks.

My goal was to bridge the 5G network and internal network by attaching the GbE interface of the adapter to the WAN interface on an Unifi UDM and act like I was on a DHCP Ethernet connection, with the ISP IP on the UDM WAN interface. Obviously, the 5G connection is NATed, so it is no real routable IP but a 10.x.x.x address. That's good enough for me.

During my experiments I had the Quectel controlled via the USB interface on the adapter and noticed it never started in CFUN=0 mode, always rebooted ready (but not ready enough as we will soon find out). Once I got the initial configuration of APNs etc on the RM520N to work, it looked promising but then there was another issue: I noticed that despite being connected to the 5G network, Quectel still presents a 192.168.11.0/24 network on the Ethernet interface of the adapter.
Theoretically this is expected, this is the IP that the modem offers to the Eth interface when it is not yet connected to the 5G network. This IP changes to whatever IP the ISP provides, once the 5G connection is set up.

Unfortunately, the UDM promptly gets a DHCP address from this network and that's it. There is a 5G connection present on the modem, no internet on the UDM and internal network.

The solution was extremely easy - a DHCP renew request on the UDM WAN interface, which reconnects with an ISP IP and then there is internet, immediately.
I do not think the DHCP renew actually forces the Quectel to create a 5G connection. I am pretty sure it is connected beforehand but changes the IP address on its Ethernet interface silently and does not disconnect/reconnect this interface. Therefore the connected router had no idea anything has changed and is left with a useless (in this case) "external" 192.168.11.x IP address.

A "DHCP renew" request on a Unifi gateway is kind of tricky when using the GUI and not automated at all, so I used the UDM Pro on-boot scripts and created a super simple script that renews DHCP once the UDM has booted up (fortunately this script is executed after the WAN interface has acquired the non-functional 192.169.11... IP so it always works) and saved it to the location provided by the boot script (remember to chmod +x both scripts):

#!/bin/bash
# renew DHCP on WAN
ip link set dev eth4 down
sleep3
ip link set dev eth4 up
exit 0

This setting allows my UDM to connect to the internet immediately after startup. I tested this in a power outage scenario and if the adapter and the UDM power on simultaneously, once the UDM finishes booting (the LED switches from pulsating white to solid blue), it is connected automatically to the internet. I also has no issues with maintaining this connection for weeks.

Originally created by @TheWojtek on GitHub (Oct 27, 2025). Original GitHub issue: https://github.com/natecarlson/quectel-rgmii-configuration-notes/issues/13 So, if someone wants to hook up his/her Quectel RM520N-GL to a router, maybe it will help. I went through configuring an RM520N-GL placed in a [Waveshare M.2 to Gigabit Ethernet adapter](https://www.waveshare.com/5g-m.2-to-gigabit-eth.htm?sku=26159) for rural internet access and have a couple of remarks. My goal was to bridge the 5G network and internal network by attaching the GbE interface of the adapter to the WAN interface on an Unifi UDM and act like I was on a DHCP Ethernet connection, with the ISP IP on the UDM WAN interface. Obviously, the 5G connection is NATed, so it is no real routable IP but a 10.x.x.x address. That's good enough for me. During my experiments I had the Quectel controlled via the USB interface on the adapter and noticed it never started in CFUN=0 mode, always rebooted ready (but not ready enough as we will soon find out). Once I got the initial configuration of APNs etc on the RM520N to work, it looked promising but then there was another issue: I noticed that despite being connected to the 5G network, Quectel still presents a 192.168.11.0/24 network on the Ethernet interface of the adapter. Theoretically this is expected, this is the IP that the modem offers to the Eth interface when it is not yet connected to the 5G network. This IP changes to whatever IP the ISP provides, once the 5G connection is set up. Unfortunately, the UDM promptly gets a DHCP address from this network and that's it. There is a 5G connection present on the modem, no internet on the UDM and internal network. The solution was extremely easy - a DHCP renew request on the UDM WAN interface, which reconnects with an ISP IP and then there is internet, immediately. I do not think the DHCP renew actually forces the Quectel to create a 5G connection. I am pretty sure it is connected beforehand but changes the IP address on its Ethernet interface silently and does not disconnect/reconnect this interface. Therefore the connected router had no idea anything has changed and is left with a useless (in this case) "external" 192.168.11.x IP address. A "DHCP renew" request on a Unifi gateway is kind of tricky when using the GUI and not automated at all, so I used the [UDM Pro on-boot scripts](https://github.com/unifi-utilities/unifios-utilities/blob/main/on-boot-script/README.md) and created a super simple script that renews DHCP once the UDM has booted up (fortunately this script is executed _after_ the WAN interface has acquired the non-functional 192.169.11... IP so it always works) and saved it to the location provided by the boot script (remember to `chmod +x` both scripts): ``` #!/bin/bash # renew DHCP on WAN ip link set dev eth4 down sleep3 ip link set dev eth4 up exit 0 ``` This setting allows my UDM to connect to the internet immediately after startup. I tested this in a power outage scenario and if the adapter and the UDM power on simultaneously, once the UDM finishes booting (the LED switches from pulsating white to solid blue), it is connected automatically to the internet. I also has no issues with maintaining this connection for weeks.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/quectel-rgmii-configuration-notes#11
No description provided.