Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] AR5212 - "no wireless extensions", can't use WiFi

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
19 posts • Page 1 of 1
Author
Message
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

[SOLVED] AR5212 - "no wireless extensions", can't

  • Quote

Post by kwesadilo » Wed Aug 18, 2010 12:57 am

I have just gotten my first Gentoo installation to the point where I mount all of my filesystems during startup, and I don't have X or any applications installed yet. My laptop is a Thinkpad with an Atheros AR5212 wireless chipset. I have compiled the "Atheros 5xxx wireless cards support" and "Generic IEEE 802.11 Networking Stack (mac80211)" into my kernel (version 2.6.34-r1). I have the net.wlan0 init script set to run in the default runlevel.

Here is my /etc/conf.d/net:

Code: Select all

modules=("wpa_supplicant")  # use wpa_supplicant, not iwconfig

config_eth0=("dhcp")    # use DHCP for wired Ethernet
config_wlan0=("dhcp")   # and wireless

wpa_supplicant_eth0="-Dath5k"   # tell wpa_supplicant which driver to use
During init, I get the following output:

Code: Select all

Starting wlan0
   Bringing up wlan0
      dhcp
         Running dhcpd ...
wlan0: dhcpd 4.0.15 starting
wlan0: waiting for carrier   # delay of several seconds here
wlan0: timed out
When I log in, wlan0 is down, but I can bring it up with ifconfig wlan0 up. After I do that, when I do iwconfig wlan0, I get "wlan0 no wireless extensions". Ultimately, I want to use Network Manager in GNOME to configure wireless, but I want to get it working this way first, because it will be more convenient for me to download the install files for X and applications via wireless. Also, the main reason I'm installing Gentoo is to figure out how things actually work.

This is the output of lspci -k -s 03:00.0 (03:00.0 is the location of my wireless card):

Code: Select all

03:00.0 Ethernet controller: Atheros Communications Inc. AR5212 802.11 abg NIC (rev 01)
   Subsystem: IBM Thinkpad 11a/b/g Wireless LAN Mini Express Adapter (ARBXB6)
   Kernel driver in use: ath5k
When I run an Ubuntu Live CD on the same computer, I can use the wireless card to get on my network. This is the output of the same lspci command on Ubuntu:

Code: Select all

03:00.0 Ethernet controller: Atheros Communications Inc. AR5212 802.11 abg NIC (rev 01)
   Kernel driver in use: ath5k
   Kernel modules: ath5k
I don't know what level the problem is at, so I don't know what information will be most helpful in fixing this. I can post whatever other config files or command output you want, though. I appreciate any assistance.
Last edited by kwesadilo on Wed Aug 25, 2010 3:11 pm, edited 1 time in total.
Top
st0rm
n00b
n00b
Posts: 8
Joined: Tue Aug 17, 2010 12:02 am

  • Quote

Post by st0rm » Wed Aug 18, 2010 2:46 am

Well, first according to the 4th line of your /etc/conf.d/net, you are configuring wpa_supplicant for eth0 not wlan0 :wink:

Also, you need to configure /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
fast_reauth=1

