Unable to get Quectel EC25-E to connect in QMI mode

I have a Quectel EC25-E and a sim card but for some reason it's failing to connect, the apn details are correct. I've added interface 4G via luci using QMI Cellular mode. I see permission denied when one of the commands tries to run.

OpenWrt 22.03.3 r20028-43d71ad93e / LuCI openwrt-22.03 branch git-22.361.69894-438c598

Thu Feb  2 09:50:36 2023 daemon.notice netifd: Interface '4g' is setting up now
Thu Feb  2 09:50:36 2023 daemon.notice netifd: 4g (25223): Waiting for SIM initialization
Thu Feb  2 09:50:36 2023 daemon.notice netifd: 4g (25223): Failed to parse message data
Thu Feb  2 09:50:36 2023 daemon.notice netifd: 4g (25223): PIN verification is disabled
Thu Feb  2 09:50:36 2023 daemon.notice netifd: 4g (25223): Device does not support 802.3 mode. Informing driver of raw-ip only for wwan0 ..
Thu Feb  2 09:50:37 2023 daemon.notice netifd: 4g (25223): Waiting for network registration
Thu Feb  2 09:50:38 2023 daemon.notice netifd: 4g (25223): Starting network 4g
Thu Feb  2 09:50:38 2023 daemon.notice netifd: 4g (25223): Unable to connect IPv4
Thu Feb  2 09:50:38 2023 daemon.notice netifd: 4g (25321): Stopping network 4g
Thu Feb  2 09:50:38 2023 daemon.notice netifd: 4g (25321): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "4g" } (Permission denied)
Thu Feb  2 09:50:38 2023 daemon.notice netifd: Interface '4g' is now down
root@OpenWrt:/# qmicli --device=/dev/cdc-wdm0 --device-open-proxy --uim-get-card
-status
[/dev/cdc-wdm0] Successfully got card status
Provisioning applications:
        Primary GW:   slot '1', application '1'
        Primary 1X:   session doesn't exist
        Secondary GW: session doesn't exist
        Secondary 1X: session doesn't exist
Slot [1]:
        Card state: 'present'
        UPIN state: 'not-initialized'
                UPIN retries: '0'
                UPUK retries: '0'
        Application [1]:
                Application type:  'usim (2)'
                Application state: 'ready'
                Application ID:
                        A0:00:00:00:87:10:02:FF:44:FF:12:89:00:00:01:00
                Personalization state: 'ready'
                UPIN replaces PIN1: 'no'
                PIN1 state: 'disabled'
                        PIN1 retries: '3'
                        PUK1 retries: '10'
                PIN2 state: 'enabled-not-verified'
                        PIN2 retries: '3'
                        PUK2 retries: '10'
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
        "type": "lte",
        "rssi": -73,
        "rsrq": -11,
        "rsrp": -103,
        "snr": 1.600000
}

This is the real issue. "Permission denied" a "usual annoyance".
Pls, provide /etc/config/network
(i.e. via cat /etc/config/network)
It looks like modem can not register to cell provider.

I have tried in ipv4 only mode and that didn't work either. I have also verified the sim in phone and works as expected, I also tried another sim.

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd98:dd15:576c::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'
        list ports 'eth2'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0'
        option proto 'dhcpv6'

config interface '4g'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option apn 'everywhere'
        option auth 'both'
        option username 'eesecure'
        option password 'secure'
        option pdptype 'ipv4v6'

I just tried in forced ipv6 mode and it connected.

Thanx. Then I learned, that auth works, which I never used.
Which cell provider do you have ?

it connected in ipv6 only mode but it doesn't create a virtual interface as per https://teklager.se/en/knowledge-base/openwrt-4g-wwan-configuration/

Then I suppose you will need to install 464xlat package.

i've now installed it and added an extra interface but not seeing any traffic across it i've tried it in different zones?

Is this an EE UK Sim?

You don't need to manually add 464xlat interface, everything is automatic as I recall. I don't have a similar configuration myself at the moment, sorry.
What is currently in your /etc/config/network ?
Will be good to check the system log right after the mobile connection is established.

1 Like

yes it is ee uk

