Re: [gentoo-user] wlan0 config questions

2010-04-14 Thread Neil Bothwick
On Tue, 13 Apr 2010 23:09:04 -0400, Walter Dnes wrote:

>   I've got hal and dbus masked out (pam too), so wicd and networkmanager
> are out of the question.

Wicd doesn't need hal, but dbus is so useful you are crippling your system
by blocking it. On a multitasking system, programs need a way of talking
to one another, dbus is currently it.


-- 
Neil Bothwick

But there, everything has its drawbacks, as the man said when his
mother-in-law died, and they came down upon him for the funeral expenses.
-- Jerome K. Jerome


signature.asc
Description: PGP signature


Re: [gentoo-user] wlan0 config questions

2010-04-13 Thread Walter Dnes
On Tue, Apr 13, 2010 at 04:03:08PM +0100, Mick wrote

> For PCs you don't typically need anything more than the default Gentoo
> scripts, but for a laptop wicd, networkmanager and the like will do
> exactly what you need with no perceptible overhead and the benefit of
> notifications for when things start bobbing up and down.

> If you already have installed wpa_supplicant I recommend running
> wpa_gui and enabling disabling any interfaces you care to associate
> with.  Then leave it running in the tooltray for quick access and
> notifications.

  I've got hal and dbus masked out (pam too), so wicd and networkmanager
are out of the question.  wpa_gui is a Qt frontend to wpa_cli.  The qt4
*TARBALL* is approx 150 megabytes.  Disk space is not the problem, but
loading unnecessary libs on an underpowered memory-constrained netbook
is an issue.  Besides, I can always...

[aa1][root][~] modprobe ath5k
[aa1][root][~] /etc/init.d/net.wlan0 restart
 * Stopping wlan0
 *   Bringing down wlan0
 * Shutting down wlan0 ...  [ ok ]
 * Stopping wpa_cli on wlan0 ...[ ok ]
 * Stopping wpa_supplicant on wlan0 ... [ ok ]
 * Starting wlan0
 *   Starting wpa_supplicant on wlan0 ...   [ !! ]
[aa1][root][~] iwconfig wlan0 essid example channel auto
[aa1][root][~] ifconfig wlan0 up
[aa1][root][~] iwlist wlan0 scan | grep ESSID
ESSID:"KGB zone**  keep OFF**"
ESSID:"BELL140"
ESSID:"MyLinksys"
ESSID:"BELL325"
ESSID:"charmins family network 20"
ESSID:"and"
ESSID:"linksys"
ESSID:"default"
ESSID:"Kooshman"
ESSID:"SONA2"
ESSID:"BELL628"
ESSID:"MyDlink"
ESSID:"A7770"

  Fortunately, I'm an honest guy, and I choose to confine my "testing of
open system access" to places like the Toronto Public Library, where
they advertise it... http://www.torontopubliclibrary.ca/spe_ser_wir.jsp
A little bit of scripting, plus appropriate entries in /etc/sudoers, and
I'm all set.

-- 
Walter Dnes 



Re: [gentoo-user] wlan0 config questions

2010-04-13 Thread Stroller


On 13 Apr 2010, at 12:39, Walter Dnes wrote:

... I plan to have multiple config files, to cover different
situations.


You can have multiple networks specified in /etc/wpa_supplicant.conf  
and in /etc/conf.d/net.


I think you can just specify the various SSIDs / credentials in  
wpa_supplicant.conf and if you don't want the adaptor just to get an  
IP address by DHCP then you can do that in /etc/conf.d/net


Stroller.




Re: [gentoo-user] wlan0 config questions

2010-04-13 Thread Mick
On 13 April 2010 15:44, Daniel da Veiga  wrote:
> On Tue, Apr 13, 2010 at 09:13, Neil Bothwick  wrote:
>>
>> On Tue, 13 Apr 2010 07:39:31 -0400, Walter Dnes wrote:
>>
>> >   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.
>>
>> This sounds like an awful lot of work to do something that Wicd will
>> handle almost automatically.
>>
>
> Agreed.
> After many tries I've found that you really need a network manager like WICD
> with netbooks or notebooks. Mobile devices require an agile and easy
> interface for networking.

For PCs you don't typically need anything more than the default Gentoo
scripts, but for a laptop wicd, networkmanager and the like will do
exactly what you need with no perceptible overhead and the benefit of
notifications for when things start bobbing up and down.

If you already have installed wpa_supplicant I recommend running
wpa_gui and enabling disabling any interfaces you care to associate
with.  Then leave it running in the tooltray for quick access and
notifications.
-- 
Regards,
Mick



Re: [gentoo-user] wlan0 config questions

2010-04-13 Thread Daniel da Veiga
On Tue, Apr 13, 2010 at 09:13, Neil Bothwick  wrote:

