Building up a connection with QMAP enabled (but qmimux in Linux Kernel not yet enabled)

Martin Maurer martin.maurer at mmeacs.de
Sun Aug 17 19:12:31 UTC 2025


Hello,

due to a bug with USB3 and default settings, I am currently trying to 
establish a connection with QMAP enabled.

(see my previous message here in this mailing list)

I don't need multiple connections, one fast stable connection is enough 
for the moment.

It looks like qmimux is not enabled in my used Linux kernel(s). I hope 
my current test work also without it?

I can set QMAP mode, able to establish an Internet connection,

but ping is not working.

See here what I am doing:

(I repeated some command, just to be sure, the settings are still there 
like I set before)


root at test-phyboard-pollux-imx8mp-3:~# qmicli --version

qmicli 1.36.0
Copyright (C) 2012-2023 Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later 
<http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

root at test-phyboard-pollux-imx8mp-3:~#

root at test-phyboard-pollux-imx8mp-3:~# cat /sys/class/net/wwan0/qmi/raw_ip
N
root at test-phyboard-pollux-imx8mp-3:~# echo Y | tee 
/sys/class/net/wwan0/qmi/raw_ip
Y
tee: /sys/class/net/wwan0/qmi/raw_ip: Device or resource busy
root at test-phyboard-pollux-imx8mp-3:~# ip link set wwan0 down
root at test-phyboard-pollux-imx8mp-3:~# cat /sys/class/net/wwan0/qmi/raw_ip
N
root at test-phyboard-pollux-imx8mp-3:~# echo Y | tee 
/sys/class/net/wwan0/qmi/raw_ip
Y
root at test-phyboard-pollux-imx8mp-3:~# cat /sys/class/net/wwan0/qmi/raw_ip
Y
root at test-phyboard-pollux-imx8mp-3:~# ip link set wwan0 up
root at test-phyboard-pollux-imx8mp-3:~# cat /sys/class/net/wwan0/qmi/raw_ip
Y
root at test-phyboard-pollux-imx8mp-3:~# qmicli -d /dev/cdc-wdm0 
--wda-get-data-format
error: couldn't create client for the 'wda' service: CID allocation 
failed in the CTL client: Transaction timed out

=> First QMI transaction seems to be always timeout out (but not 
relevant for my question, just doing command again...)

root at test-phyboard-pollux-imx8mp-3:~# qmicli -d /dev/cdc-wdm0 
--wda-get-data-format
[/dev/cdc-wdm0] Successfully got data format
                    QoS flow header: no
                Link layer protocol: 'raw-ip'
   Uplink data aggregation protocol: 'disabled'
Downlink data aggregation protocol: 'disabled'
                      NDP signature: '0'
Downlink data aggregation max datagrams: '0'
Downlink data aggregation max size: '0'
root at test-phyboard-pollux-imx8mp-3:~# qmicli -d /dev/cdc-wdm0 
--wda-set-data-format="link-layer-protocol=raw-ip,ul-protocol=qmap,dl-protocol=qmap,dl-datagram-max-size=8192,ep-type=hsusb,ep-iface-number=4,ul-datagram-max-size=8192"
[/dev/cdc-wdm0] Successfully set data format
                         QoS flow header: no
                     Link layer protocol: 'raw-ip'
        Uplink data aggregation protocol: 'qmap'
      Downlink data aggregation protocol: 'qmap'
                           NDP signature: '0'
Downlink data aggregation max datagrams: '1'
      Downlink data aggregation max size: '8192'
   Uplink data aggregation max datagrams: '1'
        Uplink data aggregation max size: '8192'
root at test-phyboard-pollux-imx8mp-3:~# qmicli -d /dev/cdc-wdm0 
--wda-get-data-format
[/dev/cdc-wdm0] Successfully got data format
                    QoS flow header: no
                Link layer protocol: 'raw-ip'
   Uplink data aggregation protocol: 'qmap'
Downlink data aggregation protocol: 'qmap'
                      NDP signature: '0'
Downlink data aggregation max datagrams: '1'
Downlink data aggregation max size: '8192'


=> I have set downlink and uplink parameter. They are outputted with 
"set", but "get" does not display "uplink". Just printing missing? Error 
in libqmi?


root at test-phyboard-pollux-imx8mp-3:~# qmicli -d /dev/cdc-wdm0 
--wda-get-data-format
[/dev/cdc-wdm0] Successfully got data format
                    QoS flow header: no
                Link layer protocol: 'raw-ip'
   Uplink data aggregation protocol: 'qmap'
Downlink data aggregation protocol: 'qmap'
                      NDP signature: '0'
