Help - Search - Members - Calendar
Full Version: Wireless Script And Wpa Access
GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment > GP2X > General talk [GP2X]
firefly2442
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. smile.gif
Pickle
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.
firefly2442
Yeah, wireless w/out WPA works great. But I'm trying to test something and I have to connect to the WPA AP.
sehs33
Mmm, am not that expert in networking, but you can try this:
Disable the DHCP server and assign the IP addresses manually.
DBH
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.
DBH
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

firefly2442
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. laugh.gif
DBH
No they don't you just literally type the SSID without quotes. You were typing in the MAC?? lol your loco tongue.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.