1 |
----- Original Message ----- |
2 |
From: Mick |
3 |
Date: Sunday, April 24, 2011 9:14 am |
4 |
Subject: Re: [gentoo-user] WPA Supplicant |
5 |
To: gentoo-user@l.g.o |
6 |
|
7 |
> On Sunday 24 April 2011 13:37:03 dhkuhl@×××××××××.net wrote: |
8 |
> > I'm trying to get wireless working reliably on my laptop. I |
9 |
> have followed |
10 |
> > the documentation, but still have a lot of questions . . . |
11 |
> especially> since it only seems to work sometimes. |
12 |
> > |
13 |
> > First, I'm using WPA Supplicant without the gui tools. |
14 |
> |
15 |
> run wpa_gui from a terminal and a lot of what you're asking |
16 |
> below will become |
17 |
> self-explanatory. |
18 |
> |
19 |
> |
20 |
> > Second, I'm in NYC and there are a lot of networks I can use |
21 |
> around town. |
22 |
> > |
23 |
> > Third, Is there a way I can control the services I use from |
24 |
> the Grub menu? |
25 |
> > Since the laptop has a wireless card and an RJ45 jack, I'd |
26 |
> like to be able |
27 |
> > boot and not use one or the other. Since I know if I'm not |
28 |
> physically> connected to a network, there's really no reason to |
29 |
> even try eth0. |
30 |
> |
31 |
> Check /etc/conf.d/rc and in particular: |
32 |
> |
33 |
> # RC_NET_STRICT_CHECKING allows some flexibility with the 'net' |
34 |
> service.# The following values are allowed: |
35 |
> # none - The 'net' service is always considered up. |
36 |
> # no - This basically means that at least one net.* service |
37 |
> besides net.lo |
38 |
> # must be up. This can be used by notebook users that |
39 |
> have a wifi |
40 |
> and |
41 |
> # a static nic, and only wants one up at any given time |
42 |
> to have the |
43 |
> # 'net' service seen as up. |
44 |
> # lo - This is the same as the 'no' option, but net.lo is |
45 |
> also counted. |
46 |
> # This should be useful to people that do not care |
47 |
> about any specific |
48 |
> # interface being up at boot. |
49 |
> # yes - For this ALL network interfaces MUST be up for the |
50 |
> 'net' service to |
51 |
> # be considered up. |
52 |
> |
53 |
> RC_NET_STRICT_CHECKING="no" |
54 |
> |
55 |
> (or you can use "lo") |
56 |
> |
57 |
> |
58 |
> > Forth, The problem. I'm not sure how wpa_supplicant works or |
59 |
> how it should |
60 |
> > work. The wpa_supplicant man page gives a few examples on how |
61 |
> to run it, |
62 |
> > but when I look at the process list it seems to be run by |
63 |
> another program |
64 |
> > called wpa_cli. There's also a shell script in |
65 |
> /etc/wpa/supplicant that |
66 |
> > looks like it can start or stop it with CONNECT or DISCONNECT. |
67 |
> 1) Do I |
68 |
> > need to enter networks in wpa_supplicant.conf or does |
69 |
> wpa_supplicant scan |
70 |
> > for networks and connect to whatever's available? |
71 |
> |
72 |
> The latter. |
73 |
> |
74 |
> You can however enter manually in |
75 |
> /etc/wpa_supplicant/wpa_supplicant.conf |
76 |
> particular parameters (keys and what not) of known networks to |
77 |
> which you |
78 |
> connect as a matter of preference. |
79 |
> |
80 |
> |
81 |
> > 2) If I have multiple |
82 |
> > networks available how does wpa_supplicant choose which to |
83 |
> connect to and |
84 |
> > can I specify which one I want? |
85 |
> |
86 |
> It'll connect to: |
87 |
> |
88 |
> a) Any network you have specified in your |
89 |
> /etc/wpa_supplicant/wpa_supplicant.conf according to the |
90 |
> preference you have |
91 |
> set up therein. |
92 |
> |
93 |
> b) Any network it finds. |
94 |
> |
95 |
> c) Any network you select with wpa_cli, or select/enable/disable |
96 |
> in wpa_gui. |
97 |
> |
98 |
> |
99 |
> > 3) How should wpa_supplicant be started, |
100 |
> > stopped and restarted? What should be used for this: |
101 |
> wpa_supplicant,> wpa_cli, or wpa_cli.sh? I don't see anything |
102 |
> in /etc/init.d for that, but |
103 |
> > it looks like netmount may be doing it. |
104 |
> |
105 |
> You need to define it in /etc/conf.d/net: |
106 |
> |
107 |
> modules=( "wpa_supplicant" ) |
108 |
> wpa_supplicant_wlan0="-Dwext" |
109 |
> |
110 |
> (adjust this according to the name of your wireless iface and driver). |
111 |
> |
112 |
> |
113 |
> > 4) The documentation doesn't say |
114 |
> > to, but the way I got wireless working is by creating a link |
115 |
> net.wlan0 -> |
116 |
> > net.lo in the /etc/init.d directory. Is this correct? |
117 |
> |
118 |
> It depends which documentation you are looking at. I am sure |
119 |
> that this is |
120 |
> explained in the gentoo Handbook and associated documentation. |
121 |
> |
122 |
> This is the link you need: |
123 |
> |
124 |
> lrwxrwxrwx 1 root root 6 Dec 16 14:26 net.wlan0 -> net.lo |
125 |
> |
126 |
> but you should have also configured /etc/conf.d/net with your |
127 |
> desired settings |
128 |
> or just defaults will run. |
129 |
> |
130 |
> |
131 |
> > I think that's why |
132 |
> > it's starting automatically when I boot too, because I never |
133 |
> added it with |
134 |
> > rc-update so netmount must be picking it up. |
135 |
> |
136 |
> |
137 |
> > 5) This is the most puzzling |
138 |
> > thing. When wpa_supplicant starts even though I get a inet |
139 |
> address I |
140 |
> > can't always get to the internet. Why does the panel applet |
141 |
> says I'm |
142 |
> > connected and ifconfig shows an inet address but firefox and |
143 |
> ping can't |
144 |
> > reach a site like yahoo or google? |
145 |
> |
146 |
> This could well be a dns server/repeater issue. |
147 |
> |
148 |
> If you can ping the IP address of google, but not the domain |
149 |
> name of it, then |
150 |
> the problem is that you do not have access to a DNS repeater. |
151 |
> Look in your |
152 |
> /etc/resolve.conf to see if there is a line saying: |
153 |
> |
154 |
> nameserver XXX.XXX.XX.XX |
155 |
> |
156 |
> if it is absent then you have not connected to a namesever. |
157 |
> This is a router |
158 |
> issue and it could be controlled by some authentication scheme. |
159 |
> A lot of |
160 |
> wireless services offered by coffee shops, libraries, etc. may |
161 |
> give you an IP |
162 |
> address automatically, but then require you use your browser to |
163 |
> register with |
164 |
> their authentication server (using a passwd that they provide |
165 |
> after you pay |
166 |
> them for the privilege). |
167 |
> |
168 |
> Open access points with no encryption and no DNS authentication |
169 |
> requirements |
170 |
> should allow you to connect seamlessly to the Internet. |
171 |
> |
172 |
> |
173 |
> > 6) For networks where I have a |
174 |
> > password, should that go in wpa_supplicant.conf as plain text |
175 |
> or should it |
176 |
> > be encrypted? |
177 |
> |
178 |
> This can be a confusing endeavour because some routers will only |
179 |
> accept |
180 |
> certain characters in a passphrase, so you could be failing to |
181 |
> connect due to |
182 |
> the peculiarities of the router. The passphrase should be |
183 |
> entered as provided |
184 |
> by the router owner, then a hex key generated with |
185 |
> wpa_passphrase (look at man |
186 |
> wpa_passphrase). Then enter the hex key in your |
187 |
> wpa_supplicant.conf, or your |
188 |
> wpa_gui. |
189 |
> |
190 |
> HTH for now, ask more as you need it. |
191 |
> -- |
192 |
> Regards, |
193 |
> Mick |
194 |
> |
195 |
|
196 |
I'll give this stuff a try. I'm sure I'll be back. Thanks. |