NCM interface with delayed start?

I was using self made scripts to manage NCM on ME909s-120 and use DHCP client on wwan0
I decided to try luci. However there seems to be a problem with initializing the wwan interface.

I see the following logged after reboot:

Mon Jun 17 00:03:39 2019 daemon.notice netifd: Interface 'wwan' is setting up now
Mon Jun 17 00:03:41 2019 daemon.notice netifd: wwan (1695): WARNING: Variable '^rssi:' does not exist or is not an array/object
Mon Jun 17 00:03:41 2019 daemon.notice netifd: wwan (1695): Unsupported modem
Mon Jun 17 00:03:41 2019 daemon.notice netifd: wwan (2119): Stopping network wwan
Mon Jun 17 00:03:42 2019 daemon.notice netifd: wwan (2119): sending ->
Mon Jun 17 00:03:46 2019 daemon.notice netifd: Interface 'wwan' is now down

Then in luci it says "Network device is not present". I believe the issue is that the ME909s-120 is still not ready at boot. As it works fine if I stop the interface then connect again without any other change.

Is there a way to get the setup of wwan interface delayed when using NCM? Do you not have this problem when you use NCM with other cards also?

https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm

Perhaps the delay option is what you're looking for:

Seconds to wait before trying to interact with the modem (some modems require up to 30 s.)

1 Like

@tectonic That could be it. I can't believe I did not see it in luci. In my defense the text said Modem init timeout and I think that is the delay option but kind of unclear to me that they are the same thing...

It is strange as if you look at the code, ncm.sh script. It first checks the interface, then tries to wait before turning it up.

	[ -n "$ifname" ] || {
		echo "The interface could not be found."
		proto_notify_error "$interface" NO_IFACE
		proto_set_available "$interface" 0
		return 1
	}

[ -n "$delay" ] && sleep "$delay"

Yet I tried to use it and delay seems to work and resolve the problem. Anyway, thanks for the response... I will stick with my scripts. They work much more smoothly somehow...

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.