Issues with IPv4v6 and IPv6 on openwrt with a Quectel EG06-E

Aleksander Morgado aleksander at aleksander.es
Fri Nov 8 08:35:43 UTC 2019


Hey Bjørn,

> > I'm trying to test IPv4v6 and IPv6 using a Quectel EG06-E, which runs
> > in QMI mode. This is in OpenWRT, using this branch that I'm working
> > on:
> > https://github.com/aleksander0m/openwrt-packages/commit/b5805c3e1d2965662d2fe16aa80140a242339abd
> > (BTW, any additional test with that branch would be very welcome)
> >
> > When I fire up the connection through ModemManager, the logic will
> > create separate WDS clients for the IPv4 and IPv6 "start network"
> > commands (only one IPv6 client in case of IPv6 only).
> >
> > What I see in the logs is that the "start network" command for the
> > IPv4 part works successfully, but the one for the IPv6 part returns a
> > "NoEffect" error.
> >
> > <<<<<< QMUX:
> > <<<<<<   length  = 26
> > <<<<<<   flags   = 0x80
> > <<<<<<   service = "wds"
> > <<<<<<   client  = 20
> > <<<<<< QMI:
> > <<<<<<   flags       = "response"
> > <<<<<<   transaction = 3
> > <<<<<<   tlv_length  = 14
> > <<<<<<   message     = "Start Network" (0x0020)
> > <<<<<< TLV:
> > <<<<<<   type       = "Result" (0x02)
> > <<<<<<   length     = 4
> > <<<<<<   value      = 01:00:1A:00
> > <<<<<<   translated = FAILURE: NoEffect
> >
> > In the logic of MM, a "NoEffect" error is treated as no error, so the
> > logic goes on and tries to "WDS Get Current Settings" with the IPv6
> > client, and that one fails with an OutOfCall error.
> >
> > <<<<<< QMUX:
> > <<<<<<   length  = 19
> > <<<<<<   flags   = 0x80
> > <<<<<<   service = "wds"
> > <<<<<<   client  = 20
> > <<<<<< QMI:
> > <<<<<<   flags       = "response"
> > <<<<<<   transaction = 4
> > <<<<<<   tlv_length  = 7
> > <<<<<<   message     = "Get Current Settings" (0x002D)
> > <<<<<< TLV:
> > <<<<<<   type       = "Result" (0x02)
> > <<<<<<   length     = 4
> > <<<<<<   value      = 01:00:0F:00
> > <<<<<<   translated = FAILURE: OutOfCall
> >
> > Does anyone have any idea what could be happening here?
> > These tests are using the "data.tre.dk" APN in Denmark.
>
>
> autoconnect is disabled?  You do use the proper ip-family TLV and/or WDS
> request for this firmware version?  Maybe some weird interaction with
> the default bearer?
>

Don't think autoconnect is enabled, but will check. The weird thing is
the combination of "NoEffect" on WDS start network, and then
"OutOfCall" in WDS get current settings. If it were autoconnected, the
get current settings wouldn't say OutOfCall (if I'm not mistaken).


> Or short version:  I have absolutely no idea.
>

Heh :D

> Provoked by all you hard work here, I finally got my act together and
> connected a modem to an OpenWrt router.  For the first time ever :-)
>

Nice!

> I though I should test your dual-stack branch, but I couldn't figure out
> how to properly configure the interface.  What I've got is this:
>
> config interface 'mm'
>         option device '/sys/devices/platform/soc/soc:pcie at 82000000/pci0000:00/0000:00:01.0/0000:01:00.0/usb3/3-2'
>         option proto 'modemmanager'
>         option apn 'telenor.smart'
>         option pincode '1234'
>         option iptype 'ipv4v6'
>

That seems right to me... strange. Are you able to run this?
$ mmcli -m "/sys/devices/platform/soc/soc:pcie at 82000000/pci0000:00/0000:00:01.0/0000:01:00.0/usb3/3-2"
-K

Also, does the system log say anything like "Device not found in
sysfs" or "No device specified"?

