4g modem misbehaving, not showing MAC address and hangs after interface restart

Hello, I have the Quectel EP06-E running in qmi mode and so far it is working as it should when I first turn my device (x86). However, I have noticed that it is not showing MAC address under 'devices'. I know that 4g modems don't have static MAC but I swear during my fiddling around I somehow managed to see the MAC on LuCI devices page, however when that happened, there was no internet connectivity and I didn't remember what I had done to get the MAC to show.

I looked through the syslog and found the following error which I am unsure if it is related:

daemon.notice procd: /etc/rc.d/S95done: -Warning ** Error reading from istream: Resource temporarily unavailable
daemon.notice procd: /etc/rc.d/S95done: error: couldn't create client for the 'dms' service: CID allocation failed in the CTL client: endpoint hangup
daemon.notice procd: /etc/rc.d/S95done: wwan0
daemon.notice procd: /etc/rc.d/S95done: Y
daemon.notice netifd: Network device 'wwan0' link is up
daemon.notice procd: /etc/rc.d/S95done: Profile at '/etc/qmi-network.conf' not found...
daemon.notice procd: /etc/rc.d/S95done: Checking data format with 'qmicli -d /dev/cdc-wdm0 --wda-get-data-format '...
user.notice nlbwmon: Reloading nlbwmon due to ifup of loopback (lo)
daemon.notice procd: /etc/rc.d/S95done: -Warning ** Error reading from istream: Resource temporarily unavailable
daemon.notice procd: /etc/rc.d/S95done: error: couldn't create client for the 'wda' service: CID allocation failed in the CTL client: endpoint hangup
daemon.notice procd: /etc/rc.d/S95done: Device link layer protocol not retrieved: WDA unsupported
daemon.notice procd: /etc/rc.d/S95done: Starting network with 'qmicli -d /dev/cdc-wdm0 --wds-start-network=  --client-no-release-cid '...
daemon.notice procd: /etc/rc.d/S95done: -Warning ** Error reading from istream: Resource temporarily unavailable
daemon.notice procd: /etc/rc.d/S95done: error: couldn't create client for the 'wds' service: CID allocation failed in the CTL client: endpoint hangup
daemon.notice procd: /etc/rc.d/S95done: error: network start failed, client not allocated

The device is working just fine but then again, if I restart the interface, it just hangs, loses connection and Virtual dynamic interface (DHCP client) interface disappears completely from the interface list - it is worth noting I cannot edit it while it is still on the list, LuCI gives me the following error in red at the top (this only applies to the dhcp client interface, I can still edit the wwan0 interface):

TypeError
sref is null

The only way to fix this, weirdly enough, would be to completely shutdown the device and unplug the power cable, and not just simple reboot. I suspect this might be caused by the fact there is still power over the usb port when the x86 machine is switched off.

  • /etc/config/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 'fd19:xxxx:xxxx::/48'

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

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 proto 'dhcp'
	option type 'bridge'
	option device 'eth4'

config interface 'wan6'
	option device 'eth4'
	option proto 'dhcpv6'
	option type 'bridge'

config device
	option name 'wwan0'

config interface 'mobile_data'
	option proto 'qmi'
	option device '/dev/cdc-wdm0'
	option apn 'internet'
	option auth 'none'
	option pdptype 'ipv4v6'
	option peerdns '0'
  • /etc/config/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'
	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'

config dhcp 'mobile_data'
	option interface 'mobile_data'
	option ignore '1'

I also see that

/etc/qmi-network.conf

does not exist on the filesystem.

I think the problem lies the way the modem is initialized - if I physically disconnect the usb adapter card and reconnect it again while OpenWrt is running, the connection is not established. If I restart the system or even shut it down, without unplugging and replugging the power cable first, upon reboot, I still get the same issue. Not sure what is causing this and at this point I am not sure if the problem lies within my OpenWrt configuration, the linux driver, the modem firmware, or the developer board I use to connect the modem to the router. It should be getting enough power as it is connected through a thunderbolt hub which should provide enough amps because I can use fast charging on my phone through the same hub. I will be getting a dedicated type E to type A adapter so I can use the internal usb 3.2 gen 1 connector on the motherboard (which is type E) but in the meantime any feedback would be good.

Update:

I switched to modemmanager and the modem behaves alright.

However.

When using modemmanager and then I connect with a client device to the router, and run a VPN client on the client device using wireguard, I get connected to the VPN server (no issues there), but then there is no internet connection at all. If I use OpenVPN protocol, I do get internet connection, but I do not want to use OpenVPN due to it being slow. I tried with another device as I thought it might be the client that has this problem, but it turns out there is something else I am missing in the configuration, as both a Windows and a Linux machine behave the same when using WireGuard.

Modem default MTU is 1358. I tried changing that, I tried lowering the client MTU to that, still not working.