Quectel EC25A refusing to issue ipv4

Aleksander Morgado aleksander at aleksander.es
Mon Sep 3 07:51:12 UTC 2018


Hey,

>
> My current setup includes libmbim-glib-dev 1.16.0-1 from debian/testing and
> I'm using 1.4.0-690-gde362e9
>

That combination is very very very old, I would definitely suggest you
use MM 1.8, which is 100% compatible API wise with 1.4.x.

> mmcli says the IP supported is "ipv4, ipv6, ipv4v6".  I've tried the
> --wds-set-ip-family=4 option that was recently added like so:
>
> # qmicli -d /dev/cdc-wdm0 --wds-set-ip-family=4 --client-no-release-cid -v
> [01 Sep 2018, 21:10:03] [Debug] [/dev/cdc-wdm0] Opening device with flags
> 'auto'...
> [01 Sep 2018, 21:10:03] [Debug] [/dev/cdc-wdm0] loaded driver of cdc-wdm
> port: qmi_wwan
> [01 Sep 2018, 21:10:03] -Warning ** [/dev/cdc-wdm0] requested auto mode but
> no MBIM QMUX support available
> [01 Sep 2018, 21:10:03] [Debug] QMI Device at '/dev/cdc-wdm0' ready
> [01 Sep 2018, 21:10:03] [Debug] [/dev/cdc-wdm0] Assuming service 'wds' is
> supported...
> [01 Sep 2018, 21:10:03] [Debug] [/dev/cdc-wdm0] Allocating new client ID...
> [01 Sep 2018, 21:10:03] [Debug] [/dev/cdc-wdm0] sent message...
> <<<<<< RAW:
> <<<<<<   length = 16
> <<<<<<   data   = 01:0F:00:00:00:00:00:01:22:00:04:00:01:01:00:01
>
> [01 Sep 2018, 21:10:03] [Debug] [/dev/cdc-wdm0] sent generic request
> (translated)...
> <<<<<< QMUX:
> <<<<<<   length  = 15
> <<<<<<   flags   = 0x00
> <<<<<<   service = "ctl"
> <<<<<<   client  = 0
> <<<<<< QMI:
> <<<<<<   flags       = "none"
> <<<<<<   transaction = 1
> <<<<<<   tlv_length  = 4
> <<<<<<   message     = "Allocate CID" (0x0022)
> <<<<<< TLV:
> <<<<<<   type       = "Service" (0x01)
> <<<<<<   length     = 1
> <<<<<<   value      = 01
> <<<<<<   translated = wds
>
> [01 Sep 2018, 21:10:06] [Debug] [/dev/cdc-wdm0] received message...
> <<<<<< RAW:
> <<<<<<   length = 25
> <<<<<<   data   =
> 01:18:00:80:03:03:02:AA:0C:20:00:0C:00:02:04:00:00:00:00:00:01:02:00:C8:08
>
> [01 Sep 2018, 21:10:06] [Debug] [/dev/cdc-wdm0] received generic response
> (translated)...
> <<<<<< QMUX:
> <<<<<<   length  = 24
> <<<<<<   flags   = 0x80
> <<<<<<   service = "nas"
> <<<<<<   client  = 3
> <<<<<< QMI:
> <<<<<<   flags       = "response"
> <<<<<<   transaction = 3242
> <<<<<<   tlv_length  = 12
> <<<<<<   message     = "Get Signal Strength" (0x0020)
> <<<<<< TLV:
> <<<<<<   type       = "Result" (0x02)
> <<<<<<   length     = 4
> <<<<<<   value      = 00:00:00:00
> <<<<<<   translated = SUCCESS
> <<<<<< TLV:
> <<<<<<   type       = "Signal Strength" (0x01)
> <<<<<<   length     = 2
> <<<<<<   value      = C8:08
> <<<<<<   translated = [ strength = '-56' radio_interface = 'lte' ]
>
> [01 Sep 2018, 21:10:06] [Debug] [/dev/cdc-wdm0] No transaction matched in
> received message
>
> error: couldn't create client for the 'wds' service: CID allocation failed
> in the CTL client: Transaction timed out

You're hijacking the cdc-wdm port as MM is also running and trying to
use it through the qmi-proxy. You should use the "-p" option always
when running qmicli ccommands.
Also, anyway, you should decide how you want to setup the connection:
 * MM
 * qmi-network
 * qmicli manually

And make sure you stick to one of those methods only, otherwise you
may be interfering with the others.

>
> ----->8----
>
> I've separately tried addressing this through /etc/qmi-network.conf by
> making the content as follows:
>
> APN=network
> IP-TYPE=4
>
> Then I tried to start the network (with and without the ip-type=4 line).
> With the ip-type=4 line I get the following:
>
> loading profile at /etc/qmi-network.conf...
> /usr/local/bin/qmi-network: 2: /etc/qmi-network.conf: ip-type=4: not found
>     APN: internet
>     APN user: unset
>     APN password: unset
>     qmi-proxy: no
> Checking data format with 'qmicli -d /dev/cdc-wdm0 --wda-get-data-format
> '...
> [01 Sep 2018, 21:24:01] -Warning ** [/dev/cdc-wdm0] requested auto mode but
> no MBIM QMUX support available
> Device link layer protocol retrieved: raw-ip
> Getting expected data format with 'qmicli -d /dev/cdc-wdm0
> --get-expected-data-format'...
> [01 Sep 2018, 21:24:01] -Warning ** [/dev/cdc-wdm0] requested auto mode but
> no MBIM QMUX support available
> Expected link layer protocol retrieved: raw-ip
> Device and kernel link layer protocol match: raw-ip
> Starting network with 'qmicli -d /dev/cdc-wdm0
> --wds-start-network=apn='internet'  --client-no-release-cid '...
> [01 Sep 2018, 21:24:01] -Warning ** [/dev/cdc-wdm0] requested auto mode but
> no MBIM QMUX support available
> Saving state at /tmp/qmi-network-state-cdc-wdm0... (CID: 24)
> Saving state at /tmp/qmi-network-state-cdc-wdm0... (PDH: 2267257648)
> Network started successfully
>

That's good.

>
> Then I do something like
>
>
> dhclient -4 wwp0s29u1u1u4i4
>
>
> which returns immediately
>
> Then I do an ip addr show and see I have, much to my dismay only an ipv6
> address.
>

I'm tempted to say that this could be due to the device requiring
raw-ip in the network interface and your network interface still
configured for 802.3 frames.
IIRC the Quectel devices were too strict with the raw-ip/802.3
requirement and they do require raw-ip explicitly.

You have raw-ip support in kernels >= 4.5, although the corresponding
patches are easily backport-able if needed.

> We have a few thousand of these quectels on order which are going to be in
> embedded devices so I guess I could have some massive ipv6to4 bridge running
> but I'd rather not and I'd much rather have an ipv6 AND ipv4 address like I
> can get on windows - I'd also be ok with only an ipv4 address. I'm probably
> not ok however, with exclusively an ipv6.
>
> Any clues on how I can get this device to register an ipv4 address?  The
> carrier is T-Mobile btw, if that makes a difference.
>

I would definitely try with a newer stack: Linux >= 4.5, libqmi 1.20,
MM 1.8.0 and NM 1.10/1.12.

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list