From: "Walter Dnes" <waltdnes@waltdnes.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] wlan0 config questions
Date: Tue, 13 Apr 2010 07:39:31 -0400 [thread overview]
Message-ID: <20100413113931.GA20214@waltdnes.org> (raw)
In-Reply-To: <i2y358eca8f1004120517kddb2a398p3fd148ab5043900b@mail.gmail.com>
On Mon, Apr 12, 2010 at 01:17:07PM +0100, Mick wrote
> You probably want to look at wpa_supplicant (in particular man
> wpa_gui), or any other network manager type of application would do
> (wicd, network manager, wifi-radar) which allows you to enable/disable
> access points for automatic connection to them.
>
> Alternatively, a less practical approach would be to set up
>
> config_wlan0=( "null" )
>
> in your /etc/conf.d/net.wlan0, which will not allow your wireless card
> to obtain any address. Or, you can play with dhcpcd options like so:
>
> dhcp_eth0="release nogateway nosendhost" which means that it will not
> bind to any wireless router as a gateway.
Thanks. that keeps things sane. Now let's start with simple stuff
first, manually connecting to an open access point at the public
library. Listed below are files /etc/conf.d/net, ~/bin/wi_open, and
/etc/wpa_supplicant.conf.open. Assuming that I have /etc/sudoers
properly set up, is ~/bin/wi_open the correct incantation? It copies
the appropriate config to /etc/wpa_supplicant.conf and then starts and
connects wifi. I plan to have multiple config files, to cover different
situations.
/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
~/bin/wi_open
==============
#!/bin/bash
sudo /bin/cp /etc/wpa_supplicant.conf.open /etc/wpa_supplicant.conf
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 -iwlan0
sudo /sbin/dhcpcd -C resolv.conf -C mtu wlan0
/etc/wpa_supplicant.conf.open
=============================
# Connect to an open AP
network={
ssid="public library"
key_mgmt=NONE
priority=9
}
network={
key_mgmt=NONE
priority=-9
}
--
Walter Dnes <waltdnes@waltdnes.org>
next prev parent reply other threads:[~2010-04-13 11:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-12 7:11 [gentoo-user] wlan0 config questions Walter Dnes
2010-04-12 12:17 ` Mick
2010-04-13 11:39 ` Walter Dnes [this message]
2010-04-13 12:13 ` Neil Bothwick
2010-04-13 14:44 ` Daniel da Veiga
2010-04-13 15:03 ` Mick
2010-04-14 3:09 ` Walter Dnes
2010-04-14 7:52 ` Neil Bothwick
2010-04-13 18:18 ` Stroller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100413113931.GA20214@waltdnes.org \
--to=waltdnes@waltdnes.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox