A little help on wifi

1 view
Skip to first unread message

David Murphy

unread,
Jun 14, 2011, 1:53:18 AM6/14/11
to robotrefere...@googlegroups.com
Folks,

I'm looking for a little advice on getting wifi going on the pandaboard.

I've tried a bunch of combinations, but basically am in this position:
I can start up wifi manually, but can not get it to come up automatically on boot.
After boot, wpa_supplicant is running. Depending on exactly which options are used in the files below, ifconfig will show tiwlan0, but it never has an IP address.
If I execute the following
killall wpa_supplicant
ifdown tiwlan0
wpa_supplicant -itilan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
ifup tiwlan0

the wifi will come up and i can connect. Interestingly, it never picks up the same IP address, but all other interfaces (ethernet on pandaboard or any other computers in the house) maintain their same address - seems like an interesting difference.

It appears there is a race condition somewhere between when the interface is brought up and when wpa_supplicant is started, but I am at a lose where to find it and how to correct it. Any pointers are welcome.

Thanks,

David

Below is my /etc/network/interfaces and my wpa_supplicant.conf. I have tried various combinations of the commented out lines, but they do not seem to have a material effect.


dfm@panda:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto tiwlan0
iface tiwlan0 inet dhcp

auto usb0
iface usb0 inet dhcp

#auto tiwlan0
#iface tiwlan0 inet dhcp
# wpa-driver wext
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
#wpa-driver wext
#wpa-ssid Airport\ TNG
#wpa-ap-scan 1
#wpa-proto RSN
#wpa-pairwise CCMP
#wpa-group CCMP
#wpa-key-mgmt WPA-PSK
#wpa-psk <key deleted>

dfm@panda:/etc/wpa_supplicant$ cat wpa_supplicant.conf
network={
ssid="AirPort TNG"
psk=<key deleted>
}

Ralph Gnauck

unread,
Jun 14, 2011, 11:49:39 AM6/14/11
to robotrefere...@googlegroups.com

David,
I had the same problem. I have not solved it but I created a workaround that uses a cron job.
Every minute it runs a script that tests if the WiFI is connected to my network.
 
If it is up it leaves everything alone, if not it stops the network (ifdown...) waits a couple of seconds and does an ifup ... .
 
This works well, usually once the network is connected it stays up reliably so this is just needed to get it started after boot.
 
The downside is since cron only runs once a minute it can sometimes take a few minutes for it to connect first time after boot.
 
The script runs an AWK program that looks at the output of iwconfig to see it the network is connected.
 
Later today Ill try to post the scripts I am using.
 
Ralph

 

From: David Murphy <dfm...@gmail.com>
To: robotrefere...@googlegroups.com
Sent: Mon, June 13, 2011 10:53:18 PM
Subject: [RobotRefPlatform] A little help on wifi

David Murphy

unread,
Jun 16, 2011, 1:51:32 AM6/16/11
to RobotReferencePlatform
Thanks Ralph,

I'll give that a go.

Cheers,
David

Ralph Gnauck

unread,
Jun 16, 2011, 1:11:25 PM6/16/11
to robotrefere...@googlegroups.com
Dave,
Sorry, didn't get to send the scripts, here is my workaround:

Add this line to /etc/crontab

* *     * * *   root    iwconfig 2> /dev/null | awk -f /home/<Your Home Dir>/testnet.awk root=true

Change <Your Home Dir> to the folder you have the awk file in.

The testnet.awk file is attached, change the <YOR NETWORK SSID> in it to your network SSID.


Ralph

--- On Wed, 6/15/11, David Murphy <dfm...@gmail.com> wrote:
testnet.awk
Reply all
Reply to author
Forward
0 new messages