FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-24-2011, 12:37 PM
 
Default WPA Supplicant

I'm trying to get wireless working reliably*on my laptop.* I have followed the documentation, but still have a lot of questions . . . especially since it only seems to work sometimes.
*
First, I'm using WPA*Supplicant without the gui*tools.
*
Second, I'm in NYC and there are a lot of networks I can use around town.
*
Third, Is there a way I can control the services I use from the Grub menu?* Since the laptop has a wireless card and an RJ45 jack, I'd like to be able boot and not use*one or the other.* Since I know if I'm not physically connected to a network, there's really no reason to even try eth0.
*
Forth, The problem.* I'm not sure how wpa_supplicant works or how it should work.* The wpa_supplicant man page gives a few examples on how to run it, but when I look at the process list it seems to be run by another program called wpa_cli.* There's also a shell script in /etc/wpa/supplicant that looks like it can start or stop it with CONNECT or DISCONNECT.
1) Do I need to enter networks in wpa_supplicant.conf*or does wpa_supplicant scan for networks and connect to whatever's*available?
2) If I have multiple networks available how does wpa_supplicant choose which to connect to and can I specify which one I want?
3) How should wpa_supplicant be started, stopped*and restarted?**What should be used for this:* wpa_supplicant, wpa_cli, or wpa_cli.sh?* I*don't see anything in /etc/init.d for that, but it looks like netmount*may be doing it.
4) The documentation doesn't say to, but the way I got wireless working is by creating a link net.wlan0 -> net.lo in the /etc/init.d directory.* Is this correct?* I think that's why it's starting automatically when I boot too, because I never added it with rc-update so netmount*must be picking it up.
5) This is the most puzzling thing.* When wpa_supplicant starts even though I get a inet*address I can't always get to the internet.* Why does the panel applet*says I'm connected and ifconfig*shows an inet*address but firefox*and ping can't reach a site like yahoo*or google?
6) For networks where I have a password, should that go in wpa_supplicant.conf*as plain text or should it be encrypted?
*
I think I have more questions, but this is good for starters.
*
Thanks,
*
dhk
 
Old 04-24-2011, 01:12 PM
Mick
 
Default WPA Supplicant

On Sunday 24 April 2011 13:37:03 dhkuhl@optonline.net wrote:
> I'm trying to get wireless working reliably on my laptop. I have followed
> the documentation, but still have a lot of questions . . . especially
> since it only seems to work sometimes.
>
> First, I'm using WPA Supplicant without the gui tools.

run wpa_gui from a terminal and a lot of what you're asking below will become
self-explanatory.


> Second, I'm in NYC and there are a lot of networks I can use around town.
>
> Third, Is there a way I can control the services I use from the Grub menu?
> Since the laptop has a wireless card and an RJ45 jack, I'd like to be able
> boot and not use one or the other. Since I know if I'm not physically
> connected to a network, there's really no reason to even try eth0.

Check /etc/conf.d/rc and in particular:

# RC_NET_STRICT_CHECKING allows some flexibility with the 'net' service.
# The following values are allowed:
# none - The 'net' service is always considered up.
# no - This basically means that at least one net.* service besides net.lo
# must be up. This can be used by notebook users that have a wifi
and
# a static nic, and only wants one up at any given time to have the
# 'net' service seen as up.
# lo - This is the same as the 'no' option, but net.lo is also counted.
# This should be useful to people that do not care about any specific
# interface being up at boot.
# yes - For this ALL network interfaces MUST be up for the 'net' service to
# be considered up.

RC_NET_STRICT_CHECKING="no"

(or you can use "lo")


> Forth, The problem. I'm not sure how wpa_supplicant works or how it should
> work. The wpa_supplicant man page gives a few examples on how to run it,
> but when I look at the process list it seems to be run by another program
> called wpa_cli. There's also a shell script in /etc/wpa/supplicant that
> looks like it can start or stop it with CONNECT or DISCONNECT. 1) Do I
> need to enter networks in wpa_supplicant.conf or does wpa_supplicant scan
> for networks and connect to whatever's available?

The latter.

You can however enter manually in /etc/wpa_supplicant/wpa_supplicant.conf
particular parameters (keys and what not) of known networks to which you
connect as a matter of preference.


> 2) If I have multiple
> networks available how does wpa_supplicant choose which to connect to and
> can I specify which one I want?

It'll connect to:

a) Any network you have specified in your
/etc/wpa_supplicant/wpa_supplicant.conf according to the preference you have
set up therein.

b) Any network it finds.

c) Any network you select with wpa_cli, or select/enable/disable in wpa_gui.


> 3) How should wpa_supplicant be started,
> stopped and restarted? What should be used for this: wpa_supplicant,
> wpa_cli, or wpa_cli.sh? I don't see anything in /etc/init.d for that, but
> it looks like netmount may be doing it.

You need to define it in /etc/conf.d/net:

modules=( "wpa_supplicant" )
wpa_supplicant_wlan0="-Dwext"