network={
scan_ssid=1
ssid="your network"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="your wpa key"
Your options may be different depending on whether you use WPA, WPA2, and what your key algorithms are. Check your routers settings page to get yours
Top
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

wpa_supplicant.conf

  • Quote

Post by kwesadilo » Wed Aug 18, 2010 5:25 am

st0rm wrote:Well, first according to the 4th line of your /etc/conf.d/net, you are configuring wpa_supplicant for eth0 not wlan0
D'oh!

This is my wpa_supplicant.conf:

Code: Select all

# configuration file for wpa_supplicant

# necessary for wpa_supplicant to work correctly
ctrl_interface=/var/run/wpa_supplicant

ap_scan=1   # let wpa_supplicant scan and select APs

# the network I usually use
network={
    ssid="my SSID"
    psk="my passphrase"
    priority=5
}

# the network I'm using to debug this problem
network={
    scan_ssid=1
    ssid="my SSID"
    key_mgmt=NONE
    priority=10
}
I didn't post it before, because I thought I might not even be getting as far as wpa_supplicant. I was going to add more explicit details, but I think the defaults are permissive, and my router is too cheap to let me see which cipher it is using.

Edit: I rebooted into Gentoo after changing /etc/conf.d/net to say wlan0 and adding the second network block in /etc/wpa_supplicant/wpa_supplicant.conf. iwconfig wlan0 still outputs "wlan0 no wireless extensions", and the init script still times out "waiting for carrier".
Top
Paczesiowa
Guru
Guru
Posts: 593
Joined: Mon Mar 06, 2006 6:20 pm
Location: Oborniki Śląskie, Poland

  • Quote

Post by Paczesiowa » Wed Aug 18, 2010 7:45 am

Code: Select all

wpa_supplicant_eth0="-Dath5k"
there's no such driver as ath5k, you should use nl80211, but I think it's the default one. I have empty /etc/conf.d/net and my wifi works fine (wpa_supplicant.conf looks similar to yours).

try using wpa_supplicant directly (there's an invocation spell in --help), that sohuld give you better error messages.

if you want iwconfig to work you must check some option in kernel to provide legacy wireless extensions for nl80211/mac80211/whatever it's called devices.
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Wed Aug 18, 2010 1:04 pm

Hi, before changing your config, can you post this :

Code: Select all

# ifconfig -a
# iwconfig
# iwlist scan
# dmesg | tail
Top
chithanh
Retired Dev
Retired Dev
User avatar
Posts: 2158
Joined: Sat Aug 05, 2006 10:16 pm
Location: Berlin, Germany

Re: AR5212 - "no wireless extensions", can't use W

  • Quote

Post by chithanh » Wed Aug 18, 2010 2:57 pm

kwesadilo wrote:when I do iwconfig wlan0, I get "wlan0 no wireless extensions".
This is normal with recent kernels, wireless extensions have been superseded by nl80211. Use net-wireless/iw instead of wireless-tools. If you absolutely must use wext/iwconfig, then enable wext compatibility in your kernel (CFG80211_WEXT).
Top
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

Results

  • Quote

Post by kwesadilo » Wed Aug 18, 2010 9:12 pm

d2_racing wrote:Hi, before changing your config, can you post this :
If it matters, my eth0 interface works, but I did this while the cable was unplugged.
ifconfig -a:

Code: Select all

dummy0    Link encap:Ethernet  HWaddr aa:aa:c5:67:5c:af  
          BROADCAST NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:1c:25:bc:2f:ef  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:fe200000-fe220000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:1f:e1:cc:6a:bf  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
iwconfig:

Code: Select all

lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

wlan0     no wireless extensions.

sit0      no wireless extensions.
iwlist scan:

Code: Select all

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

dummy0    Interface doesn't support scanning.

wlan0     Interface doesn't support scanning.

sit0      Interface doesn't support scanning.
dmesg | tail:

Code: Select all

[   19.219348] kjournald starting.  Commit interval 5 seconds
[   19.219732] EXT3-fs (dm-3): using internal journal
[   19.219735] EXT3-fs (dm-3): mounted filesystem with ordered data mode
[   19.301439] Adding 2097148k swap on /dev/dm-6.  Priority:-1 extents:1 across:2097148k 
[   20.717427] find used greatest stack depth: 4200 bytes left
[   22.353900] loadkeys used greatest stack depth: 3928 bytes left
[   23.869298] e1000e 0000:00:19.0: irq 31 for MSI/MSI-X
[   23.920154] e1000e 0000:00:19.0: irq 31 for MSI/MSI-X
[   23.920742] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   54.612610] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Paczesiowa wrote:there's no such driver as ath5k, you should use nl80211, but I think it's the default one.
I switched the "-Dath5k" to "-Dnl80211", which had no effect. I have to go now, but I'll try using wpa_supplicant directly later.
chithanh wrote:Use net-wireless/iw instead of wireless-tools.
If I have to learn a tool I haven't used before, I may as well just learn wpa_supplicant.
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Thu Aug 19, 2010 1:35 am

Try with "-Dext"

Also, can you post this :

Code: Select all

# ifconfig wlan0 up
# iwlist scan
# dmesg | tail
Top
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

Output of various commands

  • Quote

Post by kwesadilo » Thu Aug 19, 2010 3:55 am

d2_racing wrote:Also, can you post this :
ifconfig wlan0 up has no output, as expected (I think).
iwlist scan (as before):

Code: Select all

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

dummy0    Interface doesn't support scanning.

wlan0     Interface doesn't support scanning.

sit0      Interface doesn't support scanning.
dmesg | tail

Code: Select all

[   20.618801] Adding 2097148k swap on /dev/dm-6.  Priority:-1 extents:1 across:2097148k 
[   22.789633] find used greatest stack depth: 4200 bytes left
[   25.521229] e1000e 0000:00:19.0: irq 31 for MSI/MSI-X
[   25.572099] e1000e 0000:00:19.0: irq 31 for MSI/MSI-X
[   25.572646] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   56.274601] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  136.689117] less used greatest stack depth: 3928 bytes left
[  228.102582] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  275.540781] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  490.990570] ADDRCONF(NETDEV_UP): wlan0: link is not ready
I also attempted to associate manually with wpa_supplicant several times. Most of the commands did not terminate by themselves and eventually settled into repeated output. I killed these with <Ctrl-C>.
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf (no driver specified):

