Wireless Script And Wpa Access


firefly2442

Member
Joined
Aug 17, 2006
Messages
136
Age
40
Location
USA
Website
www.rivetcode.com
Hi all,

I'm having some issues with the wireless script. I was able to set my SSID in the configuration file and connect to an open wireless AP but for one that requires authentication, I'm having problems. I edited "start_wireless.gpu" and added in my WPA key and it looks like it works when I run it. No problems, but at DHCP, it gives me a MAC address and then says Done. But when I bring up "ifconfig", it doesn't show up as wireless. Here's my script at the moment:

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 "Using WPA Key...\n"
./iwconfig $ifname key s:mykey
sleep 1

printf "Set to managed mode...\n"
./iwconfig $ifname mode Managed
sleep 1

printf "DHCP...\n"
./dhcpcd -d $ifname

printf "All Done!\n"
sleep 2
) 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



Any ideas? Thanks. :)
 
Did you mean IP rather than MAC address? You always have a MAC address and DHCP assigns you a IP.
Have you gotten it to work on wireless without WPA? If not I would start there first.
 
Mmm, am not that expert in networking, but you can try this:
Disable the DHCP server and assign the IP addresses manually.
 
I was trying to do that earlier firefly from what Bobby Martin told me but from I understand WPA isn't implemented WEP is but I couldn't get my PC to connect with it. Btw have you managed to setup your GP2X as a internet radio?? I want to do this but there is no info on how to do it.
 
This is what I tried for WEP and should work... the appropriate part is in red for what I added to the default script.


QUOTE
#!/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 s:paswd
#./iwconfig rausb0 key restricted XXXXXXXX


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
 
Do the SSIDs in the configuration file need quotes around them or anything special? I thought I had it working before but I was putting in the MAC address instead of the SSID. :lol:
 
Back
Top