> On Tue, 13 Apr 2010 07:39:31 -0400, Walter Dnes wrote:
>
> >   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.
>
> This sounds like an awful lot of work to do something that Wicd will
> handle almost automatically.
>
>
Agreed.
After many tries I've found that you really need a network manager like WICD
with netbooks or notebooks. Mobile devices require an agile and easy
interface for networking.

-- 
Daniel da Veiga


Re: [gentoo-user] wlan0 config questions

2010-04-13 Thread Neil Bothwick
On Tue, 13 Apr 2010 07:39:31 -0400, Walter Dnes wrote:

>   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.

This sounds like an awful lot of work to do something that Wicd will
handle almost automatically.


-- 
Neil Bothwick

Scrotum is a small planet near Uranus. True/False?


signature.asc
Description: PGP signature


Re: [gentoo-user] wlan0 config questions

2010-04-13 Thread Walter Dnes
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 



Re: [gentoo-user] wlan0 config questions

2010-04-12 Thread Mick
On 12 April 2010 08:11, Walter Dnes  wrote:
> Here's /etc/conf.d/net on my Gentoo netbook system...
>
> 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"
> )
>
>  The multiple routes allow eth0 to remain connected to my router and
> talk to the other machine on the lan while running a dialup connection.
> I want to try out my netbook wifi, and I find that it works too well!!!
> Here's the output after starting up wlan0.  The ESSID and MAC address
> of my neighbours in the condo have been masked to protect the innocent...
>
> aa1 init.d # /etc/init.d/net.wlan0 restart
>  * Stopping wlan0
>  *   Bringing down wlan0
>  *     Stopping dhcpcd on wlan0 ...                           [ ok ]
>  *     Shutting down wlan0 ...                                [ ok ]
>  * Starting wlan0
>  *   Configuring wireless network for wlan0
>  *   WEP key is not set for "KGB zone**  keep OFF**" - not connecting
>  *     wlan0 connected to ESSID "***" at **:**:**:**:**:**
>  *     in managed mode on channel 6 (WEP disabled)
>  *   Configuration not set for wlan0 - assuming DHCP
>  *   Bringing up wlan0
>  *     dhcp
>  *       Running dhcpcd ...
> wlan0: dhcpcd 4.0.15 starting
> wlan0: broadcasting for a lease
> wlan0: offered 192.168.0.103 from 192.168.0.1
> wlan0: ignoring offer of 192.168.0.103 from 192.168.0.1
> wlan0: acknowledged 192.168.0.103 from 192.168.0.1
> wlan0: checking 192.168.0.103 is available on attached networks
> wlan0: leased 192.168.0.103 for 604800 seconds               [ ok ]
>  *       wlan0 received address 192.168.0.103/24
>
>  After picking my jaw off the floor, I downed wlan0.  Just to be safe,
> I ran "rmmod ath5k".  I want to be able to scan available connections
> and then select which one I want, e.g. I want to try it at the local
> public library.  I do not like the concept of the netbook automatically
> connecting to the first available access point.  What do I have to do to
> *NOT* connect automatically?

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.
-- 
Regards,
Mick



[gentoo-user] wlan0 config questions

2010-04-12 Thread Walter Dnes
Here's /etc/conf.d/net on my Gentoo netbook system...

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"
)

  The multiple routes allow eth0 to remain connected to my router and
talk to the other machine on the lan while running a dialup connection.
I want to try out my netbook wifi, and I find that it works too well!!!
Here's the output after starting up wlan0.  The ESSID and MAC address
of my neighbours in the condo have been masked to protect the innocent...

aa1 init.d # /etc/init.d/net.wlan0 restart
 * Stopping wlan0
 *   Bringing down wlan0
 * Stopping dhcpcd on wlan0 ...   [ ok ]
 * Shutting down wlan0 ...[ ok ]
 * Starting wlan0
 *   Configuring wireless network for wlan0
 *   WEP key is not set for "KGB zone**  keep OFF**" - not connecting
 * wlan0 connected to ESSID "***" at **:**:**:**:**:**
 * in managed mode on channel 6 (WEP disabled)
 *   Configuration not set for wlan0 - assuming DHCP
 *   Bringing up wlan0
 * dhcp
 *   Running dhcpcd ...
wlan0: dhcpcd 4.0.15 starting
wlan0: broadcasting for a lease
wlan0: offered 192.168.0.103 from 192.168.0.1
wlan0: ignoring offer of 192.168.0.103 from 192.168.0.1
wlan0: acknowledged 192.168.0.103 from 192.168.0.1
wlan0: checking 192.168.0.103 is available on attached networks
wlan0: leased 192.168.0.103 for 604800 seconds   [ ok ]
 *   wlan0 received address 192.168.0.103/24

  After picking my jaw off the floor, I downed wlan0.  Just to be safe,
I ran "rmmod ath5k".  I want to be able to scan available connections
and then select which one I want, e.g. I want to try it at the local
public library.  I do not like the concept of the netbook automatically
connecting to the first available access point.  What do I have to do to
*NOT* connect automatically?

-- 
Walter Dnes