Code: Select all

ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCSIWMODE]: Invalid argument
ioctl[SIOCGIWRANGE]: Invalid argument
ioctl[SIOCGIWMODE]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
ioctl[SIOCSIWESSID]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCGIWSCAN]: Invalid argument
ioctl[SIOCSIWSCAN]: Invalid argument
ioctl[SIOCGIWSCAN]: Invalid argument
ioctl[SIOCSIWSCAN]: Invalid argument
ioctl[SIOCGIWMODE]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
ioctl[SIOCSIWESSID]: Invalid argument
Could not configure driver to use managed mode
Failed to initiate AP scan.
Failed to initiate AP scan.
CTRL-EVENT-TERMINATING - signal 2 received
Failed to disable WPA in the driver.
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dwext (generic driver):

Code: Select all

ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCSIWMODE]: Invalid argument
ioctl[SIOCGIWRANGE]: Invalid argument
ioctl[SIOCGIWMODE]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
ioctl[SIOCSIWESSID]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCGIWSCAN]: Invalid argument
ioctl[SIOCSIWSCAN]: Invalid argument
ioctl[SIOCGIWSCAN]: Invalid argument
ioctl[SIOCSIWSCAN]: Invalid argument
ioctl[SIOCGIWMODE]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
ioctl[SIOCSIWESSID]: Invalid argument
Could not configure driver to use managed mode
Failed to initiate AP scan.
Failed to initiate AP scan.
CTRL-EVENT-TERMINATING - signal 2 received
Failed to disable WPA in the driver.
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dnl80211 (new generic driver?):

Code: Select all

ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCGIWRANGE]: Invalid argument
ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCSIWGENIE]: Invalid argument
ioctl[SIOCSIWFREQ]: Invalid argument
ioctl[SIOCSIWESSID]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
ioctl[SIOCSIWGENIE]: Invalid argument
ioctl[SIOCSIWFREQ]: Invalid argument
ioctl[SIOCSIWESSID]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
Trying to associate with XX:XX:XX:XX:XX:XX (SSID='ssid' freq=2412 MHz)
Association request to the driver failed
Authentication with XX:XX:XX:XX:XX:XX timed out.
Trying to associate with XX:XX:XX:XX:XX:XX (SSID='ssid' freq=2412 MHz)
Association request to the driver failed
Authentication with XX:XX:XX:XX:XX:XX timed out.
CTRL-EVENT-TERMINATING - signal 2 received
Failed to disable WPA in the driver.
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dmadwifi:

Code: Select all

Unsupported driver 'madwifi'.
I can't make head or tail of all that. I'm not really sure why I redacted my MAC addresses and SSIDs, but by the time I questioned it, I was already halfway done. The MAC address displayed was the MAC address of the access point I am trying to use.