(adjust this according to the name of your wireless iface and driver).


> 4) The documentation doesn't say
> to, but the way I got wireless working is by creating a link net.wlan0 ->
> net.lo in the /etc/init.d directory. Is this correct?

It depends which documentation you are looking at. I am sure that this is
explained in the gentoo Handbook and associated documentation.

This is the link you need:

lrwxrwxrwx 1 root root 6 Dec 16 14:26 net.wlan0 -> net.lo

but you should have also configured /etc/conf.d/net with your desired settings
or just defaults will run.


> I think that's why
> it's starting automatically when I boot too, because I never added it with
> rc-update so netmount must be picking it up.


> 5) This is the most puzzling
> thing. When wpa_supplicant starts even though I get a inet address I
> can't always get to the internet. Why does the panel applet says I'm
> connected and ifconfig shows an inet address but firefox and ping can't
> reach a site like yahoo or google?

This could well be a dns server/repeater issue.

If you can ping the IP address of google, but not the domain name of it, then
the problem is that you do not have access to a DNS repeater. Look in your
/etc/resolve.conf to see if there is a line saying:

nameserver XXX.XXX.XX.XX

if it is absent then you have not connected to a namesever. This is a router
issue and it could be controlled by some authentication scheme. A lot of
wireless services offered by coffee shops, libraries, etc. may give you an IP
address automatically, but then require you use your browser to register with
their authentication server (using a passwd that they provide after you pay
them for the privilege).

Open access points with no encryption and no DNS authentication requirements
should allow you to connect seamlessly to the Internet.


> 6) For networks where I have a
> password, should that go in wpa_supplicant.conf as plain text or should it
> be encrypted?

This can be a confusing endeavour because some routers will only accept
certain characters in a passphrase, so you could be failing to connect due to
the peculiarities of the router. The passphrase should be entered as provided
by the router owner, then a hex key generated with wpa_passphrase (look at man
wpa_passphrase). Then enter the hex key in your wpa_supplicant.conf, or your
wpa_gui.

HTH for now, ask more as you need it.
--
Regards,
Mick
 
Old 04-24-2011, 01:24 PM
 
Default WPA Supplicant

----- Original Message -----
From: Mick
Date: Sunday, April 24, 2011 9:14 am
Subject: Re: [gentoo-user] WPA*Supplicant
To: gentoo-user@lists.gentoo.org

