<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I did some testing with this advice and have some results and a couple more questions.<br class=""><div class=""><br class=""></div><div class=""><font color="#000000" class="">Bjørn, I realise now you were talking about cdc-mbim. I checked the values for tx_max and rx_max which are both 16384 by default on my device. I am able to change rx_max to 31744, which seems to improve upload slightly, but I cannot change tx_max (Permission denied, and after changing file permissions I just get an I/O error). Is that value supposed to be user accessible? Is this value tied to dwNtbOutMaxSize? Using cdc-mbim with these settings I get consistently 200Mbps, so my feeling is the bottleneck could be tied to these values, since I’m able to change their counterparts in the QMI driver. </font><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""> Using</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""> QMI QMAP it gets much faster than before, about 450Mbps.</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">Another question more ModemManager related; is there a way to set up a connection using user-specified QMAP values like the ones Sebastian provided? </span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">></span></font><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">qmicli -p -d /dev/cdc-wdm0 --client-cid=1 --wda-set-data-format="link-layer-protocol=raw-ip,ul-protocol=qmap,dl-protocol=qmap,dl-max-datagrams=32,dl-datagram-max-size=32768,ep-type=hsusb,ep-iface-number=4" --client-no-release-cid</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Best, </span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Nick</span></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 11 Aug 2022, at 17:47, Bjørn Mork <<a href="mailto:bjorn@mork.no" class="">bjorn@mork.no</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Nick <<a href="mailto:mips171@icloud.com" class="">mips171@icloud.com</a>> writes:<br class=""><br class=""><blockquote type="cite" class="">Hey,<br class=""><br class="">I am testing a Quectel RM500Q on OpenWrt master, and have noticed to<br class="">my surprise that the speed is much slower when using the qmi_wwan with<br class="">MM than it is when using qmi_wwan_q and quectel-CM (Quectel’s<br class="">proprietary driver and connection manager).<br class=""></blockquote><br class="">This is sort of expected since the qmi_wwan driver will use one USB<br class="">transaction per IP packet whereas the qmi_wwan_q will buffer a number of<br class="">packets per transaction.<br class=""><br class="">There is some built-in support for MAP (RMNET muxing, which implies<br class="">buffering) in qmi_wwan. But I recommend using the more recent rmnet<br class="">driver for that, with qmi_wwan in pass-throuh mode. This is supported<br class="">by recent ModemManager/libqmi. Ref<br class=""><a href="https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/447" class="">https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/447</a><br class=""><br class=""><blockquote type="cite" class="">Under good signal conditions the speed tops out at around 100Mbps on<br class="">qmi_wwan + MM (and is a little bit faster when in MBIM mode with MM),<br class="">but switching to qmi_wwan_q and quectel_CM it gets the expected<br class="">700Mbps+ where I am. Is there an easy explanation for this? Any<br class="">suggestions as to what I can change to get speeds equivalent to the<br class="">proprietary stack?<br class=""></blockquote><br class="">I'm a little surprised that you don't get better numbers in MBIM mode.<br class="">It should have the same advantages as qmi_wwan_q or qmi_wwan+rmnet. I<br class="">must admit that I haven't done any seriuos testing of this theory myself<br class="">though. But "A little bit faster than 100Mbps" is unexpectedly slow.<br class="">I'm pretty sure we can do much better than that in MBIM mode.<br class=""><br class="">What kind of hardware is the host running? Maybe we have some alignment<br class="">issue punishing this hardware? Or maybe the buffers we use are<br class="">sub-optimal for thise host+device combo? You could try to adjust some<br class="">of the writable settings in /sys/class/net/wwan0/cdc_ncm/ (replace wwan0<br class="">with your interface name)<br class=""><br class=""><br class=""><br class="">Bjørn<br class=""></div></div></blockquote></div><br class=""></div></body></html>