Regarding the last command output, I noticed that the "madwifi" USE flag for wpa_supplicant is disabled. Is the madwifi driver at all useful in my situation? More broadly, I am confused about terminology. Despite what Paczesiowa wrote, this page seems to indicate that ath5k is a driver. I don't know how authoritative it is. If ath5k is not a driver, then what is it, and why does lspci say that ath5k is the driver in use? What kind of things are the "Atheros 5xxx wireless cards support" and "Generic IEEE 802.11 Networking Stack (mac80211)" that I compiled into my kernel, and how do they interact? If the answers to those questions are complicated, I'm content to be pointed toward some quality documentation, but I'm not sure where to find that information myself.

Update: Added MAC address info
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Thu Aug 19, 2010 11:51 am

Can you try with the package net-wireless/iw and post the result of iw wlan0 up or something similar ?
Top
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

Able to connect with iw

  • Quote

Post by kwesadilo » Fri Aug 20, 2010 7:18 am

I was able to connect to an unsecured wireless network using iw. First, I did iw wlan0 info, which gave

Code: Select all

Interface wlan0
	ifindex 4
	type managed
iw wlan0 connect <my SSID> failed with an error message but succeeded silently after I did ifconfig wlan0 up. After that, I can do iw dev wlan0 link, which gives the same info that iwconfig wlan0 would give if I were using that:

Code: Select all

Connected to XX:XX:XX:XX:XX (on wlan0)
	SSID: <my SSID>
	freq: 2412
	RX: 80682 bytes (553 packets)
	TX: 649 bytes (8 packets)
	signal: -67 dBm
	tx bitrate: 1.0 MBit/s
After I'm on the wireless network, I can get layer 3 connectivity with dhcpcd wlan0:

Code: Select all

wlan0: dhcpcd 4.0.15 starting
wlan0: broadcasting for a lease
wlan0: offered 192.168.2.8 from 192.168.2.1
wlan0: acknowledged 192.168.2.8 from 192.168.2.1
wlan0: checking 192.168.2.8 is available on attached networks
wlan0: leased 192.168.2.8 for 86400 seconds
Finally *drumroll* ping 192.168.2.1:

Code: Select all

PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=23.6 ms
64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=24.0 ms
64 bytes from 192.168.2.1: icmp_seq=3 ttl=64 time=1.06 ms

--- 192.168.2.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.062/16.277/24.086/10.759 ms
Wooo, wireless networking!

OK, so that works. Now I need WPA, which means I need wpa_supplicant. Any ideas?
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Fri Aug 20, 2010 2:21 pm

Ok, for your wpa_config you need this :

Code: Select all

# cat /etc/conf.d/net

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

After that, you will need to ajust this file :

Code: Select all

# nano /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=0
#update_config=1

network={
	ssid="your_SSID"
	psk="your_PASSWORD"
	proto=WPA2
	key_mgmt=WPA-PSK
	pairwise=CCMP
	group=CCMP
	priority=5
}
Also, can you post iwlist scan or iw wlan0 scan ?

I would like to see your AP.
Top
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

Substitute for an update

  • Quote

Post by kwesadilo » Tue Aug 24, 2010 6:04 pm

Lest you all think that I've silently abandoned Gentoo for greener pastures, I should explain my lack of response. In the last few days, I've moved across the country and started a new semester at school. I did make some progress on this problem before I left, but I want to do more tests before I post the results. Hopefully, I'll have time to do that in the next day or so, at which time I will update this post.
Top
gr0x0rd
Guru
Guru
User avatar
Posts: 311
Joined: Sat Aug 12, 2006 7:37 pm

  • Quote

Post by gr0x0rd » Tue Aug 24, 2010 6:28 pm

kwesadilo, come on man! While you're busy sorting your life out, people (such as myself) are sitting here madly pressing F5 to hear whether or not you're able to get the new ath5k driver working with wpa_supplicant! :)

Good luck getting everything done... hope you have more success with it than I did.
~g
emerge -FML...
Top
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

Full report

  • Quote

Post by kwesadilo » Wed Aug 25, 2010 1:32 am