> On Sunday 24 April 2011 13:37:03 dhkuhl@optonline.net wrote:
> > I'm trying to get wireless working reliably on my laptop. I
> have followed
> > the documentation, but still have a lot of questions . . .
> especially> since it only seems to work sometimes.
> >
> > First, I'm using WPA*Supplicant without the gui*tools.
>
> run wpa_gui*from a terminal and a lot of what you're asking
> below will become
> self-explanatory.
>
>
> > Second, I'm in NYC and there are a lot of networks I can use
> around town.
> >
> > Third, Is there a way I can control the services I use from
> the Grub menu?
> > Since the laptop has a wireless card and an RJ45 jack, I'd
> like to be able
> > boot and not use one or the other. Since I know if I'm not
> physically> connected to a network, there's really no reason to
> even try eth0.
>
> Check /etc/conf.d/rc*and in particular:
>
> # RC_NET_STRICT_CHECKING allows some flexibility with the 'net'
> service.# The following values are allowed:
> # none - The 'net' service is always considered up.
> # no - This basically means that at least one net.* service
> besides net.lo
> # must be up. This can be used by notebook users that
> have a wifi
> and
> # a static nic, and only wants one up at any given time
> to have the
> # 'net' service seen as up.
> # lo - This is the same as the 'no' option, but net.lo is
> also counted.
> # This should be useful to people that do not care
> about any specific
> # interface being up at boot.
> # yes - For this ALL network interfaces MUST be up for the
> 'net' service to
> # be considered up.
>
> RC_NET_STRICT_CHECKING="no"
>
> (or you can use "lo")
>
>
> > Forth, The problem. I'm not sure how wpa_supplicant works or
> how it should
> > work. The wpa_supplicant man page gives a few examples on how
> to run it,
> > but when I look at the process list it seems to be run by
> another program
> > called wpa_cli. There's also a shell script in
> /etc/wpa/supplicant that
> > looks like it can start or stop it with CONNECT or DISCONNECT.
> 1) Do I
> > need to enter networks in wpa_supplicant.conf or does
> wpa_supplicant scan
> > for networks and connect to whatever's available?
>
> The latter.
>
> You can however enter manually in
> /etc/wpa_supplicant/wpa_supplicant.conf
> particular parameters (keys and what not) of known networks to
> which you
> connect as a matter of preference.
>
>
> > 2) If I have multiple
> > networks available how does wpa_supplicant choose which to
> connect to and
> > can I specify which one I want?
>
> It'll connect to:
>
> a) Any network you have specified in your
> /etc/wpa_supplicant/wpa_supplicant.conf according to the
> preference you have
> set up therein.
>
> b) Any network it finds.
>
> c) Any network you select with wpa_cli, or select/enable/disable
> in wpa_gui.
>
>
> > 3) How should wpa_supplicant be started,
> > stopped and restarted? What should be used for this:
> wpa_supplicant,> wpa_cli, or wpa_cli.sh? I don't see anything
> in /etc/init.d for that, but
> > it looks like netmount may be doing it.
>
> You need to define it in /etc/conf.d/net:
>
> modules=( "wpa_supplicant" )
> wpa_supplicant_wlan0="-Dwext"
>
> (adjust this according to the name of your wireless iface and driver).
>
>
> > 4) The documentation doesn't say
> > to, but the way I got wireless working is by creating a link
> net.wlan0 ->
> > net.lo in the /etc/init.d directory. Is this correct?
>
> It depends which documentation you are looking at. I am sure
> that this is
> explained in the gentoo Handbook and associated documentation.
>
> This is the link you need:
>
> lrwxrwxrwx 1 root root 6 Dec 16 14:26 net.wlan0 -> net.lo
>
> but you should have also configured /etc/conf.d/net with your
> desired settings
> or just defaults will run.
>
>
> > I think that's why
> > it's starting automatically when I boot too, because I never
> added it with
> > rc-update so netmount must be picking it up.
>
>
> > 5) This is the most puzzling
> > thing. When wpa_supplicant starts even though I get a inet
> address I
> > can't always get to the internet. Why does the panel applet
> says I'm
> > connected and ifconfig shows an inet address but firefox and
> ping can't
> > reach a site like yahoo or google?
>
> This could well be a dns server/repeater issue.
>
> If you can ping the IP address of google, but not the domain
> name of it, then
> the problem is that you do not have access to a DNS repeater.
> Look in your
> /etc/resolve.conf to see if there is a line saying:
>
> nameserver XXX.XXX.XX.XX
>
> if it is absent then you have not connected to a namesever.
> This is a router
> issue and it could be controlled by some authentication scheme.
> A lot of
> wireless services offered by coffee shops, libraries, etc. may
> give you an IP
> address automatically, but then require you use your browser to
> register with
> their authentication server (using a passwd that they provide
> after you pay
> them for the privilege).
>
> Open access points with no encryption and no DNS authentication
> requirements
> should allow you to connect seamlessly to the Internet.
>
>
> > 6) For networks where I have a
> > password, should that go in wpa_supplicant.conf as plain text
> or should it
> > be encrypted?
>
> This can be a confusing endeavour because some routers will only
> accept
> certain characters in a passphrase, so you could be failing to
> connect due to
> the peculiarities of the router. The passphrase should be
> entered as provided
> by the router owner, then a hex key generated with
> wpa_passphrase (look at man
> wpa_passphrase). Then enter the hex key in your
> wpa_supplicant.conf, or your
> wpa_gui.
>
> HTH for now, ask more as you need it.
> --
> Regards,
> Mick
>
*
I'll give this stuff a try.* I'm sure I'll be back.* Thanks.
*
 
Old 04-24-2011, 06:44 PM
Neil Bothwick
 
Default WPA Supplicant

On Sun, 24 Apr 2011 12:37:03 +0000 (GMT), dhkuhl@optonline.net wrote:

> I'm trying to get wireless working reliably on my laptop. I have
> followed the documentation, but still have a lot of questions . . .
> especially since it only seems to work sometimes. First, I'm using WPA
> Supplicant without the gui tools.
> Second, I'm in NYC and there are a lot of networks I can use around
> town.
> Third, Is there a way I can control the services I use from the Grub
> menu? Since the laptop has a wireless card and an RJ45 jack, I'd like
> to be able boot and not use one or the other. Since I know if I'm not
> physically connected to a network, there's really no reason to even try
> eth0. Forth, The problem. I'm not sure how wpa_supplicant works or how
> it should work.

Wicd answers all of these questions. It connects via eth0 if a cable is
connected, otherwise it takes care of multiple wireless networks. It
avoids all the hassles with wpa_supplicant too.


--
Neil Bothwick

"B?#$^f," said Pooh, as line noise garbled his transmission.
 
Old 04-28-2012, 12:41 AM
JD
 
Default wpa supplicant

wpa_supplicant is unable to associate with my phone (which acts as an ad-hoc peer).
I have set up the wpa_supplicant.conf on F16 as follows:

network={
*** ssid="MyPhoneSSID"
*** bssid=xx:xx:xx:xx:xx:xx

*** scan_ssid=1
*** mode=AD-HOC
*** key_mgmt=NONE
*** group=WEP104 WEP40
*** wep_key0="wep_key_0"
*** wep_key1="wep_key_0"
*** wep_key2="wep_key_0"
*** wep_key3="wep_key_0"

*** wep_tx_keyidx=0
}

Association never takes place.

However, my Apple/OS_X* laptop has no problem associating with same phone.

So, what is wrong with my wpa_supplicant.conf file?


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 03:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org