LTE connection won't establish with one sim card

Hi to all,
D-Link DWR-921 C1 OpenWrt 21.02.1 r16325
I have to sim cards, one (Vodafone GR) works fine with LTE router with no problems for 2 months now, the other sim (WIND GR) does not want to work. I change the APN to the according one (gint.b-online.gr) of course(the one I use the sim when I inserted to the mobile phone).

The logs at the end...

Wed Mar 30 11:18:37 2022 daemon.notice netifd: wwan (6165): Starting network wwan
Wed Mar 30 11:18:37 2022 daemon.notice netifd: wwan (6165): Unable to connect IPv4
Wed Mar 30 11:18:38 2022 daemon.notice netifd: wwan (6261): Stopping network wwan
Wed Mar 30 11:18:38 2022 daemon.notice netifd: wwan (6261): Command failed: Permission denied
Wed Mar 30 11:18:38 2022 daemon.notice netifd: Interface 'wwan' is now down
Wed Mar 30 11:18:38 2022 daemon.notice netifd: Interface 'wwan' is setting up now

What is going on?
Thank you in advance for any help

Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have

ubus call system board; \
uci export network; uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user

Here you are sir. (I think I checked for passwords, MAC addresses any public IP addresses, if otherwise please note)

root@OpenWrt:~# ubus call system board; \
> uci export network; uci export dhcp; uci export firewall; \
> head -n -0 /etc/firewall.user
{
	"kernel": "5.4.154",
	"hostname": "OpenWrt",
	"system": "MediaTek MT7620N ver:2 eco:6",
	"model": "D-Link DWR-921 C1",
	"board_name": "dlink,dwr-921-c1",
	"release": {
		"distribution": "OpenWrt",
		"version": "21.02.1",
		"revision": "r16325-88151b8303",
		"target": "ramips/mt7620",
		"description": "OpenWrt 21.02.1 r16325-88151b8303"
	}
}
package network

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 'xx::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'

config device
	option name 'eth0.1'
	option macaddr 'xx'

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 device
	option name 'eth0.2'
	option macaddr 'xxx'

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

config interface 'wan6'
	option device 'eth0.2'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 1 2 3 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '4 6t'

config interface 'wwan'
	option proto 'qmi'
	option device '/dev/cdc-wdm0'
	option autoconnect '1'
	option delay '5'
	option auth 'none'
	option apn 'internet'
	option pdptype 'ipv4'

package dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option confdir '/tmp/dnsmasq.d'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

package firewall

config defaults
	option syn_flood '1'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'REJECT'

config zone
	option name 'lan'
	list network 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	option network 'wan wan6 wwan'

config forwarding
	option src 'lan'
	option dest 'wan'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option src_ip 'fc00::/6'
	option dest_ip 'fc00::/6'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

config rule
	option name 'Support-UDP-Traceroute'
	option src 'wan'
	option dest_port '33434:33689'
	option proto 'udp'
	option family 'ipv4'
	option target 'REJECT'
	option enabled 'false'

config include
	option path '/etc/firewall.user'

# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.

# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.

Could be some misconfiguration. First verify that the connection is operational:

uqmi -d /dev/cdc-wdm0 --get-data-status
uqmi -d /dev/cdc-wdm0 --get-signal-info
uqmi -d /dev/cdc-wdm0 --start-network --apn gint.b-online.gr --autoconnect --ip-family unspecified
uqmi -d /dev/cdc-wdm0 --get-data-status <- again to verify if it is connected.

In most cases you can leave APN unset and it will use default APN stored on the SIM card. This can be more compatible since the APN should match your subscription.
Kind of a long shot but is this carrier IPv6 only?

No light


root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"disconnected"
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
	"type": "wcdma",
	"rssi": -85,
	"ecio": 7
}
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --start-network --apn gint.b-online.gr --
autoconnect --ip-family unspecified
"No effect"
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-data-status 
"disconnected"

Iam not sure but I guess not. Anyway I tried all ipv6 settings, no joy....

Try this one:

wds=`/sbin/uqmi -s -d /dev/cdc-wdm0 --get-client-id wds`
/sbin/uqmi -d /dev/cdc-wdm0 --set-client-id wds,"$wds" --start-network gint.b-online.gr --
autoconnect
/sbin/uqmi -d /dev/cdc-wdm0 --get-data-status 

If this doesn't make any difference, try to reset the modem:

/sbin/uqmi -d /dev/cdc-wdm0 --set-device-operating-mode offline
/sbin/uqmi -d /dev/cdc-wdm0 --set-device-operating-mode reset
/bin/sleep 20
/sbin/uqmi -d /dev/cdc-wdm0 --set-device-operating-mode online
/sbin/uqmi -d /dev/cdc-wdm0 --set-autoconnect enabled
/sbin/uqmi -d /dev/cdc-wdm0 --network-register
/sbin/uqmi -d /dev/cdc-wdm0 --set-client-id wds,"$wds" --start-network gint.b-online.gr --
autoconnect
/sbin/uqmi -d /dev/cdc-wdm0 --get-data-status 

Hi
I could be an issue with what your modem has stored as default APN.
You can use qmicli to check the default APN or use my modified uqmi version.

It´s available at https://github.com/mrhaav/openwrt/tree/master/21.02.1, or:

wget https://github.com/mrhaav/openwrt/raw/master/21.02.1/uqmi_2022-03-15-0.4_mipsel_24kc.ipk
opkg install uqmi_2022-03-15-0.4_mipsel_24kc.ipk