1 |
It's so easy once you know how. I did some web surfing yesterday on |
2 |
my netbook at the Toronto Public Library (North York Centre). The main |
3 |
problem turned out to be that I had to drop my firewall for a few |
4 |
seconds during authentication, then I could bring it back up. There is |
5 |
an initial redirect to a EULA webpage of sorts, in the 10.x.x.x range, |
6 |
which I have blocked. |
7 |
|
8 |
Anyhow, for the benefit of anyone else trying to do the same, here is |
9 |
my successful setup. I have an ath5k-driven Wifi chip, and ath5k is |
10 |
built as a module. It is *NOT* loaded at bootup. wpa_supplicant is the |
11 |
client software I use (command-line only). |
12 |
|
13 |
/etc/conf.d/net |
14 |
=============== |
15 |
config_eth0="192.168.123.249 broadcast 192.168.123.255 netmask |
16 |
255.255.255.248 mtu 1452" |
17 |
routes_eth0=( |
18 |
"default via 192.168.123.254 metric 2" |
19 |
"192.168.123.248/29 via 192.168.123.254 metric 0" |
20 |
) |
21 |
modules=( "wpa_supplicant" ) |
22 |
config_wlan0=( "null" ) |
23 |
wpa_supplicant_wlan0="-Dwext" |
24 |
wpa_timeout_wlan0=15 |
25 |
|
26 |
I do *NOT* have /etc/wpa_supplicant.conf This causes wpa_supplicant |
27 |
to *NOT* load. This is deliberate. /etc/wpa_supplicant.conf.open is |
28 |
the file name I use for open access points... |
29 |
|
30 |
/etc/wpa_supplicant.conf.open |
31 |
============================= |
32 |
ctrl_interface=/var/run/wpa_supplicant |
33 |
|
34 |
# Connect to an open AP |
35 |
network={ |
36 |
ssid="Toronto Public Library" |
37 |
key_mgmt=NONE |
38 |
priority=9 |
39 |
} |
40 |
|
41 |
network={ |
42 |
key_mgmt=NONE |
43 |
priority=-9 |
44 |
} |
45 |
|
46 |
And finally, a script ~/bin/wi_open that ties it all together. |
47 |
Remember to put appropriate lines in /etc/sudoers |
48 |
|
49 |
~/bin/wi_open |
50 |
============= |
51 |
#!/bin/bash |
52 |
sudo /sbin/modprobe ath5k |
53 |
sudo /etc/init.d/net.wlan0 restart |
54 |
sudo /sbin/ifconfig wlan0 up |
55 |
sudo /sbin/iwconfig wlan0 essid any channel auto |
56 |
sudo /usr/sbin/wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf.open |
57 |
sudo /sbin/dhcpcd wlan0 |
58 |
|
59 |
If you have a different chip, you'll need a different module. Having |
60 |
gotten that to work, my next adventure will be getting the netbook to |
61 |
work with a wireless router in WPA mode. |
62 |
|
63 |
-- |
64 |
Walter Dnes <waltdnes@××××××××.org> |