D-Link DWR-921 C3's WWAN connection/LTE modem hangs/stops working after some hours/2 days

It seems to happen most often after 2 days since booting, but I'm pretty sure it had happened very soon after restarting too (restart was done because of this exact problem). The router has freshly installed openwrt 18.06, unmodified except for configuring the modem.

Before this everything works perfectly. After, no internet connection, ifdown wwan and ifup wwan don't help, same with restarting wwan in luci, output of uqmi -d /dev/cdc-wdm0 --get-data-status is "disconnected". uqmi -d /dev/cdc-wdm0 --start-network doesn't help.

Nothing like this happens on stock D-Link firmware.

Any idea how to fix this?

logread output: https://pastebin.com/raw/NHYiD22E
dmesg output: https://pastebin.com/raw/QT2eUeKg
Both done after I noticed internet is down in the morning, it had to go down at night.

Here's a list of exactly all the configuration that was done on this device after flashing openwrt:

passwd
uci set network.wwan=interface
uci set network.wwan.proto='qmi'
uci set network.wwan.device='/dev/cdc-wdm0'
uci set network.wwan.apn='internet'
uci set network.wwan.modes='lte'
uci commit network
uci set firewall.@zone[1].network='wan wwan wan6'
uci commit firewall
ifup wwan
opkg update
opkg install luci-proto-qmi
/etc/init.d/uhttpd restart
reboot
1 Like

I tried playing with lte_modem_enable gpio. I’ll try this when the bug materializes again.
internet works ok
I do echo “0” > /sys/class/gpio/lte_modem_enable/value
then echo “1” > /sys/class/gpio/lte_modem_enable/value
internet doesn’t work

logread output:

Fri Aug 24 19:57:21 2018 kern.info kernel: [ 1133.343003] usb 1-1: USB disconnect, device number 2
Fri Aug 24 19:57:21 2018 kern.info kernel: [ 1133.357143] qmi_wwan 1-1:1.4 wwan0: unregister 'qmi_wwan' usb-101c0000.ehci-1, WWAN/QMI device
Fri Aug 24 19:57:21 2018 daemon.notice netifd: Network device 'wwan0' link is down
Fri Aug 24 19:57:21 2018 daemon.notice netifd: Network alias 'wwan0' link is down
Fri Aug 24 19:57:21 2018 daemon.notice netifd: Interface 'wwan_4' has link connectivity loss
Fri Aug 24 19:57:21 2018 daemon.notice netifd: Interface 'wwan_4' is disabled
Fri Aug 24 19:57:21 2018 daemon.notice netifd: wwan_4 (1378): udhcpc: SIOCGIFINDEX: No such device
Fri Aug 24 19:57:21 2018 daemon.notice netifd: wwan_4 (1378): udhcpc: SIOCGIFINDEX: No such device
Fri Aug 24 19:59:02 2018 kern.info kernel: [ 1179.698888] usb 1-1: new high-speed USB device number 3 using ehci-platform
Fri Aug 24 19:59:02 2018 kern.info kernel: [ 1179.846894] qmi_wwan 1-1:1.4: cdc-wdm0: USB WDM device
Fri Aug 24 19:59:02 2018 daemon.notice netifd: Interface 'wwan_4' is enabled
Fri Aug 24 19:59:02 2018 kern.info kernel: [ 1179.912948] qmi_wwan 1-1:1.4 wwan0: register 'qmi_wwan' at usb-101c0000.ehci-1, WWAN/QMI device, mac

ifup wwan, ifdown wwan and ifup wwan

Fri Aug 24 20:01:29 2018 daemon.notice netifd: Interface 'wwan_4' is disabled
Fri Aug 24 20:01:29 2018 daemon.notice netifd: wwan (2431): Stopping network wwan
Fri Aug 24 20:01:34 2018 daemon.notice netifd: Interface 'wwan' is now down
Fri Aug 24 20:01:34 2018 daemon.notice netifd: Interface 'wwan' is setting up now
Fri Aug 24 20:01:52 2018 daemon.notice netifd: wwan (2542): Stopping network wwan
Fri Aug 24 20:01:52 2018 daemon.notice netifd: wwan (2542): Command failed: Permission denied
Fri Aug 24 20:01:52 2018 daemon.notice netifd: Interface 'wwan' is now down
Fri Aug 24 20:01:52 2018 daemon.notice netifd: Interface 'wwan' is setting up now

