OpenWrt Forum Archive

Topic: Bringing wifi up/down

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Howdy,

i run a wrt54gs v1.1 with openwrt whiterussian RC4. I want to disable wifi at certain times, so i tried it with "ifdown wifi", which works when invoked for the first time.. Wlan led gets disabled and wlan if off... If i invoke "ifup wifi; wifi" wlan comes back and the wlan led is green again.. But now, if i make "ifdown wifi" nothing happens. Wlan wont disappear. Is there something i'm doing wrong? How can i reliably enable and disable wlan without reboot wink

thanks in advance.

on my wl-500g i do it by issuing:

disable:
nvram set wl0_radio=0
ifup wifi
wifi up

enable:
nvram set wl0_radio=1
ifup wifi
wifi up

that works for me. however, this change is not persistent. only if you issue "nvram commit" your current setting will survive a reboot (but it's not recommended to commit nvram every few hours).

greetings,
andy

Thanks, mauritzius. I just tried it, it seems to work but has one Problem: If i run it this way, the power led starts flashing until i bring the wlan up again. The wiki entry about the ledcodes doesnt tell me what that means _here_
Does someone know?

Did you try:

killall -KILL nas

for bringing it down, and simply :

wifi

when you need it up again?

Quick and dirty, but works here :-)

Actually i'm just using wep as wpa doesnt seem to work with my wireless card (I'm using vpn for wlan authentication anyway) So the nas trick wont help, unless i get wpa working smile

interesting, why the power-led starts flashing....

have you tried disabling the radio via the web-interface? does the led then also start to flash?

however, you shouldn't do this via webif too frequent, because webif commits the changes to nvram when applying.

greetings,
andy

If i do it via webif it starts flashing too... But it also showed up "eval: 7: /etc/init.d/S41wpa: Permission denied" - So i made the error disappear with chmod +x, but still it flashs if i disable it in webif sad

but despite the fact, that the led flashes, there are no other drawbacks?
so i'd just let it flash, although i'd like to know why it flashes...

I didnt notice any drawbacks, but that doesnt mean there are no smile
More important is the psychological aspect of a flashing light.. Makes me feel uncomfortable. Is there no other way?

The discussion might have continued from here.