I am now able to connect to WPA2 wireless networks (or at least my network) with wpa_supplicant with one tiny problem remaining. My process follows:

With wpa_supplicant.conf set to connect to an unsecured wireless network, I ran wpa_supplicant with both wext and nl80211 drivers and with values 0, 1, and 2 for ap_scan (set in wpa_supplicant.conf). I think that it gave a fairly uninteresting failure message. When I ran it with verbose output (-d), I got a whole bunch of information that I didn't know what to do with, including the line "Driver does not support WPA." This happened for all combinations of driver and ap_scan setting.

I changed my kernel config so that Networking->Wireless->cfg80211 wireless extensions compatibility (CFG_80211_WEXT) was enabled. I suspect that d2_racing may bang his head against his desk as he reads this. I also enabled Wireless extensions sysfs files below it in case that was useful. Then, I rebuilt and reinstalled the kernel. When I rebooted, I got this during init:

Code: Select all

Starting wlan0
    Starting wpa_supplicant on wlan0 ...
    Starting wpa_cli on wlan0 ...
        Backgrounding ...
There were no init errors associated with wlan0, and when I logged in, ifconfig showed that wlan0 was up, but iwconfig (which now works since wireless extensions are supported) showed "Access Point: Not-Associated", and ping said "connect: Network is unreachable". But wpa_supplicant was running, so I messed around in wpa_cli. The status command initially said something discouraging, I think "ASSOCIATING". Long story short, the only thing that made any difference was changing the value of ap_scan. 0 and 1 didn't do anything, but right after I changed it to 2, I got this output:

Code: Select all

<2> CTRL-EVENT-SCAN-RESULTS
<2> Trying to associate with <router's MAC address> (SSID=<my SSID> freq=2412 MHz)
<2> Associated with <router's MAC address>
<2> CTRL-EVENT-CONNECTED - Connection to <router's MAC address> complete (auth) [id=0 id_str=]
OK
After that, status' output was

Code: Select all

bssid=<router's MAC address>
ssid=<my SSID>
id=0
pairwise_cipher=NONE
group_cipher=NONE
wpa_state=COMPLETED
ip_address=192.168.2.8
I'm not sure how I got that IP address, but I had IP connectivity when I quit wpa_cli and pinged the router. Probably dhcpcd started in init and was running that whole time waiting for Ethernet connectivity. I disconnected and set ap_scan=2 in my wpa_supplicant.conf, after which I was able to reconnect by running wpa_supplicant with the wext driver, then running dhcpcd. I was also able to do it with the nl80211 driver. Thus, I'm unclear on what my kernel reconfiguration actually did.
d2_racing wrote:

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=0
#update_config=1

network={
   ssid="your_SSID"
   psk="your_PASSWORD"
   proto=WPA2
   key_mgmt=WPA-PSK
   pairwise=CCMP
   group=CCMP
   priority=5
}
I added details to my wpa_supplicant.conf as suggested and turned WPA2 on in my router. When I rebooted, I got no init errors, but I wasn't connected. wpa_cli status output "ASSOCIATING". Interactively, wpa_cli repeated output

Code: Select all

<2> CTRL-EVENT-SCAN-RESULTS
<2> Authentication with 00:00:00:00:00:00 timed out
<2> Trying to associate with SSID <my SSID>
Sidebar: At this point, I rebooted and stopped all net services. ifconfig wlan0 up gave "SIOCSIFFLAGS: Unknown error 132". A quick Google search revealed that this means you have to turn your hardware radio switch on. Mine was already on, so I turned it off, then on, and that fixed the problem. I never had to do this before, and I have never yet had to do it since. I don't know whether it is at all related to this problem. Now back to the story.

With wlan0 up but with no net services running, I ran wpa_supplicant with both the nl80211 and the wext drivers, and I got output similar to that seen in wpa_cli after I enabled WPA2. I commented out all of the specific information in the network block of my wpa_supplicant.conf so that it looked like this:

Code: Select all

ctrl_interface=/var/run/wpa_supplicant  # needed for wpa_supplicant to work
ctrl_interface_group=wheel  # keep users from seeing the configuration
 
