QMICLI IPV6 problem on MC7354

Bjørn Mork bjorn at mork.no
Tue Dec 16 03:06:28 PST 2014


Aleksander Morgado <aleksander at aleksander.es> writes:
> On Sun, Dec 14, 2014 at 3:51 PM, Zophia Javier <zapman711 at hotmail.com> wrote:
>>
>> I am trying to get  IPv6 address on MC7354 via following procedures
>>
>> 1) AT+CGDCONT=1,IPV4V6
>> 2) qmicli -d /dev/cdc-wdm1 --wds-start-network=internet
>> --client-no-release-cid
>> 3) dhclient -6 wwan1 (I tried -N -T -P -S options and still failed.)
>>
>> I have confirmed the IPv6 address is already in MC7354, but the device
>> cannot get IPv6 address via dhclient.
>>
>> Did I miss any options or commands that I should use?
>
> The profiles set with AT+CGDCONT and what you request with QMI WDS
> Start Network (--wds-start-network) are not related.

Actually they are....  At least they are in my QMI modems.  E.g (this is
a Huawei E392, but AFAIK this is the same for Sierra QMI modems):


at+cgdcont?
+CGDCONT: 1,"IP","","0.0.0.0",0,0

OK


bjorn at nemi:~$ qmicli -d /dev/cdc-wdm1 --wds-get-profile-list=3gpp
Profile list retrieved:
        [1] 3gpp - profile1
                APN: ''
                PDP type: 'ipv4'
                Username: ''
                Password: ''
                Auth: 'none'



Changing it using AT commands is reflected in the QMI profile (and vice
versa, but I'm not showing that):

at+cgdcont=1,"IPV4V6"
OK

bjorn at nemi:~$ qmicli -d /dev/cdc-wdm1 --wds-get-profile-list=3gpp
Profile list retrieved:
        [1] 3gpp - profile1
                APN: ''
                PDP type: 'ipv4-or-ipv6'
                Username: ''
                Password: ''
                Auth: 'none'



AT+CGDCONT will define the same profiles which are used for QMI
connections.  I do of course not know the internal firmware
implementation of this, but it does look like the AT command interpreter
is simply a frontend to the QMI speaking baseband firmware.


> The IP type to
> use in the connection can be set in different ways using the QMI
> protocol (e.g. with "QMI WDS Set IP Family" and
> QMI_WDS_IP_FAMILY_IPV6). The problem here is that qmicli doesn't
> support that command yet. You can try to use ModemManager and its
> mmcli tool instead (mmcli -m 0
> --simple-connect="apn=internet,ip-type=ipv6")

AFAIK there is *no* way to specify "ip-type=ipv4v6" using "QMI WDS Set
IP Family".  You have to define a IPV4V6 PDP type profile using either
"QMI WDS Create Profile", "QMI WDS Modify Profile Settings", or
AT+CGDCONT. 

I believe the firmware will do APN matching when looking for the
appropriate profile, before falling back to the default.

Note that the default should probably always be IPV4V6 on any LTE modem.
This allows the modem to establish a default bearer on any type of
network, whether it is IPv4-only, IPv6-only or dual stack enabled.  If
the default profile is restricted to either IPv4 or IPv6, and this
doesn't match the network, then you won't even get a successful
registration on an LTE network (because the default bearer fails).


To summarize: What Zophia does to connect looks correct to me.  But the
firmware doesn't support DHCPv6, AFAIK. So that's why that fails.  Use
SLAAC instead. The modem will respond to RS with an RA when connected.
You can also retrieve the assigned /64 prefix using "QMI WDS Get Runtime
Settings" (or maybe a similar AT command if the firmware implements such
a feature in its AT command frontend).  I believe this is the only way
to look up the network assigned DNS servers, so you'll probably have to
do that in any case if you are going to use those.

Dual stack connections are weird in QMI, using two different QMI WDS
clients - one IPv4 and one IPv6.  So you'll need two "QMI WDS Get
Runtime Settings" to get both the IPv4 and IPv6 settings.

I don't know how to do this using qmicli, but here's an example of "QMI
WDS Get Runtime Settings" for a dual stack connection using the perl
script I used for early testing:

sending to /dev/cdc-wdm1:
01 0c 00 00 01 04 00 02 00 2d 00 00 00 
=> QMUX Header:
=>   len:    0x000c
=>   sender: 0x00
=>   svc:    0x01
=>   cid:    0x04

