Help the increase speed on 5G modem

Hi

I am currently working on a custom board, which main feature is a modem (quectel rm520n-gl) and a router (8device Habanero) connected via USB3.
The main problem we are having, is that we don’t see the 5G speed we know the modem can handle. We have tested the modem on a evaluation board and a windows PC with quectel own driver. Here we see speed up to 700 Mbps.

When we are doing a speed test on our custom board we a getting max 250 Mbps and the modem is connected to the same network cell and is using the same band as when doing the test on the eva borad.

We have tried 2 version of Openwrt, 19 and 22.
The version 19 is our custom image, which has some of our own software running on it. We thought, maybe it was do to old USB driver that we didn’t get the speed, so we tried version 22 but with no luck.

We know that the Habanero modules USB3 can handle the speed. It has been tested with a USB3 HDD.

Does anyone has suggestion to there the limit can be in our system? Can it be the Openwrt that has the limit?
What we need to confirm is that USB3 between the Habanero and the modem is make proper. Is it possible to make some kind of write/read test to the modem? (I know that this may not be the right place to ask this, but maybe some one know something about it).

We are using ModemManager on both version to control the modem.

Openwrt version 19 USB driver:
kmod-usb-core - 4.14.171-1
kmod-usb-dwc3 - 4.14.171-1
kmod-usb-dwc3-of-simple - 4.14.171-1
kmod-usb-phy-qcom-dwc3 - 4.14.171-1
kmod-usb-storage - 4.14.171-1
kmod-usb3 - 4.14.171-1

Openwrt version 22 USB driver:
kmod-usb-core - 5.15.85-1
kmod-usb-dwc3 - 5.15.85-1
kmod-usb-dwc3-qcom - 5.15.85-1
kmod-usb-net - 5.15.85-1
kmod-usb-net-qmi-wwan - 5.15.85-1
kmod-usb-serial - 5.15.85-1
kmod-usb-serial-option - 5.15.85-1
kmod-usb-serial-qualcomm - 5.15.85-1
kmod-usb-serial-wwan - 5.15.85-1
kmod-usb-wdm - 5.15.85-1
kmod-usb-xhci-hcd - 5.15.85-1
kmod-usb3 - 5.15.85-1
libusb-1.0-0 - 1.0.26-3
usbutils - 014-1

1 Like

I have the same issue: With an S21 Ultra phone with T-Mobile Magenta Plan SIM, I get nearly 500 mbps downloads. With the Quectel RM520N-GL in a USB3 dev board, same SIM, NR5G_Band N41, I get 150-160 mbps down, max.

Two questions:

Are you sure the habanero board is speaking USB3 to the module? I’ve seen my RM502Q-AE fall back to USB2 on a bunch of my projects and haven’t had time to debug :frowning:

Second this sounds exactly like something I’m trying to build for personal use. Is your design commercial / proprietary and if not would you mind sharing? I haven’t found a commercial platform suitable to build a small self-constructed 5G router yet :frowning:

@thefloyd, you need a module like the one shown here: RM520N-GL - PCIe to Ethernet... (and DHCP!)

I’ve seen them, but that’s not helpful. I want to build something I can throw in my backpack and take on my train commute. Waiting for the Banana Pi BPI-R3 mini as that seems like my best option.

I have two of the modules jfrog refers to and they work well, both over USB and ethernet. Over ethernet I find they connect better than using AT commands over USB…

You might also be interested in trying one of these modules:

Raspberry Pi CM4_5G LTE Mini Module openwrt ubuntu driver free FM150 RM500U RM500Q SSH RPi 4B eSIM - AliExpress

But I haven’t yet tried one of those, and they may not be fast enough for your needs…
They don’t list RM520 but I would expect they would also work with that module.
I am sure you are aware any CPU you use needs to handle the speed also.

Yeah I saw those boards. I have a very similar one which I might try and build into a design. Really something like the BPI-R3 mini is perfect because I can use a mix of PCB antennas and a couple of good externals for the cellular and I’m fine with stunted Wi-Fi performance given this is for close proximity use only.

I have a Hackboard 2 right now which is actually great except the on-board intel Wi-Fi won’t AP at 5ghz (at least not without a lot of hacking) and once I get into USB dongles anything small enough is built around a buggy and challenging Realtek chipset. (Also the Hackboard m.2 slot is only negotiating USB2 with my module but I think there are pcie lanes on that socket so I could switch if I could get the rest of the thing working).

The Habanero module is saying that the USB is a SuperSpeed, so I should think is it a USB3 connection. But I checked the AT-command: AT+QCFG=“usbspeed” and it said 312, which I dont know that means. The documentation said it should be “30” for USB3 and “20” for USB2. Any ideas what 312 means?

