Dual stack with qmicli 1.16.2/1.20.0 and D-Link DWM-222

Reinhard Speyerer rspmn at arcor.de
Sun Jun 10 09:54:57 UTC 2018


On Sat, Jun 09, 2018 at 09:39:47PM +0200, Marc Andre Selig wrote:
> Hi all!
> 
> Apologies if this is the wrong place to ask; I would appreciate
> pointers in that case.
> 
> I am trying to get a D-Link DWM-222 USB LTE modem to work in dual
> stack mode using qmicli; I tried versions 1.16.2 and 1.20.0.
> 
> With qmicli 1.16.2 (from Debian Stretch), I have these results:
> 
> An IPv4-only connection works using
>   qmicli -d /dev/cdc-wdm0 \
>     --wds-start-network=apn=internet.t-mobile,ip-type=4 \
>     --client-no-release-cid
>   dhclient -4 wwan0 &
> 
> Similarly, an IPv6-only connection works with ip-type=6, followed
> by static configuration with ip a add and the prefix output by
> --wds-get-current-settings.
> 
> However, when I try adding an IPv6 connection to an existing IPv4
> connection or vice-versa, I get this:
>   # qmicli -d /dev/cdc-wdm0 \
>   > --wds-start-network=apn=internet.t-mobile,ip-type=6 \
>   > --client-no-release-cid
>   error: couldn't start network: QMI protocol error (79): 'PolicyMismatch'
>   [/dev/cdc-wdm0] Client ID not released:
> 	  Service: 'wds'
> 	      CID: '27'
>   #
> 
> After this, --wds-get-current-settings using either CID only shows
> the configuration for the first connection.
> 
> 
> Next, I got some hope from
> <https://lists.freedesktop.org/archives/libqmi-devel/2017-May/002354.html>
> and installed the latest version from
> <https://www.freedesktop.org/software/libqmi/>, which is 1.20.0.
> 
> This results in:
>   # QAR="-d /dev/cdc-wdm0 --device-open-qmi --client-no-release-cid"
>   # CID=$(qmicli $QAR --wds-noop|awk -F\' '/CID/{print $2}')
>   # QARG="$QAR --client-cid=$CID"
>   # qmicli $QARG --wds-set-ip-family=4
>   [/dev/cdc-wdm0] Client ID not released:
>   	Service: 'wds'
>   	    CID: '26'
>   # qmicli $QARG --wds-start-network=apn=internet.t-mobile
>   [/dev/cdc-wdm0] Network started
>   	Packet data handle: '89831284'
>   [/dev/cdc-wdm0] Client ID not released:
>   	Service: 'wds'
>   	    CID: '26'
>   # qmicli $QARG --wds-set-ip-family=6
>   error: couldn't set IP family: QMI protocol error (48): 'InvalidArgument'
>   [/dev/cdc-wdm0] Client ID not released:
>   	Service: 'wds'
>   	    CID: '26'
>   #
> 
> And similar to above, I can do the dance the other way round,
> successfully initiating an IPv6 connection but then getting
> "QMI protocol error (48): 'InvalidArgument' with the call to
> --wds-set-ip-family=4
> 
> Any hints?

Hi Marc,

for dualstack to work you need a corresponding IPV4V6 entry like this

at+cgdcont?
+CGDCONT: 1,"IPV4V6","","0.0.0.0",0,0
+CGDCONT: 2,"IPV4V6","internet.t-mobile","0.0.0.0",0,0
OK

and you have to use a second CID for the IPv6 commands as in Bjørn's example.

Regards,
Reinhard


More information about the libqmi-devel mailing list