ap_scan=2   # make wpa_supplicant scan and select APs

network={
    ssid="<my SSID>"
#    proto=WPA
    key_mgmt=WPA-PSK
#    pairwise=CCMP TKIP
#    group=CCMP TKIP WEP104 WEP40
    psk="<my password>"
#    priority=10
}
Then, when I ran wpa_supplicant (either nl80211 or wext), I got

Code: Select all

Trying to associate with SSID '<my SSID>'
Associated with <router's MAC address>
Authentication with <router's MAC address> timed out
Trying to associated with SSID '<my SSID>'
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
which repeated forever until I killed it. I was suspicious that my passphrase, which contains a " character, was not being read the way I wanted by wpa_supplicant, so I changed the password in the config file and in the router to "password". Running wpa_supplicant again with nl80211, I got

Code: Select all

Trying to associate with SSID '<my SSID>'
Associated with <router's MAC address>
WPA: Key negotiation completed with <router's MAC address> [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection with <router's MAC address> completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with <router's MAC address> [GTK=CCMP]
the last line of which repeated immediately and later after I had backgrounded the process. After this, wpa_cli status gave

Code: Select all

bssid=<router's MAC address>
ssid=<my SSID>
id=0
pairwise_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
and I was able to get an IP address with dhcpcd and ping the router. When I rebooted and logged in, I had Layer 3 connectivity with WPA2 but a stupid password.

Now, I only want to know how to get wpa_supplicant to interpret the " character correctly in my passphrase. I have been enclosing my passphrase in " quotes in the file and escaping the " in my passphrase with \, like """. Can I do this? Do I need to use wpa_passphrase and put the hex key that gives me in wpa_supplicant.conf?
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

Re: Full report

  • Quote

Post by d2_racing » Wed Aug 25, 2010 11:18 am

kwesadilo wrote:I changed my kernel config so that Networking->Wireless->cfg80211 wireless extensions compatibility (CFG_80211_WEXT) was enabled. I suspect that d2_racing may bang his head against his desk as he reads this. I also enabled Wireless extensions sysfs files below it in case that was useful. Then, I rebuilt and reinstalled the kernel. When I rebooted, I got this during init:

Code: Select all

Starting wlan0
[/quote]

Not really, I use that kind of config too :P
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

Re: Full report

  • Quote

Post by d2_racing » Wed Aug 25, 2010 11:19 am

kwesadilo wrote:Now, I only want to know how to get wpa_supplicant to interpret the " character correctly in my passphrase. I have been enclosing my passphrase in " quotes in the file and escaping the " in my passphrase with \, like """. Can I do this? Do I need to use wpa_passphrase and put the hex key that gives me in wpa_supplicant.conf?
WPA_supplicant is kind of stupid, so I recommend that you use any characters between A-Z and 0-9, don't use any " or anything that can trick wpa :P
Top
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

Various

  • Quote

Post by kwesadilo » Wed Aug 25, 2010 3:10 pm

d2_racing wrote:Not really, I use that kind of config too
I meant that, based on your previous posts, I thought that you thought that I had wireless extensions compatibility enabled this whole time. Probably I just don't get how the drivers are set up. Into the kernel docs!
d2_racing wrote:WPA_supplicant is kind of stupid, so I recommend that you use any characters between A-Z and 0-9, don't use any " or anything that can trick wpa
Well, I've used that password with Linux (so presumably wpa_supplicant) before. Maybe I'll try again when I'm setting up NetworkManager. I'll call this problem solved, though.
Top
kwesadilo
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Mon Jul 12, 2010 1:57 am
Location: Colorado

Got passphrase to work

  • Quote

Post by kwesadilo » Thu Aug 26, 2010 7:48 pm

I got my old passphrase with the " to work by putting it through wpa_passphrase. I did

Code: Select all

wpa_passphrase <my SSID>
then typed the passphrase in on standard input so as to avoid any bash quote confusion. Then I put the key given in the output into my wpa_supplicant.conf.
Top
Post Reply

19 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic