Wifi connectivity redux

Walter Dnes waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org
Mon Apr 19 01:30:41 UTC 2010


  It's so easy once you know how.  I did some web surfing today on my
netbook at the Toronto Public Library (North York Centre).  The main
problem turned out to be that I had to drop my firewall for a few
seconds during authentication, then I could bring it back up.  There is
an initial redirect to a EULA webpage of sorts, in the 10.x.x.x range,
which I have blocked.

  Anyhow, for the benefit of anyone else trying to do the same, here is
my successful setup.  I have an ath5k-driven Wifi chip, and ath5k is
built as a module.  It is *NOT* loaded at bootup.  wpa_supplicant is the
client software I use (command-line only).

/etc/conf.d/net
===============
config_eth0="192.168.123.249 broadcast 192.168.123.255 netmask
255.255.255.248 mtu 1452"
routes_eth0=(
"default via 192.168.123.254 metric 2"
"192.168.123.248/29 via 192.168.123.254 metric 0"
)
modules=( "wpa_supplicant" )
config_wlan0=( "null" )
wpa_supplicant_wlan0="-Dwext"
wpa_timeout_wlan0=15

  I do *NOT* have /etc/wpa_supplicant.conf  This causes wpa_supplicant
to *NOT* load.  This is deliberate.  /etc/wpa_supplicant.conf.open is
the file name I use for open access points...

/etc/wpa_supplicant.conf.open
=============================
ctrl_interface=/var/run/wpa_supplicant

# Connect to an open AP
network={
  ssid="Toronto Public Library"
  key_mgmt=NONE
  priority=9
}

network={
  key_mgmt=NONE
  priority=-9
}

  And finally, a script ~/bin/wi_open that ties it all together.
Remember to put appropriate lines in /etc/sudoers

~/bin/wi_open
=============
#!/bin/bash
sudo /sbin/modprobe ath5k
sudo /etc/init.d/net.wlan0 restart
sudo /sbin/ifconfig wlan0 up
sudo /sbin/iwconfig wlan0 essid any channel auto
sudo /usr/sbin/wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf.open
sudo /sbin/dhcpcd wlan0

  If you have a different chip, you'll need a different module.  Having
gotten that to work, my next adventure will be getting the netbook to
work with a wireless router in WPA mode.

-- 
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org>
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list