This kept me up for quite some time, we have a home with a lot of wifi equipment.
Most of it uses WPA as encryption. Only Nintendos DS depends on WEP.
Everytime someone wanted to play the DS online I had to adjust the settings on the router.

Then I found out that my Wrt54GL had programmable buttons and here is my solution:

My Setup:

Wrt54GL OpenWrt White Russian - With X-Wrt Extensions 0.9
Basic Configuration is WPA enabled after reboot

1.  make a dir called button in /etc/hotplug.d
       
    # mkdir /etc/hotplug.d/button

2. copy script to directory as wepwpatoggle.sh or name it as you like

   !!!!!!!  insert your WEP key at yourkeyhere at
               
        nvram set wl0_key1=yourkeyhere
                                                °°°°°°°°°°°°   !!!!!!!!

------------------------------------------------------------------------


#!/bin/sh

#
# WEP - WPA Toggle Script for DS
#
if [ $BUTTON = "ses" -a $ACTION = "released" ]
then
    echo "f" > /proc/diag/led/ses_white
   
    if [ "$(nvram get wl0_wep)" = "enabled" ]

    then   
        nvram set wl0_wep=disabled
        nvram set wl0_akm=psk2
        wifi
        echo "0" > /proc/diag/led/ses_orange



    else
        nvram set wl0_akm=none
        nvram set wl0_wep=enabled
        nvram set wl0_key=1
        nvram set wl0_key1=yourkeyhere
        wifi
        echo "1" > /proc/diag/led/ses_orange

    fi
    sleep 1
    echo "0" > /proc/diag/led/ses_white
fi
------------------------------------------------------------------------------

what that script does is flashing the white light while you press the cisco button and toggles WEP and
WPA.
When WEP is set as encrytion the cisco button turns orange.

Since nothing of this script is nvram commited a reboot fixes all.


Hope i did not forget anything and you could read my english

for any errors in the script plz tell me

BerndDasBrot