Building up a connection with QMAP enabled (but qmimux in Linux Kernel not yet enabled)
Martin Maurer
martin.maurer at mmeacs.de
Mon Aug 18 06:35:29 UTC 2025
Here is an additional note:
I was missing
ip route replace default dev wwan0
but this does not make it going.
I tried:
root at test-phyboard-pollux-imx8mp-3:~# qmicli --device=/dev/cdc-wdm0
--device-open-proxy --wds-get-packet-statistics
[/dev/cdc-wdm0] Connection statistics:
TX packets OK: 1
RX packets OK: 2
TX packets dropped: 0
RX packets dropped: 0
TX bytes OK: 79
RX bytes OK: 223
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 ---
19 packets transmitted, 0 packets received, 100% packet loss
root at triorail-phyboard-pollux-imx8mp-3:~# qmicli --device=/dev/cdc-wdm0
--device-open-proxy --wds-get-packet-statistics
[/dev/cdc-wdm0] Connection statistics:
TX packets OK: 1
RX packets OK: 2
TX packets dropped: 0
RX packets dropped: 0
TX bytes OK: 79
RX bytes OK: 223
root at test-phyboard-pollux-imx8mp-3:~#
Packet statistics does not see my sent "TX packets"...
I see the outgoing packets on
root at test-phyboard-pollux-imx8mp-3:~# tcpdump -i wwan0
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wwan0, link-type RAW (Raw IP), snapshot length 262144 bytes
06:09:34.870791 IP 192.0.0.2 > dns.google: ICMP echo request, id 29726,
seq 0, length 64
06:09:35.871287 IP 192.0.0.2 > dns.google: ICMP echo request, id 29726,
seq 1, length 64
06:09:36.871728 IP 192.0.0.2 > dns.google: ICMP echo request, id 29726,
seq 2, length 64
06:09:37.871891 IP 192.0.0.2 > dns.google: ICMP echo request, id 29726,
seq 3, length 64
06:09:38.872373 IP 192.0.0.2 > dns.google: ICMP echo request, id 29726,
seq 4, length 64
06:09:39.872843 IP 192.0.0.2 > dns.google: ICMP echo request, id 29726,
seq 5, length 64
06:09:40.873290 IP 192.0.0.2 > dns.google: ICMP echo request, id 29726,
seq 6, length 64
06:09:41.873740 IP 192.0.0.2 > dns.google: ICMP echo request, id 29726,
seq 7, length 64
06:09:59.055705 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP,
Request from b6:39:cb:24:ba:d2 (oui Unknown), length 318
06:11:03.278826 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP,
Request from b6:39:cb:24:ba:d2 (oui Unknown), length 318
06:12:06.785606 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP,
Request from b6:39:cb:24:ba:d2 (oui Unknown), length 318
06:13:10.620266 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP,
Request from b6:39:cb:24:ba:d2 (oui Unknown), length 318
06:14:14.162927 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP,
Request from b6:39:cb:24:ba:d2 (oui Unknown), length 318
06:15:17.190064 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP,
Request from b6:39:cb:24:ba:d2 (oui Unknown), length 318
06:15:55.451557 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 0, length 64
06:15:56.452021 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 1, length 64
06:15:57.452453 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 2, length 64
06:15:58.452888 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 3, length 64
06:15:59.453035 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 4, length 64
06:16:00.453468 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 5, length 64
06:16:01.453912 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 6, length 64
06:16:02.454560 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 7, length 64
06:16:03.455017 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 8, length 64
06:16:04.455342 IP 192.0.0.2 > dns.google: ICMP echo request, id 30052,
seq 9, length 64
^C
24 packets captured
24 packets received by filter
0 packets dropped by kernel
root at test-phyboard-pollux-imx8mp-3:~#
Checking 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: '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:~#
Do I need a call to
--wds-bind-data-port
?
So I assume routing of data packet to radio module is working, outgoing
packets arrive at radio module, but radio module is still in some mode,
where it assumes a different packet format than the host sends?
Best regards,
Martin
Am 17.08.2025 um 21:12 schrieb Martin Maurer:
> 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