Trying to use qmimux - how all parts fit together?

Daniele Palmas dnlplm at gmail.com
Fri Sep 29 09:13:11 UTC 2023


Hello Martin,

Il giorno ven 29 set 2023 alle ore 09:55 Martin Maurer
<martin.maurer at mmeacs.de> ha scritto:
>
> Hello,
>
> After I now be able to successfully build a single connection, I
> continuing to get multiple connection (in parallel) running.
>
> I already successfully enabled qmimux according to
>
> https://techship.com/search/?q=add_mux
>
> I think also this page is helpful:
>
> https://lists.freedesktop.org/archives/libqmi-devel/2018-July/002935.html
>
> But I having a lack of understanding, how all the parts fit together.
>
> Do I really need
>
> qmicli -p -d /dev/cdc-wdm0 --device-open-qmi
> --wda-set-data-format=link-layer-protocol=raw-ip,ul-protocol=qmap,dl-protocol=qmap,dl-max-datagrams=32,dl-datagram-max-size=31744,ep-type=hsusb,ep-iface-number=5
>
> (there I have the problem with allocating a WDA client, as mentioned in
> previous email)
>

Yes, this is mandatory since data connection multiplexing is done
through QMAP and it needs to be configured on the modem side, that is
what you are doing with wda-set-data-format.

> Assume I want 3 connections:
>
> Can I use 1 WDS CID for all 3 connections? Or must each connection have
> its own CID?
>

Each connection should have its own CID.

> How do the CID/connections match qmimux-numbers?
>

The association between the WDS CID and mux id at the modem level is
done through the wds-bind-mux request.

If you instead mean the index in the qmimux netdevice name, there's no
association between that and the mux id or cid.

The kernel level is not aware of the WDS CID, but it knows the mux id
associated with the netdevice. Since commit
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/usb/qmi_wwan.c?id=e594ad980ec26fb7351d02c84abaa77ecdb4e522
there's also s sysfs file reporting the mux id.

> E.g. if I want to build up a connection over qmimux2
>
> qmicli -p -d /dev/cdc-wdm0 --device-open-qmi
> --wds-bind-mux-data-port=mux-id=1,ep-iface-number=5 --client-no-release-cid
>
> Is the mux-id=1 the parameter which I must change to 2, when using qmimux2?
>

If you want to use mux-id 2, then yes: the point is that the mux-id in
the wds bind request should be the one used when creating the qmimux
netdevice through the add_mux file.

> Finally if everything is working, is it correct that I shall be able to use
>
> ping -6 -I qmimux0 ...IPv6-Adresse...
>
> ping -6 -I qmimux1 ...IPv6-Adresse...
>
> ping -6 -I qmimux2 ...IPv6-Adresse...
>
> to select over which connection (mainly context/APN) it does?
>

If everything else has been done properly (e.g. netdevice address
setting...), the source of the ping will be the chosen qmimux
netdevice.

A few additional comments:

- The suggested QMAP implementation to be used on the kernel side is
nowadays rmnet, instead of the inbox qmi_wwan one.
- If you can, using ModemManager can simplify the whole process a lot.

Regards,
Daniele

> Best regards,
>
> Martin
>


More information about the libqmi-devel mailing list