ok deleted my manual 464xlat interface, restarted 4g, /etc/config/network hasn't changed.

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdf5:b626:b117::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'
        list ports 'eth2'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0'
        option proto 'dhcpv6'

config interface '4g'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option apn 'everywhere'
        option auth 'both'
        option username 'eesecure'
        option password 'secure'
        option pdptype 'ipv6'

log

Thu Feb  2 13:43:27 2023 daemon.notice netifd: 4g (23073): Stopping network 4g
Thu Feb  2 13:43:27 2023 daemon.notice netifd: 4g (23073): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "4g" } (Permission denied)
Thu Feb  2 13:43:27 2023 daemon.notice netifd: Interface '4g' is now down
Thu Feb  2 13:43:27 2023 daemon.notice netifd: Interface '4g' is setting up now
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using nameserver 10.30.0.1#53
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using nameserver 10.196.8.6#53
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using only locally-known addresses for test
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using only locally-known addresses for local
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Thu Feb  2 13:43:27 2023 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Thu Feb  2 13:43:28 2023 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Thu Feb  2 13:43:28 2023 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Thu Feb  2 13:43:28 2023 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 1 addresses
Thu Feb  2 13:43:28 2023 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Thu Feb  2 13:43:28 2023 daemon.notice netifd: 4g (23091): Waiting for SIM initialization
Thu Feb  2 13:43:28 2023 daemon.notice netifd: 4g (23091): Failed to parse message data
Thu Feb  2 13:43:28 2023 daemon.notice netifd: 4g (23091): PIN verification is disabled
Thu Feb  2 13:43:28 2023 daemon.notice netifd: 4g (23091): Device does not support 802.3 mode. Informing driver of raw-ip only for wwan0 ..
Thu Feb  2 13:43:28 2023 daemon.notice netifd: 4g (23091): Waiting for network registration
Thu Feb  2 13:43:30 2023 daemon.notice netifd: 4g (23091): Starting network 4g
Thu Feb  2 13:43:30 2023 daemon.notice netifd: 4g (23091): Setting up wwan0
Thu Feb  2 13:43:30 2023 daemon.notice netifd: Interface '4g' is now up
Thu Feb  2 13:43:30 2023 daemon.notice netifd: Network device 'wwan0' link is up
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using nameserver 2a00:23ee:0:8000::5#53
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using nameserver 2a00:23ee:0:8000::6#53
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using nameserver 10.30.0.1#53
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using nameserver 10.196.8.6#53
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using only locally-known addresses for test
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using only locally-known addresses for local
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Thu Feb  2 13:43:30 2023 user.notice firewall: Reloading firewall due to ifup of 4g (wwan0)
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 2 addresses
Thu Feb  2 13:43:30 2023 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Thu Feb  2 13:43:31 2023 user.notice firewall: Reloading firewall due to ifupdate of 4g (wwan0)

Can you change this to option pdptype 'ipv4v6' as EE UK is dualstack 464xlat, and you are being given the ipv4 cgnat name servers and the ipv6 name server.

I have mine set to ipv4 only and it connects without issue, but mine is a business sim data only.

As per my OP when setting to dual stack or ipv4 only I get

Unable to connect IPv4

this is multi sim i will try a data only one.

Just tired data only sim and I get Unable to connect IPv4 on ipv4 or dual stack again setting to ipv6 only and it connects.

Just tried modemmanager ipv4 only and got