I can’t share the design of the board. It is for the company I am working for.

understood about the board, shame. I might have to dust off my old copy of eagle and try building my own board if I can’t find something suitable.

I don’t know what 312 means :frowning: Perhaps someone else on the forum can help. Maybe it’s 3.1 gen2? in which case the USB bus shouldn’t be your limiting factor.

If I find time this weekend I’ll see if I can plug my RM5xxx dev board into my 8devices Jalapeno dev board and do some testing. The Habanero and Jalapeno should have similar specs (if anything, the Habanero is better) so I can see what I’m able to get from the module as far as performance goes but I know 200-something megabits is about where the module on my hackboard is topping out and that’s confirmed to be speaking USB2 so that’s why I asked…

Since I was bored while drinking my morning coffee I got out my jalapeno and 502q dev board. I’ve observed the following:

** before plugging in the RM502 module **
root@OpenWrt:/# lsusb -t
[ 349.371157] usb 3-1: new high-speed USB device number 4 using xhci-hcd
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

** after plugging in the RM502 module **

root@OpenWrt:/# lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=, 480M
|__ Port 1: Dev 4, If 1, Class=Vendor Specific Class, Driver=, 480M
|__ Port 1: Dev 4, If 2, Class=Vendor Specific Class, Driver=, 480M
|__ Port 1: Dev 4, If 3, Class=Vendor Specific Class, Driver=, 480M
|__ Port 1: Dev 4, If 4, Class=Vendor Specific Class, Driver=, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
root@OpenWrt:/#

It looks like the default negotiation of the RM502 module is 480M (USB2). This is the same behavior I’ve observed elsewhere but haven’t invested any time in troubleshooting my setup because this is a side project for me.

FYI on the 8devices platform lsusb is a symlink to busybox by default and it’s not going to give you extended information. “ls” it to confirm, but assuming it’s a symlink you can safely rm /usr/bin/lsusb and instead:

opkg update && opkg install usbutils

(alternatively you can try that command ^ safely and it will fail to install telling you that lsusb is provided by busybox already - then you can rm /usr/bin/lsusb and try to install again)

Once you have the full version of usbutils you can lsusb -t and inspect the device and bus properly.

FYI if I plug the same exact module on the dev board into another host I immediately see the following:

root@hackboard-1:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/7p, 5000M
|__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=ax88179_178a, 5000M
|__ Port 2: Dev 3, If 4, Class=Vendor Specific Class, Driver=qmi_wwan, 5000M
|__ Port 2: Dev 3, If 2, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 2: Dev 3, If 3, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 2: Dev 3, If 1, Class=Vendor Specific Class, Driver=option, 5000M

So - at least on my jalapeno the module is only negotiating 480M by default. Seemingly a host problem as the module comes up as 5G USB3 on another host device.

Same: “Superspeed,” and lsusb -t reports bandwidth at 5000 Mb. Via AT, mine also says, “312” as well and won’t accept “30.”

Also discovered yesterday that the module will NOT activate 5GNR SA mode; locked at “0.”

Here is my lsusb. And it does show as a USB3 connection.

root@device:~# lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 1: Dev 2, If 1, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 1: Dev 2, If 3, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 1: Dev 2, If 4, Class=Vendor Specific Class, Driver=qmi_wwan, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

I can’t test my system on a 5GNR SA, since I only have 5GNR NSA in my area.

root@device:~# mmcli -m 0 --command=‘AT+QENG=“servingcell”’
response: ‘+QENG: “servingcell”,“NOCONN”
+QENG: “LTE”,“FDD”,238,01,7CF71E,282,6350,20,5,5,ED8,-94,-9,-65,10,9,210,-
+QENG: “NR5G-NSA”,238,01,461,-89,0,-12,155770,28,2,0’

Welp that leaves me out of ideas. Sure seems like you’re getting constrained by a USB2 bus somewhere but there’s no evidence anywhere that supports that.

Take a look at the Khadas vim 3 and 4 boards - with the wwan daughter board you get full pcie connectivity to an rm520

They are more expensive but powerful boards.

If you are using OpenWrt, under network, firewall, look for software offloading. Enable it. If your chip supports hardware offloading like mt7621 you can enable it also.

If software offloading isn’t enabled the cores will not be fully utilized and only max at 250.

I don’t see this in the menus?
As this device specific, I guess I wont see this menu item available on every device?

You have to be using official openwrt firmware from website.

Ahh, you HAVE to turn on the option for, Software based offloading for routing/NAT, first to enable it.