Downlink data aggregation max datagrams: '1'
Downlink data aggregation max size: '8192'
root at test-phyboard-pollux-imx8mp-3:~# cat /sys/class/net/wwan0/qmi/raw_ip
Y
root at test-phyboard-pollux-imx8mp-3:~#

Some queries just to be sure, the parameters are now like they were set...

root at test-phyboard-pollux-imx8mp-3:~# ./connection_up.sh
CID=15
[/dev/cdc-wdm0] Network started
         Packet data handle: '3800235120'
[/dev/cdc-wdm0] Client ID not released:
         Service: 'wds'
             CID: '15'


=> Shell script which gets a WMD-CID, start-network, and printing some 
commands which could be the next commands

but must be manually entered -> just for testing!


rem qmicli --device=/dev/cdc-wdm0 --device-open-proxy 
--wds-get-current-settings
rem ip link set dev wwan0 down
rem ip addr add 192.0.0.2 dev wwan0
rem ip link set mtu 1472 dev wwan0
rem ip link set dev wwan0 up
rem ping -4 -I wwan0 8.8.8.8
root at test-phyboard-pollux-imx8mp-3:~# qmicli --device=/dev/cdc-wdm0 
--device-open-proxy --wds-get-current-settings
[/dev/cdc-wdm0] Current settings retrieved:
            IP Family: IPv4
         IPv4 address: 192.0.0.2
     IPv4 subnet mask: 255.255.255.224
IPv4 gateway address: 192.0.0.1
     IPv4 primary DNS: 192.0.0.30
                  MTU: 1472
              Domains: none

=> seems to be correct, parameters like I have seen earlier


root at test-phyboard-pollux-imx8mp-3:~# cat /sys/class/net/wwan0/qmi/raw_ip
Y

=> still ok, good!

root at test-phyboard-pollux-imx8mp-3:~# qmicli -d /dev/cdc-wdm0 
--wda-get-data-format
[/dev/cdc-wdm0] Successfully got data format
                    QoS flow header: no
                Link layer protocol: 'raw-ip'
   Uplink data aggregation protocol: 'qmap'
Downlink data aggregation protocol: 'qmap'
                      NDP signature: '0'
Downlink data aggregation max datagrams: '1'
Downlink data aggregation max size: '8192'

=> still ok

root at test-phyboard-pollux-imx8mp-3:~# ip link set dev wwan0 down
root at test-phyboard-pollux-imx8mp-3:~# ip addr add 192.0.0.2 dev wwan0
root at test-phyboard-pollux-imx8mp-3:~# ip link set mtu 1472 dev wwan0
root at test-phyboard-pollux-imx8mp-3:~# ip link set dev wwan0 up
root at test-phyboard-pollux-imx8mp-3:~# ping -4 -I wwan0 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
22 packets transmitted, 0 packets received, 100% packet loss


=> This is my current problem. Ping is not working with "qmap" enabled.

Without qmap, I have an error with USB3 under certain (rare) circumstances.

root at test-phyboard-pollux-imx8mp-3:~# cat /sys/class/net/wwan0/qmi/raw_ip
Y

=> still ok

root at test-phyboard-pollux-imx8mp-3:~# ping -4 -I wwan0 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
14 packets transmitted, 0 packets received, 100% packet loss

=> Also second try it not working

root at test-phyboard-pollux-imx8mp-3:~#


Is QMAP perhaps needing qmimux for sure, and I must then add qmimux1 and 
work over this?

So wwan0 is then not working anymore when activating QMAP?

As far as I remember there are different ul/dl-protocols. Is "qmap" the 
right one? Or do I need "qmapv5"? What is the difference?

ul-protocol (disabled|tlp|qc-ncm|mbim|rndis|qmap|qmapv5), dl-protocol 
(disabled|tlp|qc-ncm|mbim|rndis|qmap|qmapv5)

/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
     |__ Port 001: Dev 002, If 0, Class=[unknown], Driver=option, 5000M
     |__ Port 001: Dev 002, If 1, Class=[unknown], Driver=option, 5000M
     |__ Port 001: Dev 002, If 2, Class=[unknown], Driver=option, 5000M
     |__ Port 001: Dev 002, If 3, Class=[unknown], Driver=option, 5000M
     |__ Port 001: Dev 002, If 4, Class=[unknown], Driver=qmi_wwan, 5000M

I use a Quectel RM520N-GL for this test. If is 4. Is ep-iface-number=4 
correct? "ep" for it is I think higher like 0x07 or even 0x14???

Are my used numbers (sizes and datagrams dl/up) useable for my use case? 
Or do I need to take different ones?

Many thank!

Best regards,

Martin





More information about the libqmi-devel mailing list