Thu Feb  2 14:24:20 2023 daemon.notice netifd: 4g (7190): starting connection with apn 'everywhere'...
Thu Feb  2 14:24:20 2023 daemon.info [3793]: <info>  [modem0] simple connect started...
Thu Feb  2 14:24:20 2023 daemon.info [3793]: <info>  [modem0] simple connect state (3/8): enable
Thu Feb  2 14:24:20 2023 daemon.info [3793]: <info>  [modem0] state changed (disabled -> enabling)
Thu Feb  2 14:24:20 2023 daemon.info [3793]: <info>  [modem0] power state updated: on
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] simple connect state (4/8): wait to get fully enabled
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] state changed (enabling -> enabled)
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] simple connect state (5/8): register
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] 3GPP registration state changed (unknown -> registering)
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] 3GPP registration state changed (registering -> home)
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] state changed (enabled -> registered)
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] simple connect state (6/8): bearer
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] simple connect state (7/8): connect
Thu Feb  2 14:24:21 2023 daemon.info [3793]: <info>  [modem0] state changed (registered -> connecting)
Thu Feb  2 14:24:22 2023 daemon.info [3793]: <info>  [modem0/bearer5] couldn't start network: QMI protocol error (14): 'CallFailed'
Thu Feb  2 14:24:22 2023 daemon.info [3793]: <info>  [modem0/bearer5] verbose call end reason (2,208): [internal] pdn-ipv4-call-disallowed
Thu Feb  2 14:24:22 2023 daemon.warn [3793]: <warn>  [modem0/bearer5] connection attempt #1 failed: Call failed: internal error: pdn-ipv4-call-disallowed
Thu Feb  2 14:24:22 2023 daemon.info [3793]: <info>  [modem0] state changed (connecting -> registered)
Thu Feb  2 14:24:22 2023 daemon.info [3793]: <info>  [modem0/bearer5] connection #1 finished: duration 0s, tx: 0 bytes, rx: 0 bytes
Thu Feb  2 14:24:22 2023 daemon.notice netifd: 4g (7190): error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Call failed: internal error: pdn-ipv4-call-disallowed'
Thu Feb  2 14:24:22 2023 daemon.notice netifd: 4g (7230): stopping network
Thu Feb  2 14:24:22 2023 daemon.notice netifd: 4g (7230): running disconnection (common)
Thu Feb  2 14:24:22 2023 daemon.notice netifd: 4g (7230): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "4g" } (Permission denied)
Thu Feb  2 14:24:22 2023 daemon.notice netifd: 4g (7230): successfully disconnected all bearers in the modem
Thu Feb  2 14:24:22 2023 daemon.info [3793]: <info>  [modem0] state changed (registered -> disabling)
Thu Feb  2 14:24:22 2023 daemon.info [3793]: <info>  [modem0] 3GPP registration state changed (home -> unknown)
Thu Feb  2 14:24:22 2023 daemon.info [3793]: <info>  [modem0] state changed (disabling -> disabled)
Thu Feb  2 14:24:22 2023 daemon.notice netifd: 4g (7230): successfully disabled the modem
Thu Feb  2 14:24:22 2023 daemon.notice netifd: Interface '4g' is now down

then modemmanager dual stack

