DBH
Active Member
Does anyone have a working script wifi with WEP access script they can show me the code for that they use with their wifi stick?
This is my script atm:
CODE
#!/bin/sh
(
ifname=rausb0
printf "\033[31m WiFi Setup Utility\n\n\033[32m"
printf "Installing rt2570 module...\n"
rmmod $PWD/rt2570.o
insmod ./rt2570.o
sleep 1
printf "Bring up $ifname...\n"
ifconfig $ifname up
printf "Find preferred SSID...\n"
ssid=`./preferredSSID.sh`
printf "Connect to $ssid network...\n"
./iwconfig $ifname essid $ssid
sleep 1
printf "Set to managed mode...\n"
./iwconfig $ifname mode Managed
sleep 1
printf "Enable WEP...\n"
./iwconfig rausb0 key on
sleep 1
printf "Set WEP Key...\n"
./iwconfig rausb0 key restricted saswd
#./iwconfig rausb0 key restricted xxxxxxxxxx
printf "DHCP...\n"
./dhcpcd -d $ifname
printf "All Done!\n"
sleep 1
) 2>&1 | ./gp2xole
cd /usr/gp2x; exec ./gp2xmenu
#important bits:
#rmmod $pwd/rt2570.o
#insmod ./rt2570.o
#ifconfig $ifname up
#ifconfig $ifname $tmpip
#./iwconfig $ifname essid $ssid
#./iwconfig $ifname mode Managed
This is my script atm:
CODE
#!/bin/sh
(
ifname=rausb0
printf "\033[31m WiFi Setup Utility\n\n\033[32m"
printf "Installing rt2570 module...\n"
rmmod $PWD/rt2570.o
insmod ./rt2570.o
sleep 1
printf "Bring up $ifname...\n"
ifconfig $ifname up
printf "Find preferred SSID...\n"
ssid=`./preferredSSID.sh`
printf "Connect to $ssid network...\n"
./iwconfig $ifname essid $ssid
sleep 1
printf "Set to managed mode...\n"
./iwconfig $ifname mode Managed
sleep 1
printf "Enable WEP...\n"
./iwconfig rausb0 key on
sleep 1
printf "Set WEP Key...\n"
./iwconfig rausb0 key restricted saswd
#./iwconfig rausb0 key restricted xxxxxxxxxx
printf "DHCP...\n"
./dhcpcd -d $ifname
printf "All Done!\n"
sleep 1
) 2>&1 | ./gp2xole
cd /usr/gp2x; exec ./gp2xmenu
#important bits:
#rmmod $pwd/rt2570.o
#insmod ./rt2570.o
#ifconfig $ifname up
#ifconfig $ifname $tmpip
#./iwconfig $ifname essid $ssid
#./iwconfig $ifname mode Managed