ifup wwan

Fri Aug 24 20:03:17 2018 daemon.notice netifd: wwan (2765): Stopping network wwan
Fri Aug 24 20:03:17 2018 daemon.notice netifd: wwan (2765): Command failed: Permission denied
Fri Aug 24 20:03:17 2018 daemon.notice netifd: Interface 'wwan' is now down
Fri Aug 24 20:03:17 2018 daemon.notice netifd: Interface 'wwan' is setting up now

ifdown wwan

Fri Aug 24 20:04:06 2018 daemon.notice netifd: wwan (2850): Stopping network wwan
Fri Aug 24 20:04:06 2018 daemon.notice netifd: wwan (2850): Command failed: Permission denied
Fri Aug 24 20:04:06 2018 daemon.notice netifd: Interface 'wwan' is now down

ifup wwan

Fri Aug 24 20:04:22 2018 daemon.notice netifd: Interface 'wwan' is setting up now

few minutes later ifstatus wwan

{
"up": false,
"pending": true,
"available": true,
"autostart": true,
"dynamic": false,
"proto": "qmi",
"data": {

}

}

stopped wwan in luci

Fri Aug 24 20:08:23 2018 daemon.notice netifd: wwan (3540): Stopping network wwan
Fri Aug 24 20:08:23 2018 daemon.notice netifd: wwan (3540): Command failed: Permission denied
Fri Aug 24 20:08:23 2018 daemon.notice netifd: Interface 'wwan' is now down

started wwan in luci

Fri Aug 24 20:08:53 2018 daemon.notice netifd: Interface 'wwan' is setting up now
Fri Aug 24 20:08:54 2018 daemon.notice netifd: wwan (3631): "No effect"
Fri Aug 24 20:08:54 2018 daemon.notice netifd: wwan (3631): "Failed to connect to service"

internet still not working, I reboot and it works.

Hello Martin,
are there any news on this?
The stock firmware v1.00 C3 was giving me some routing nuisances (some devices unable to access the internet while others did), so I flashed OpenWrt.
Since the post-installation configuration uci commands on the device's page to activate the LTE functionality did not work, I went back to stock upgrading to v1.01.3.006, and things seem now to work fine.
But I'm still interested in OpenWrt for the additional functionality, so I ended up on this page where you seem to have found the correct configuration uci commands to make LTE work.
Anyways, if OpenWrt does not guarantee a completely stable connection, Il'' stay on stock...

Thanks!!

You can use the commands I used to configure the modem or do it in LuCI too. No luck with the bug about which this topic is about. No one paid any attention to my bug report, it can't only be dealt with by configuring keepalive to restart the router every time the modem goes mad, but be careful not to make it bootloop in the process (if the connection is down for other reasons it will keep restarting), you could code a smart way to workaround this using things like ifstatus.

It would be nice if you could flash openwrt, configure it the same way as I did and confirm that you have an identical bug in the bug report, this will perhaps lead to someone fixing this.
Bug report link: https://bugs.openwrt.org/index.php?do=details&task_id=1816

1 Like

Thanks, Martin.
As soon as I can find a spare half-hour to do this, I'll flash OpenWrt, apply this configuration and see if the bug shows up or not (if it does, I'll report it and go back to v1.01.3.006 - I have no particular love for workarounds and I need the box up and running...).

In any case, when I'm done, I'll give you a shout.

Did you try to contact the porting author https://github.com/openwrt/openwrt/pull/813 ( ```
Signed-off-by: Pawel Dembicki paweldembicki@gmail.com

I setup a DWR-921-C3.
I installed OpenWrt SNAPSHOT, r6894+1716-547042398a.

I started router 5 days ago and bellow is the result. Modem is still working. I have a connection.
18:17:59 up 5 days, 5:16, load average: 0.00, 0.00, 0.00

At this moment everything is working.

Frend of mine have buggy dwr-116. Couple days/hours after start usb stop working. Plug in ald plug out didn't help, only reboot. Maybe is the same problem with some version revision of mt7620.

