How-To: Installing Vanilla OpenWRT on GL X3000

So... I have noticed that OpenWRT finally released a new stable version which includes support for the GL-INET X3000 (24.10.0). I booted into an Ubuntu live system and went back to building a new image based on the stable release. It's been smooth sailing, just add the patches for the PCIe detection and throw the sysupgrade on the devices.

I have 3x X3000 running outdoor (but in waterproof boxes) for the last half year. Since my last posts here, I have been running vanilla OpenWRT on them. Needless to say, the devices are way more stable with vanilla OpenWRT. I haven't experienced any crashes or issues otherwise.

After some more tweaking and experimenting, this is the sysctl parameters that I am currently running in "production" which give ideal performance:

net.core.dev_weight = 256
net.core.netdev_budget = 1200
net.core.netdev_budget_usecs = 40000
net.core.netdev_tstamp_prequeue = 0
net.core.netdev_max_backlog = 5000
net.ipv4.icmp_ratemask = 524287
net.ipv4.icmp_ratelimit = 0

FWIW, I am not running the stock PSUs on these devices. I have noticed some strange crashes under load from time to time. So in November last year, I replaced the stock PSUs with proper outdoor-proof ones from a considerably "premium brand". Not a single crash since.

Thank you for that; Im really considering this option at the moment; any caveats ? Im a bit lost with this massive thread; I guess this subject would need its own forum... Is the first post the currently updated guide compatible with GL-INET X3000 ?

Turns out I have 0 x86 machines so I can't compile those files since Package 'gcc-multilib' has no installation candidate for ARM . Anywhere I can download the compiled files for CLX3000 Quectel PCIe-MHI Drivers ?

I have installed Openwrt 24.10.0 on the X3000, but there is no out of the box integration with the Modem 5G component of the overall router, I don't know how to setup that part to use it with T-Mobile Home Internet, it would be really amazing if somebody can create a step by step guide on how to fully configure the 5G functionality of the X3000 together with all the other required configuration (without having to compile the Linux kernel), right now I can only use it as a regular Wifi router, it will be greatly appreciated, thank you

I really think this topic needs a dedicated forum instead of a thread @staff ; If GL is ok supporting vanilla then give us a forum section ? at the moment I am completely lost on the current state of this method and compatibility overall; been reading a lot but information is too scattered and inconsistent

1 Like

Let me try to clarify some of the concerns above.

  1. There isn't any caveats apart from the fact that controlling the modem under vanilla OpenWRT is a bit more complicated. The stock GL-INET firmware offers a lot of control options within their own proprietary Web UI which will be missing. But most of the functionality that their Web UI offers can be achieved through AT commands.
  2. The current step-by-step guide in the beginning of this thread is outdated. You don't really need to mess around with custom drivers anymore. The linux kernel contains all necessary drivers for the "fast" PCI mode. However, it's buggy and requires a patch, which I have shared above. If you want to use the "fast" PCI mode, you won't get around building your own OpenWRT image.
  3. If you are fine with 300 Mbit/s in speed, you can switch the modem to the "slow" USB mode. In that case, the stock OpenWRT image that is available for download works just fine.

In any case, after you flashed the OpenWRT image, you use ModemManager to create a new interface, where you specify the APN. This can be done within the OpenWRT Web UI. Depending on which mode the modem is in, you can pick either an MBIM protocol or QMI protocol.

I don't recommend using the proprietary Quectel drivers. The linux kernel drivers work just fine. If you're fine with 300 Mbit/s of speed, the easiest way is to just flash the prebuilt OpenWRT image. Switching the modem's mode from USB to PCI and vice-versa can be done with AT commands:

AT+QCFG="data_interface",0,0 # USB
AT+QCFG="data_interface",1,0 # PCI

You would use a tool like picocom to issue the AT commands: picocom /dev/ttyUSB2.

Applying the patch above can be done by creating a file called 999-pci-mhi-generic.patch and placing it in the target/linux/mediatek/patches-6.6 folder prior to building the OpenWRT image.

Building OpenWRT itself is relatively easy:

git clone https://github.com/openwrt/openwrt.git
cd openwrt
git checkout v24.10.0
./scripts/feeds update -a
./scripts/feeds install -a
wget https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/config.buildinfo -O .config
make defconfig
make menuconfig
<NOTES BELOW>
make -j16

NOTES: when entering make menuconfig you generally want to add LuCi and switch the target profile to the "X3000". Also, the default config is missing some things, such as mhi-pci-generic. So you need to open .config and then set kmod-mhi-pci-generic=y.

This gives you a super lightweight OpenWRT image with everything necessary to use the device as a modem/router. If you want to use the WiFi functionality, you might need to add some packages later down the road, but that can be done after building the image within LuCi.

Building the OpenWRT image takes time. Fortunately, I have a 9950X3D workstation and it only took like 10 minutes. Expect it to take a lot longer on weaker CPUs. FWIW, you can adjust make -j16 to fit the number of CPU threads you have, which might be more or less than 16.

I hope this helps!