How to disable autostart on wifi?

i have a router, and sometimes i want the wifi enabled, but most of the time i want it off. how do i set openwrt to never automatically bring up wireless?
even if wifi is on when the system shuts down, i want it off when the system comes up next time.
i cannot find this option anywhere in the documentation.
in "wifi status" i want to set "autostart": false. even after ive done "wifi up".

i WANT to have to manually start wifi every time my router boots, how do i configure this?

uci set wireless.radio0.disabled='1'
uci set wireless.radio1.disabled='1'
uci commit wireless
wifi reload
3 Likes

that breaks "wifi up", and starting wifi from luci after that will re-enable wifi on boot.
while that does indeed prevent autostarting wifi, it gets reverted the second i try to manually start it. this is unacceptable. i want to be able to shutdown or reboot with while wifi is running, and for wifi to be disabled when the system comes back. any solution that requires me to manually turn it back off is unacceptable.

If you set WiFi to disable on web GUI or via the commands shown above, it remains disabled until a enable command is given.

Make sure you are committing on the CLI or pressing "Save and Apply" on the web GUI.

2 Likes

that is half of what i want.
i want the re-enabling of wifi to NOT persist.

Again:

In fact, this is OpenWrt default. If this is not the case for you, you must be experiencing some other issue. If so, can you better elaborate.

2 Likes

so then, how to i start my wifi interface without "enabling" it?

Huh?
What does this mean?

  • Your topic is how to disable autostart on WiFi
  • :spiral_notepad: There is no autostart of WiFi
1 Like

then what's this in "wifi status"?

"autostart": true,

and how to i set it to false, without disabling wifi?

???

Please provide the output of:

ubus call system board

1 Like

i dont see how any of this is relivant. my question relates to config files. not hardware quirks.

{
	"kernel": "5.4.188",
	"hostname": "AislingRouter",
	"system": "Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz",
	"model": "QEMU Standard PC (Q35 + ICH9, 2009)",
	"board_name": "qemu-standard-pc-q35-ich9-2009",
	"release": {
		"distribution": "OpenWrt",
		"version": "21.02.3",
		"revision": "r16554-1d4dea6d4f",
		"target": "x86/64",
		"description": "OpenWrt 21.02.3 r16554-1d4dea6d4f"
	}

What WiFi chip?

(To use less posts, please provide all relevant information.)

Is this a VM?

my wifi card is a Qualcomm Atheros AR946
yes this is a VM.
i do not see how any of this is relevant. i just want to set that autostart flag to false, even when wifi is enabled. no documentation i can find shows me where that flag gets set.

Add it to a custom Kxx script in /etc/rc.d, this obviously won't work if the host is restarted or shut down abruptly (pull power cord, off button, etc).

Do you see:

"up": false,

and

"disabled": true,

yes, when its disabled. but this also renders me unable to use the interface at all. which is not what i want. i want to be able to re-enable wifi at will, and then have it automatically be disabled again after reboot. i want to non-persistent enable it.

OK...

What exactly are you seeking - then?

:thinking: i.e. can you explain what you mean by the phrase "using a disabled interface"

1 Like

Wi-Fi is not a stand-alone service, but part of the network service, so it cannot be disabled by the conventional service management means.

Possible solutions:

3 Likes

I want to be able to startup my wifi manually at any time. only to have it undone the next time the system reboots for any reason. if i enable my wifi, and then immediately reboot or shutdown, i want wifi to be disabled again when the system comes back.

2 Likes

In /etc/rc.local
wifi down

enable when required.

3 Likes