DWR-921 with OpenWrt 18.06.2 ends the connection

D-Link dwr-921 with openwrt 18.06.2 ends the connection one or 2 times a day.
The only way I found, to reconnect is to type "ifup wwan" into console.
The status in LuCI shows, its connected (over LTE) with the provider.
A long while every day at 16:20, the connection drops (even it shows status "connected"), now I don't see any systematic.
I tried the suggestions in the forum:

cron job
 * * * * if [ "$(ifstatus wwan | grep '"up"' | awk '{print $2}')" != "true," ]; then ifup wwan; fi

I see it in the log-file, but it has no effect, only by hand via console, most probably because its all the time "up".

  root@OpenWrt:~# ifstatus wwan
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 12275,
	"l3_device": "wwan0",
	"proto": "wwan",
	"updated": [
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
	],
	"ipv6-address": [
	],
	"ipv6-prefix": [
	],
	"ipv6-prefix-assignment": [
	],
	"route": [
	],
	"dns-server": [
	],
	"dns-search": [
	],
	"neighbors": [
	],
	"inactive": {
		"ipv4-address": [
		],
		"ipv6-address": [
		],
		"route": [
		],
		"dns-server": [
		],
		"dns-search": [
		],
		"neighbors": [
		]
	},
	"data": {
		"cid_4": "10",
		"pdh_4": "xxxxxxxx" (number removed)
	}
}

I see it in the log-file, but it has no effect, only by hand via console, most probably because its all the time "up".
With 18.06.4 there was the same problem.
Can anyone help my?

OpenWRT Status:
Hostname: OpenWrt
Model: D-Link DWR-921 C3
Architecture: MediaTek MT7620N ver:2 eco:6
Firmware Version: OpenWrt 19.07.1 r10911-c155900f66 / LuCI openwrt-19.07 branch git-20.029.45734-adbbd5cPreformatted text

Post here the output of uci export network please.

root@OpenWrt:~# uci export network
package network

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

config globals 'globals'
	option ula_prefix 'fd3f:0819:098a::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '00:adxxxxxxx' (changed)

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

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr '00:ad:xxxxx' (changed)

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'
	option reqaddress 'none'
	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 'wwan'
	option apn 'drei.net'
	option auto '0'

config route

config interface 'VPN'
	option ifname 'tun0'
	option proto 'none'
	option delegate '0'

Thank you for supporting me

Why is auto=0 in wwan?

Yes there is a misconfiguration in wwan, I've ignored too long.
"unsupported protocol type: install protocol extensions"
If I open this: No packages matching " luci-proto "
I found no way to configure
after SW update I got a lot of "luci-proto", don't know which to installPreformatted text

The wwan is not exactly a protocol, more like autodetecting. There is no luci package. Try to install luci-proto-{ncm,qmi,3g,modemmanager] to see if it will satisfy it.
Otherwise do it manually:
uci set network.wwan.auto=1 ; uci commit network ; ifup wwan

Now is:

config interface 'wwan'
	option proto 'wwan'
	option apn 'drei.net'
	option auto '1'

manually set,
the installation of the suggested luci-proto made no change.
After reboot, there was after 1or 2 Minutes a disconnection.
2. reboot no problems, I have to watch it for a few days, than I give a feedback.
Thank you very much for your support :smile:Preformatted text

1 Like

After changing the suggested settings, added the mentioned programs, the connection stopps ervery day around 16:30 and reconnect mit "ifup wwan" is unpossible, I've to reboot the modem.

Log entry at this point:
Thu Apr 2 16:34:30 2020 daemon.notice netifd: wwan_4 (2660): udhcpc: sending renew to 10.128.102.79
(but "daemon.notice netifd: wwan_4 (2401): udhcpc: sending renew to xxx" appears more often)
Status:

root@OpenWrt:~# ifstatus wwan
{
	"up": false,
	"pending": true,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"proto": "wwan",
	"data": {
		
	}
}

root@OpenWrt:~# uci export network
package network

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

config globals 'globals'
	option ula_prefix 'xx:xx:xx::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr 'xxxxxxxxxx'

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

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr 'xxxxxxxxxx'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'
	option reqaddress 'none'
	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 'wwan'
	option apn 'drei.net'
	option auto '1'

config route

config interface 'VPN'
	option ifname 'tun0'
	option proto 'none'
	option delegate '0'

My conclusion for the moment: better to restore the older config, if there is no better solution.
But thank you for the help until here.

I would give it a try by defining the protocol, instead of using the autodetect.
Since you have already a working configuration, you've got nothing to lose.

Please give me a hint how to do this, I cannot find any autodected protocol, so I don't understand you suggestion. Thanks in advance.

Your modem is a Qualcomm from what I can see in the device page. So I would start from QMI, since it is Qualcomm proprietary protocol.

with installing QMI, I stuck with USBserial ("https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle"). Even the log print USBserial:

Fri Apr  3 15:10:52 2020 kern.info kernel: [   15.698575] usbcore: registered new interface driver qmi_wwan
Fri Apr  3 15:10:52 2020 kern.info kernel: [   15.795230] usbcore: registered new interface driver cdc_mbim
Fri Apr  3 15:10:52 2020 kern.info kernel: [   15.838283] usbcore: registered new interface driver option
Fri Apr  3 15:10:52 2020 kern.info kernel: [   15.849546] usbserial: USB Serial support registered for GSM modem (1-port)
Fri Apr  3 15:10:52 2020 kern.info kernel: [   15.943558] usbcore: registered new interface driver qcserial
Fri Apr  3 15:10:52 2020 kern.info kernel: [   15.955178] usbserial: USB Serial support registered for Qualcomm USB modem

I cannot find in ../dev/ and "usbmode -l" gives no answer. A power off/on restart did'nt change.

because qmi modem with protocol qmi cellular is active and /dev/cdc-wdm0 is the device, it seems apart from the missing USBserial, it seems to work. I'll check it the next days and thank you very much for your support. :sweat_smile:

1 Like