=> QMI Header:
=>   Flags:  0x00
=>   TXN:    0x0002
=>   Cmd:    0x002d
=>   Size:   0x0000
reading from /dev/cdc-wdm1
[Tue Dec 16 12:02:19 2014] read 143 bytes from /dev/cdc-wdm1
01 8e 00 80 01 04 02 02 00 2d 00 82 00 02 04 00 00 00 00 00 1e 04 00 91 f0 78 0a 15 04 00 04 70 d5 c1 16 04 00 c6 0f 43 82 20 04 00 92 f0 78 0a 21 04 00 fc ff ff ff 24 01 00 00 23 01 00 00 1f 02 00 00 01 10 08 00 70 72 6f 66 69 6c 65 31 11 01 00 03 14 0d 00 74 65 6c 65 6e 6f 72 2e 73 6d 61 72 74 1d 01 00 00 17 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 01 00 00 
<= QMUX Header:
<=   len:    0x008e
<=   sender: 0x80
<=   svc:    0x01
<=   cid:    0x04

<= QMI Header:
<=   Flags:  0x02
<=   TXN:    0x0002
<=   Cmd:    0x002d
<=   Size:   0x0082
<= [0x02] ( 4) 00 00 00 00      SUCCESS - QMI_ERR_NONE
<= [0x10] ( 8) 70 72 6f 66 69 6c 65 31  profile1
<= [0x11] ( 1) 03       PDP-IPV4V6
<= [0x14] (13) 74 65 6c 65 6e 6f 72 2e 73 6d 61 72 74   telenor.smart
<= [0x15] ( 4) 04 70 d5 c1      193.213.112.4
<= [0x16] ( 4) c6 0f 43 82      130.67.15.198
<= [0x17] (33) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00       .................................
<= [0x1d] ( 1) 00       .
<= [0x1e] ( 4) 91 f0 78 0a      10.120.240.145
<= [0x1f] ( 2) 00 01    ..
<= [0x20] ( 4) 92 f0 78 0a      10.120.240.146
<= [0x21] ( 4) fc ff ff ff      255.255.255.252
<= [0x22] ( 1) 00       .
<= [0x23] ( 1) 00       .
<= [0x24] ( 1) 00       .

sending to /dev/cdc-wdm1:
01 0c 00 00 01 03 00 02 00 2d 00 00 00 
=> QMUX Header:
=>   len:    0x000c
=>   sender: 0x00
=>   svc:    0x01
=>   cid:    0x03

=> QMI Header:
=>   Flags:  0x00
=>   TXN:    0x0002
=>   Cmd:    0x002d
=>   Size:   0x0000
reading from /dev/cdc-wdm1
[Tue Dec 16 12:02:24 2014] read 186 bytes from /dev/cdc-wdm1
01 b9 00 80 01 03 02 02 00 2d 00 ad 00 02 04 00 00 00 00 00 28 10 00 20 01 46 00 00 04 1f ff 00 00 00 00 00 00 00 52 27 10 00 20 01 46 00 00 04 0f ff 00 00 00 00 00 00 00 52 26 11 00 2a 02 21 21 00 8a ba 34 58 b8 42 7a da 5d 67 48 40 25 11 00 2a 02 21 21 00 8a ba 34 b8 71 38 e0 1c d8 54 b2 40 24 01 00 00 2e 01 00 00 1f 02 00 00 01 10 08 00 70 72 6f 66 69 6c 65 31 11 01 00 03 14 0d 00 74 65 6c 65 6e 6f 72 2e 73 6d 61 72 74 1d 01 00 00 17 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 01 00 00 
<= QMUX Header:
<=   len:    0x00b9
<=   sender: 0x80
<=   svc:    0x01
<=   cid:    0x03

<= QMI Header:
<=   Flags:  0x02
<=   TXN:    0x0002
<=   Cmd:    0x002d
<=   Size:   0x00ad
<= [0x02] ( 4) 00 00 00 00      SUCCESS - QMI_ERR_NONE
<= [0x10] ( 8) 70 72 6f 66 69 6c 65 31  profile1
<= [0x11] ( 1) 03       PDP-IPV4V6
<= [0x14] (13) 74 65 6c 65 6e 6f 72 2e 73 6d 61 72 74   telenor.smart
<= [0x17] (33) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00       .................................
<= [0x1d] ( 1) 00       .
<= [0x1f] ( 2) 00 01    ..
<= [0x22] ( 1) 00       .
<= [0x24] ( 1) 00       .
<= [0x25] (17) 2a 02 21 21 00 8a ba 34 b8 71 38 e0 1c d8 54 b2 40       2a02:2121:8a:ba34:b871:38e0:1cd8:54b2/64
<= [0x26] (17) 2a 02 21 21 00 8a ba 34 58 b8 42 7a da 5d 67 48 40       2a02:2121:8a:ba34:58b8:427a:da5d:6748/64
<= [0x27] (16) 20 01 46 00 00 04 0f ff 00 00 00 00 00 00 00 52  2001:4600:4:fff::52
<= [0x28] (16) 20 01 46 00 00 04 1f ff 00 00 00 00 00 00 00 52  2001:4600:4:1fff::52
<= [0x2e] ( 1) 00       .



Bjørn


More information about the libqmi-devel mailing list