Configure Wi-Fi Scan Timeout in NCS v2.5.0

Hello all,

The latest Wi-Fi Driver allows one to configure the Wi-Fi scan timeout. (nRF70 Series Wi-Fi driver — nRF Connect SDK 2.5.99-dev1 documentation (nordicsemi.com))

However, that option is absent in v2.5.0 stable release. (Present, absent.)

Is it possible to modify the Wi-Fi scan timeout in v2.5.0 without this kconfig option?

Alternatively, is it possible to forcefully stop Wi-Fi scanning and maybe using a zephyr timer?

Best regards,

Parents
  • Hi Jaokim,

    Couldn't I just use net_if_down on the wi-fi interface on a zephyr timer, and net_if_up when I need it again?

    Network Interface — Zephyr Project Documentation

    i.e. (similar to wifi shutdown sample)

    int shutdown_wifi(struct net_if *iface)
    {
    	int ret;
    
    	if (!net_if_is_admin_up(iface)) {
    		return 0;
    	}
    
    	ret = net_if_down(iface);
    	if (ret) {
    		LOG_ERR("Cannot bring down iface (%d)", ret);
    		return ret;
    	}
    
    	LOG_INF("Interface down");
    
    	return 0;
    }
    
    int startup_wifi(struct net_if *iface)
    {
    	int ret;
    
    	if (!net_if_is_admin_up(iface)) {
    		ret = net_if_up(iface);
    		if (ret) {
    			LOG_ERR("Cannot bring up iface (%d)", ret);
    			return ret;
    		}
    
    		LOG_INF("Interface up");
    	}
    
    	wifi_scan();
    
    	return 0;
    }

    and just run it on zephyr timers when I need it?

    Would this be a bad approach? Anything that makes it distinctly worse than using the kconfig for wifi scan timeout (hopefully available with the 2.5.1 release?)

    Best regards,

Reply
  • Hi Jaokim,

    Couldn't I just use net_if_down on the wi-fi interface on a zephyr timer, and net_if_up when I need it again?

    Network Interface — Zephyr Project Documentation

    i.e. (similar to wifi shutdown sample)

    int shutdown_wifi(struct net_if *iface)
    {
    	int ret;
    
    	if (!net_if_is_admin_up(iface)) {
    		return 0;
    	}
    
    	ret = net_if_down(iface);
    	if (ret) {
    		LOG_ERR("Cannot bring down iface (%d)", ret);
    		return ret;
    	}
    
    	LOG_INF("Interface down");
    
    	return 0;
    }
    
    int startup_wifi(struct net_if *iface)
    {
    	int ret;
    
    	if (!net_if_is_admin_up(iface)) {
    		ret = net_if_up(iface);
    		if (ret) {
    			LOG_ERR("Cannot bring up iface (%d)", ret);
    			return ret;
    		}
    
    		LOG_INF("Interface up");
    	}
    
    	wifi_scan();
    
    	return 0;
    }

    and just run it on zephyr timers when I need it?

    Would this be a bad approach? Anything that makes it distinctly worse than using the kconfig for wifi scan timeout (hopefully available with the 2.5.1 release?)

    Best regards,

Children
Related