[SOLVED] Turning wifi on/off with a script

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
noob01
DD-WRT Novice


Joined: 30 Oct 2021
Posts: 13

PostPosted: Fri Sep 23, 2022 9:31    Post subject: [SOLVED] Turning wifi on/off with a script Reply with quote
Hi All,

Is it possible to turn on/off wifi with a script (telnet based I guess)?

I just don’t want to manually log in through the web based interface each time I need to turn it on for 10 minutes..

My device is: Netgear6700v3
dd-wrt ver. r50146

Thanks in advance!
Sponsor
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Fri Sep 23, 2022 10:42    Post subject: Reply with quote
In a word, yes.

Telnet is OK only for local LAN usage, if you ever use remote access, do yourself a favor and use SSH instead with key based login.

If you type ifconfig, you will get a list of interfaces, to confirm which are the wireless interfaces for 2.4/5GHz you can actually look at the web interface page just to see which.

Once you determine which you can simple issue the command once per interface

wlconf <interface> down; wlconf <interface1> down

To send interface up just use up instead of down.

It may be necessary to stop/start the nas service before and after so it would be something like.

stopservice nas; wlconf <interface> down; wlconf <interface1> down


startservice nas would be to used when you are sending interfaces up same syntax as above.

Now go forth and script that.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
noob01
DD-WRT Novice


Joined: 30 Oct 2021
Posts: 13

PostPosted: Tue Nov 01, 2022 12:36    Post subject: Reply with quote
the-joker wrote:
In a word, yes.

Telnet is OK only for local LAN usage, if you ever use remote access, do yourself a favor and use SSH instead with key based login.

If you type ifconfig, you will get a list of interfaces, to confirm which are the wireless interfaces for 2.4/5GHz you can actually look at the web interface page just to see which.

Once you determine which you can simple issue the command once per interface

wlconf <interface> down; wlconf <interface1> down

To send interface up just use up instead of down.

It may be necessary to stop/start the nas service before and after so it would be something like.

stopservice nas; wlconf <interface> down; wlconf <interface1> down


startservice nas would be to used when you are sending interfaces up same syntax as above.

Now go forth and script that.


Thank you!! I'll try this Smile
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum