Well, or, instead of just using always the second interface, you can switch the data format being used in the network interface before using it. E.g. you can run this unconditionally before running the WDS Start Network command (using qmicli+libqmi+qmi_wwan):
The alignment is something that isn’t guaranteed by the kernel (although they usually are aligned). If you want a quick check of which WWAN interface corresponds to which cdc-wdm port you can use (only with libqmi git master):
$ qmicli -d /dev/cdc-wdm0 --get-wwan-iface
Or, otherwise looking at sysfs, but I just find that new command quicker.