5 days is nothing.

Mine (also snapshot) is currently at Uptime 4d 1h 33m 17s, but it will definitely break sooner or later again. It's somewhat random, sometimes it will break daily or even few times a day, sometimes not.

Plus, it might be worth it trying with my exact configuration listed in the first post, it's very minimal, pretty much just setting up the modem and thus very easy to reproduce.

I have:

config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option ifname 'wwan0'
        option apn 'internet'

At this moment uptime is 8 days. I will ask in polish forum, maybe someone have DWR-921 C3 and the same problem.

Mine was dead when I woke up today. So it survived for a week.

The most minimal (least amount of changes in comparison to stock) config the problem was occuring with is in the first post, it's slightly different than yours. I've made a few small changes since then that don't have impact on the bug.

I change the location of router. 5 days and still no problem.

Could You paste fresh bootlog? Link is broken.

Sorry for the delay, I've been busy.

logread output: https://pastebin.com/raw/TGhxRrUc
dmesg output: https://pastebin.com/raw/1HsMUCwX

I have no idea where is the problem. My device work stable and I can't reproduce Your problem. Another guy from Poland said, that his device work stable on 18.06.

Hi guys,
I also have a DWR-921 with OpenWRT

I noticed missing connection every 8 hours

Found this post and others I set it up the following in scheduled tasks:

ifup wwan
30 2 * * * sleep 70 && touch /etc/banner && reboot
30 10 * * * sleep 70 && touch /etc/banner && ifdown wwan && sleep 70 && ifup wwan
30 18 * * * sleep 70 && touch /etc/banner && ifdown wwan && sleep 70 && ifup wwan

this way the connection start up on reboot
the router reboot every day at 2:30
and close and open the wwan connection two more times to keep it always running

it seems to work
putting wwan down and up take less time of a total reboot

my questions are:

  • is there any other way for keep the connection running instead of ifdown and ifup?
  • do I need the sleep and touch for down and up given no reboot is happening?

thanks for sharing

PS:
my provider is a MVNO, is there some configuration I can ask them to keep the connection alive?

i have exactly the same problem with a dwr-921 c1 running openwrt 18.06.2

are there any news on this problem?

@AdamQuadmon do you still have your router configured that way? was it working reliably in the last two months?

also, are you absolutely sure that this solution can be used without any security concerns? and what are "70" and "/etc/banner" referring to?

I'm still having issues, I think I have to check better when the connectivity drop to understand why and how to act

here is the link to the code for the cron
https://oldwiki.archive.openwrt.org/doc/howto/cron#periodic_reboot_of_a_router

there are comments explaining the commands

1 Like

New URL:
https://openwrt.org/docs/guide-user/base-system/cron#periodic_reboot_of_a_router

The old page is for archival purposes only and does not receive updates any more.

thanks @tmomas, in that page there is also a script for reboot on internet drops, but I'm stuck with another problem.

my busybox only ping by IP, when pinging domains it says bad address

I'm investigating for it, any help in troubleshooting this too?

Have you tried setting up other DNS servers?
You can modify the /tmp/resolv.conf and /tmp/resolv.conf.auto. DNS requests from local use /tmp/resolv.conf, and DNS requests from LAN use /tmp/resolv.conf.auto.

changing nameservers here to OpenDns ones solved the issue

I also created the auto reboot script described in that link and now my cron is the follow:

ifup wwan

# Check every 15 minutes ping to google.com
# If it is failed, then reboot the router
# Note: To avoid infinite reboot loop, wait 70 seconds and touch a file in /etc
# so clock will be set properly on reboot before cron starts.
0,15,30,45 * * * * sleep 70 && touch /etc/banner && /root/pingRouterCheckReboot.sh

30 4 * * * sleep 70 && touch /etc/banner && reboot
#30 12 * * * sleep 70 && touch /etc/banner && ifdown wwan && sleep 70 && ifup wwan
#30 20 * * * sleep 70 && touch /etc/banner && ifdown wwan && sleep 70 && ifup wwan

I have also commented out the rules used for reconnect the wwan two times a day

now i will test the result

but looking at the script it performs a reboot if no connectivity found, isn't it better to ifdown wwan && ifup wwan instead of a full reboot?