Wireless network power switch out of WRT54 router

If you haven’t dd-wrt on your WRT54 router you need to install (flash) it.

Before flashing find which version of WRT54 router you have.
Version 5 and above switched to VxWorks OS and reduced flash memory and RAM, that is much more complicated to flash.
It is recommended to have a version under 5. also because new dd-wrt build missing ssh service.

Find appropriate flash-file and on the same page you have link to instructions.

Follow instructions carefully word to word or otherwise you brick your router.
To use tftp on debian based Linux, install terminal application sudo apt install tftp
I have version 6 to be flashed: https://dd-wrt.com/wiki/index.php/Linksys_WRT54GS_v5.0_&_5.1_&_6.0

After you have dd-wrt flashed in you can configure router.

Reset router.
Connect to router on browser in address
Setup Router Username name and Router Password.

Wireless > Basic settings:
Wireless Mode = Client
Wireless Network Name (SSID) = Your present wireless network name.
Wireless Channel = Auto

Wireless > Wireless Security:
Change settings to match your wireless network security.

Setup > Basic Setup:
Local IP Address = Should be other network like
Subnet Mask =
Gateway = Your wireless network router IP address

Administration > Management > Remote Access:
Telnet Management = Enable
SSH Management = Enable
Change port to something else, not default.
Allow Any Remote IP = Disable
Allowed Remote IP Range = Your wireless network IP range

More about dd-wrt gpios and funtions

When amber color LED is turned on your’re connected to the wireless network.

Connect via terminal using telnet and test (gpio 6 will reset router!)
Attention! Telnet is UNSECURE connection type and this is only for testing purposes in home LAN network.
gpio disable 2 will turn on Cisco button white LED
gpio enable 2 will turn off Cisco button white LED

Connected 5v relay module which seems to work also with 3.3v.
Telnet command gpio disable 7 will turn relay on which is connected to router LED output LEDC7.

For testing purposes only as Telnet is not recommended to use in any remote purposes. I bought very old wrt54 with no SSH connection deployed in that version of dd-wrt.
On the left side video shows relay connected to LEDC7 pin on WRT54 board. When we type in terminal right side gpio disable 7 it enables relay and green status LED is on.