Quectel RM520N and QMAPv5
Robert Marko
robert.marko at sartura.hr
Fri Nov 29 16:10:24 UTC 2024
Hi,
I am trying to get QMAPv5 working on a Quectel RM520N modem with rmnet.
It works when used with Quectels qmi_wwan_q but we use the mainline
driver and with it I am not able to get it to work.
I am setting the following as data format, this is what I reverse
engineered from QMI calls that Quectels CM does when used on their
driver and it works rather well with it:
qmicli -p -d /dev/cdc-wdm0
--wda-set-data-format="link-layer-protocol=raw-ip,ul-protocol=qmapv5,dl-protocol=qmapv5,dl-max-datagrams=62,dl-datagram-max-size=31744,ep-type=hsusb,ep-iface-number=4,ul-datagram-max-size=8192,ul-max-datagrams=11"
Previously I have created an rmnet interface on top of wwan0 which is
the default qmi_wwan interface with the mux_id of 129 and then:
qmicli -p -d /dev/cdc-wdm0 --client-no-release-cid --wds-noop
qmicli -p -d /dev/cdc-wdm0 --client-cid=15 --client-no-release-cid
--wds-bind-mux-data-port="mux-id=129,ep-type=hsusb,ep-iface-number=4"
qmicli -p -d /dev/cdc-wdm0 --client-cid=15 --client-no-release-cid
--wds-start-network="apn=internet.ht.hr,ip-type=4"
Modem connects to the network and starts the data connection which I
can see with --wds-get-current-settings just fine but after bringing
up the rmnet interface I just cannot get any traffic on it.
I have tried searching around and I found the limitations of qmi-wwan
rx_urb_size being tied to MTU of the interface which posed an issue
with rmnet limiting its MTU to 16k.
I have tried changing that limit to 32k and changing the MTU, or
adding the rejected qmi_wwan rx_urb_size sysfs entry but even with
those I cannot get any traffic to pass.
The only combination in which QMAPv5 works with qmi_wwan is when I
used ModemManager to create a multiplexed bearer but I get reduced
performance compared to without multiplexing with that combination.
The deprecated syfs based muxing QMAPv1 works with the modem but
performance is again lower than without multiplexing.
Basically, I am trying to get QMAPv5 working so packets are aggregated
as on the device we use kernel 5.4 (I know, I dont like it either) and
qmi_wwan is rather slow on it currently and hogging the CPU.
Using mainline OpenWrt with kernel 6.6 provides much better
performance but even after backporting all qmi_wwan changes that are
bugfixes I just cannot get anywhere near that performance on 5.4.
But on the other hand Quectels qmi_wwan_q driver works great, it has
much lower CPU load and I am able to get over 1Gbps when using
loopback testing via it.
I know this has been a bit long mail, but I have kind of hit the wall
trying to get some reasonable performance but still using libqmi and
ModemManager instead of the crazy qmi_wwan_q and Quectels CM.
So if anybody has some pointers or instructions I would be really grateful.
Regards,
Robert
--
Robert Marko
Staff Embedded Linux Engineer
Sartura d.d.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko at sartura.hr
Web: www.sartura.hr
More information about the libqmi-devel
mailing list