qmicli and IPv4 / IPv6

Andre Valentin avalentin at marcant.net
Fri May 20 22:53:09 UTC 2016


Hi!

I'm currently trying to setup ZyXEL LTE3303 with openwrt. The device has an integrated LTE modem,
it's a 1435:d181 Wistron NeWeb. It offers 3 qmi devices and 3 wwan interfaces.

I testet the original firmware and it enables a dualstack interface with both address types. Now I
would like to enable the same in openwrt.

If I just run:
qmicli -v -p -d /dev/cdc-wdm1  --wds-start-network=apn=internet.t-mobile --client-cid=2 --client-no-release-cid
I will only get an IPv4 address.
Status:
qmicli -d /dev/cdc-wdm0 -p    --wds-get-current-settings
[/dev/cdc-wdm0] Current settings retrieved:
           IP Family: IPv4
        IPv4 address: 10.80.81.211
    IPv4 subnet mask: 255.255.255.248
IPv4 gateway address: 10.80.81.212
    IPv4 primary DNS: 10.74.210.210
  IPv4 secondary DNS: 10.74.210.211
                 MTU: 1500
             Domains: none

I do not get an IPv6 Address. If I patch qmicli like this:
------------------------------------------------------------------------------------------------------
--- libqmi-1.14.2/src/qmicli/qmicli-wds.c       2016-05-14 13:19:20.000000000 +0200
+++ libqmi-1.14.2.patched/src/qmicli/qmicli-wds.c       2016-05-19 20:50:17.792832166 +0200
@@ -434,6 +434,9 @@ start_network_input_create (const gchar
         .password            = NULL,
     };

+
+    QmiWdsIpFamily ip_family = 6;
+
     /* An empty string is totally valid (i.e. no TLVs) */
     if (!str[0])
         return NULL;
@@ -501,6 +504,8 @@ start_network_input_create (const gchar
     if (props.password && props.password[0])
         qmi_message_wds_start_network_input_set_password (input, props.password, NULL);

+    qmi_message_wds_start_network_input_set_ip_family_preference(input, ip_family, NULL);
+
     /* Set autoconnect */
     if (props.autoconnect_set)
         qmi_message_wds_start_network_input_set_enable_autoconnect (input, props.autoconnect, NULL);
------------------------------------------------------------------------------------------------------
I will receive an IPv6 address, but only that. No IPv4. Also setting ip_family to unspecified (8)
only leads to a working IPv4 connection.

I tried to create 2 simultaneous connections over cdc-wdm0 and cdc-wdm1, this works.
But that cannot be the solution!?

Also if I take a look at my android devices both address types or configured on a single interface.

Do you have a hint how to solve this problems?

Kind regards,

André

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3711 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20160521/7a7d5b2f/attachment.bin>


More information about the libqmi-devel mailing list