Thu Feb  2 14:25:20 2023 daemon.notice netifd: 4g (7619): starting connection with apn 'everywhere'...
Thu Feb  2 14:25:20 2023 daemon.info [3793]: <info>  [modem0] simple connect started...
Thu Feb  2 14:25:20 2023 daemon.info [3793]: <info>  [modem0] simple connect state (3/8): enable
Thu Feb  2 14:25:20 2023 daemon.info [3793]: <info>  [modem0] state changed (disabled -> enabling)
Thu Feb  2 14:25:20 2023 daemon.info [3793]: <info>  [modem0] power state updated: on
Thu Feb  2 14:25:21 2023 daemon.info [3793]: <info>  [modem0] simple connect state (4/8): wait to get fully enabled
Thu Feb  2 14:25:21 2023 daemon.info [3793]: <info>  [modem0] state changed (enabling -> enabled)
Thu Feb  2 14:25:21 2023 daemon.info [3793]: <info>  [modem0] simple connect state (5/8): register
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0] 3GPP registration state changed (unknown -> registering)
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0] 3GPP registration state changed (registering -> home)
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0] state changed (enabled -> registered)
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0] simple connect state (6/8): bearer
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0] simple connect state (7/8): connect
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0] state changed (registered -> connecting)
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0/bearer7] couldn't start network: QMI protocol error (14): 'CallFailed'
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0/bearer7] verbose call end reason (2,208): [internal] pdn-ipv4-call-disallowed
Thu Feb  2 14:25:22 2023 daemon.debug [3793]: [/dev/cdc-wdm0] Allocating new client ID...
Thu Feb  2 14:25:22 2023 daemon.debug [3793]: [/dev/cdc-wdm0] Registered 'wds' (version 1.67) client with ID '22'
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0/bearer7] QMI IPv6 Settings:
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0/bearer7]     address: 2a01:4c8:1084:b621:7522:babf:e29c:848f/64
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0/bearer7]     gateway: 2a01:4c8:1084:b621:9451:b4c0:4918:6c19/64
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0/bearer7]     DNS #1: 2a01:4c8:f000:1::1
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0/bearer7]     DNS #2: 2a01:4c8:f000:1::2
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0/bearer7]        MTU: 1500
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0] state changed (connecting -> connected)
Thu Feb  2 14:25:22 2023 daemon.info [3793]: <info>  [modem0] simple connect state (8/8): all done
Thu Feb  2 14:25:22 2023 daemon.notice netifd: 4g (7619): successfully connected the modem
Thu Feb  2 14:25:22 2023 daemon.notice netifd: 4g (7619): signal refresh rate is not set
Thu Feb  2 14:25:22 2023 daemon.notice netifd: 4g (7619): network operator name: EE
Thu Feb  2 14:25:22 2023 daemon.notice netifd: 4g (7619): network operator MCCMNC: 23430
Thu Feb  2 14:25:22 2023 daemon.notice netifd: 4g (7619): registration type: home
Thu Feb  2 14:25:22 2023 daemon.notice netifd: 4g (7619): access technology: lte
Thu Feb  2 14:25:22 2023 daemon.notice netifd: 4g (7619): signal quality: 75%
Thu Feb  2 14:25:23 2023 daemon.notice netifd: 4g (7619): IPv6 connection setup required in interface 4g: static
Thu Feb  2 14:25:23 2023 daemon.notice netifd: 4g (7619): adding IPv6 address 2a01:4c8:1084:b621:7522:babf:e29c:848f, prefix 64
Thu Feb  2 14:25:23 2023 daemon.notice netifd: 4g (7619): adding default IPv6 route via 2a01:4c8:1084:b621:9451:b4c0:4918:6c19
Thu Feb  2 14:25:23 2023 daemon.notice netifd: 4g (7619): adding primary DNS at 2a01:4c8:f000:1::1
Thu Feb  2 14:25:23 2023 daemon.notice netifd: 4g (7619): adding secondary DNS at 2a01:4c8:f000:1::2
Thu Feb  2 14:25:23 2023 daemon.notice netifd: Interface '4g' is now up

manually added 464xlat interface and now see packets going across it but still no ipv4 connectivity from lan only ipv6.

however on this data sim i wasn't given the ipv4 nameservers as per the other sim

nameserver 2a01:4c8:f000:1::1
nameserver 2a01:4c8:f000:1::2
root@OpenWrt:/# ping 1.1.1.1
PING 1.1.1.1 (1.[  258.392352] [nat46] Could not translate v4->v6
1.1.1): 56 data bytes
[  259.397936] [nat46] Could not translate v4->v6
[  260.402313] [nat46] Could not translate v4->v6
[  261.406786] [nat46] Could not translate v4->v6
[  262.411244] [nat46] Could not translate v4->v6
[  263.415631] [nat46] Could not translate v4->v6
[  264.419998] [nat46] Could not translate v4->v6
[  265.424377] [nat46] Could not translate v4->v6
[  266.428939] [nat46] Could not translate v4->v6
[  267.433483] [nat46] Could not translate v4->v6
[  268.437968] [nat46] Could not translate v4->v6
[  269.442544] [nat46] Could not translate v4->v6
[  270.447041] [nat46] Could not translate v4->v6
[  271.451533] [nat46] Could not translate v4->v6
[  272.456017] [nat46] Could not translate v4->v6

If the interface is manually added it should be put into the right zone (wan).

Yeah already tried that and didn't make any difference.

Done a bit more on this now when setting to IPV6 i'm able to ping ipv4 ip's

root@OpenWrt:/# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=52 time=67.249 ms
64 bytes from 1.1.1.1: seq=1 ttl=52 time=29.127 ms

But http/s to websites that only run on ipv4 fail.

OK, what will be the outcome of this?
wget -4 -s http://openwrt.org

root@OpenWrt:/# wget -4 -s http://openwrt.org
Downloading 'http://openwrt.org'
Connecting to 139.59.209.225:80
Connection error: Connection failed