>
> But I only get this "NO_DEVICE" error:
>
> root at wrt1900ac-1:/etc/config# ifstatus mm
> {
>         "up": false,
>         "pending": false,
>         "available": false,
>         "autostart": true,
>         "dynamic": false,
>         "proto": "modemmanager",
>         "data": {
>
>         },
>         "errors": [
>                 {
>                         "subsystem": "interface",
>                         "code": "NO_DEVICE"
>                 }
>         ]
> }
>
>
> Maybe because I didn't bother to reboot this router, so there is some
> setup I was missing?
>

Did you reload network after changing /etc/config/network? Or a
reboot, that would have helped as well.

> Well, the good news is that I have no problems making a dual-stack
> connection by using mmcli directly:
>
>
> root at wrt1900ac-1:/etc/config# mmcli -m 2
>   -----------------------------
>   General  |         dbus path: /org/freedesktop/ModemManager1/Modem/2
>            |         device id: a3fae1362318a2c2345da91ce9fb3d3772060a4f
>   -----------------------------
>   Hardware |      manufacturer: Sierra Wireless, Incorporated
>            |             model: EM7565
>            | firmware revision: SWI9X50C_01.09.04.00 6d3218 jenkins 2019/02/26 20:33:22
>            |    carrier config: default
>            |      h/w revision: 10001
>            |         supported: gsm-umts, lte
>            |           current: gsm-umts, lte
>            |      equipment id: 359260080103515
>   -----------------------------
>   System   |            device: /sys/devices/platform/soc/soc:pcie at 82000000/pci0000:00/0000:00:01.0/0000:01:00.0/usb3/3-2
>            |           drivers: qcserial, qmi_wwan
>            |            plugin: Sierra
>            |      primary port: cdc-wdm0
>            |             ports: cdc-wdm0 (qmi), wwan0 (net)
>   -----------------------------
>   Status   |              lock: sim-pin2
>            |    unlock retries: sim-pin (3), sim-pin2 (2), sim-puk (10), sim-puk2 (10)
>            |             state: disabled
>            |       power state: on
>            |    signal quality: 0% (cached)
>   -----------------------------
>   Modes    |         supported: allowed: 3g; preferred: none
>            |                    allowed: 4g; preferred: none
>            |                    allowed: 3g, 4g; preferred: 3g
>            |                    allowed: 3g, 4g; preferred: 4g
>            |           current: allowed: 2g, 3g, 4g; preferred: 4g
>   -----------------------------
>   Bands    |         supported: utran-1, utran-3, utran-4, utran-6, utran-5, utran-8,
>            |                    utran-9, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5,
>            |                    eutran-7, eutran-8, eutran-9, eutran-12, eutran-13, eutran-18,
>            |                    eutran-19, eutran-20, eutran-26, eutran-28, eutran-29, eutran-30,
>            |                    eutran-32, eutran-41, eutran-42, eutran-43, eutran-46, eutran-48,
>            |                    eutran-66, utran-19
>            |           current: utran-1, utran-3, utran-4, utran-6, utran-5, utran-8,
>            |                    utran-9, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5,
>            |                    eutran-7, eutran-8, eutran-9, eutran-12, eutran-13, eutran-18,
>            |                    eutran-19, eutran-20, eutran-26, eutran-28, eutran-29, eutran-30,
>            |                    eutran-32, eutran-41, eutran-42, eutran-43, eutran-46, eutran-48,
>            |                    eutran-66, utran-19
>   -----------------------------
>   IP       |         supported: ipv4, ipv6, ipv4v6
>   -----------------------------
>   3GPP     |              imei: 359260080103515
>   -----------------------------
>   SIM      |         dbus path: /org/freedesktop/ModemManager1/SIM/2
>
> root at wrt1900ac-1:/etc/config# mmcli -m 2 --simple-connect="apn=telenor.smart,ip-type=ipv4v6"
> successfully connected the modem
>
> root at wrt1900ac-1:/etc/config# mmcli -b 0
>   --------------------------------
>   General            |  dbus path: /org/freedesktop/ModemManager1/Bearer/0
>                      |       type: default
>   --------------------------------
>   Status             |  connected: yes
>                      |  suspended: no
>                      |  interface: wwan0
>                      | ip timeout: 20
>   --------------------------------
>   Properties         |        apn: telenor.smart
>                      |    roaming: allowed
>                      |    ip type: ipv4v6
>   --------------------------------
>   IPv4 configuration |     method: static
>                      |    address: 10.193.92.5
>                      |     prefix: 30
>                      |    gateway: 10.193.92.6
>                      |        dns: 193.213.112.4, 130.67.15.198
>                      |        mtu: 1500
>   --------------------------------
>   IPv6 configuration |     method: static
>                      |    address: 2a02:2121:282:b9c0:2915:dea7:6ac9:b9a9
>                      |     prefix: 64
>                      |    gateway: 2a02:2121:282:b9c0:e94c:b7b2:5a2d:422b
>                      |        dns: 2001:4600:4:fff::52, 2001:4600:4:1fff::52
>                      |        mtu: 1540
>
> root at wrt1900ac-1:/etc/config# ip addr add  10.193.92.5/30 dev wwan0
> root at wrt1900ac-1:/etc/config# ip addr add   2a02:2121:282:b9c0:2915:dea7:6ac9:b9a9/64 dev wwan0
> root at wrt1900ac-1:/etc/config# ip link set wwan0 up
>
> root at wrt1900ac-1:/etc/config# ip route add 8.8.8.8 dev wwan0
> root at wrt1900ac-1:/etc/config# traceroute 8.8.8.8
> traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 38 byte packets
>  1  77.16.1.145.tmi.telenormobil.no (77.16.1.145)  149.505 ms  22.958 ms  13.762 ms
>  2  10.67.125.162 (10.67.125.162)  25.679 ms  14.818 ms  24.812 ms
>  3  ti0275a400-ae12-21.ti.telenor.net (193.213.177.137)  14.647 ms  18.229 ms  14.782 ms
>  4  ti0275c360-ae14-0.ti.telenor.net (146.172.101.93)  31.781 ms  33.357 ms  23.776 ms
>  5  ti3001c360-ae3-0.ti.telenor.net (146.172.14.150)  20.664 ms  46.252 ms  22.986 ms
>  6  ti3001b400-ae4-0.ti.telenor.net (146.172.105.29)  34.380 ms  33.140 ms  24.831 ms
>  7  148.122.10.70 (148.122.10.70)  23.570 ms  33.152 ms  34.728 ms
>  8^C
>
> root at wrt1900ac-1:/etc/config# ip route add 2001:4860:4860::8888 dev wwan0
> root at wrt1900ac-1:/etc/config# traceroute  2001:4860:4860::8888
> traceroute to 2001:4860:4860::8888 (2001:4860:4860::8888), 30 hops max, 64 byte packets
>  1  2a02:2121:282:b9c0:0:35:1e12:1040 (2a02:2121:282:b9c0:0:35:1e12:1040)  38.096 ms  21.183 ms  20.737 ms
>  2  *  *  *
>  3  2a02:2120::1000:0:0:31 (2a02:2120::1000:0:0:31)  50.232 ms  43.362 ms  21.804 ms
>  4  ti280841735j370-ae1-20.ti.telenor.net (2001:4600:a:101::bc6)  23.963 ms  15.840 ms  20.931 ms
>  5  ti0275a400-ae12-21.ti.telenor.net (2001:4600:9:500:1::f5)  24.996 ms  16.855 ms  24.795 ms
>  6  ti0275c360-lo0-0.ti.telenor.net (2001:4600:0:100::2)  31.666 ms  22.532 ms  28.780 ms
>  7  ti3001c360-lo0-0.ti.telenor.net (2001:4600:0:100::a)  43.587 ms  23.807 ms  29.823 ms
>  8  ti3001b400-lo0-0.ti.telenor.net (2001:4600::11)  29.619 ms  22.509 ms  30.802 ms
>  9  2001:4600:10::13e (2001:4600:10::13e)  28.664 ms  19.780 ms  38.777 ms
> 10  2a00:1450:804f::1 (2a00:1450:804f::1)  30.649 ms  *  59.663 ms
> 11  dns.google (2001:4860:4860::8888)  29.561 ms  32.225 ms  29.796 ms
>

Lovely! Thanks for doing this test. If you could try to retest after
rebooting the router to see if the settings are applied correctly,
that would be fantastic.

>
> So this part is looking good, including MMs ability to create a QMI
> dual-stack connection.  Now I only have to figure out how to tweak the
> UCI settings to properly test your proto fixes.
>

There is a new luci package for the modemmanager protocol setup as
well, but haven't tested it myself.

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list