Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Atheros AR9287 Won't Find Wireless Networks
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
xxBartonxx
n00b
n00b


Joined: 08 Mar 2012
Posts: 9

PostPosted: Mon May 07, 2012 7:11 am    Post subject: [solved] Atheros AR9287 Won't Find Wireless Networks Reply with quote

Hello all,

I'm a bit of a Gentoo noob, although I've been using Ubuntu for quite a while and use some SUSE systems at work. Anyway, I've been pulling my hair out for days trying to figure out why my wireless won't work on my laptop in Gentoo. I've followed every wiki and guide by Gentoo on the matter, and not a single forum search has found a fix. I've tried using both wicd and NetworkManger; no luck with either. The Network Manager applet doesn't even show wireless as an option (on the drop-down menu), and wicd simply says "No wireless networks found."

I have installed the ath9k drivers, configured (from what I can tell) all of the correct kernel components, installed wpa_supplicant, and dhcpcd.

I know that my hardware is detected, because ifconfig gives me
Code:

wlan0     Link encap:Ethernet  HWaddr 78:dd:08:c4:88:49 
             UP 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)


I'm not posting my kernel config in this post, but I have configured the ath9k wireless as a module, have set wireless extensions, and pretty much anything else that would be covered in your standard guide for these things. I'm running kernel version 3.2.1-r2, and this was a stage three install. My wireless card has worked with Ubuntu no problem for years, and I've booted both Backtrack 3 & 4, and both worked with my wireless as well (although I recognize BT4 is just a modified version of Ubuntu). I really can't find what the problem is. I followed the install docs verbatim, and have looked at the Module Networking section as well, all with no luck. Also, I know that the problem isn't that my wireless modules aren't getting loaded-- lsmod shows them. This one has really been stumping me.

All help/advice/conjecture/(constructive) insults-at-my-noobness are appreciated!


Last edited by xxBartonxx on Tue Jul 03, 2012 10:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 5271
Location: Goose Creek SC

PostPosted: Mon May 07, 2012 6:56 pm    Post subject: Reply with quote

ifconfig should show results of dhcpcd running like
Code:
inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
which yours does not, run
Code:
dhcpcd
which should produce something like
Quote:
dhcpcd[5823]: version 5.2.12 starting
dhcpcd[5823]: dummy0: broadcasting for a lease
dhcpcd[5823]: wlan0: broadcasting for a lease
dhcpcd[5823]: eth0: waiting for carrier
dhcpcd[5823]: eth1: waiting for carrier
dhcpcd[5823]: wlan0: offered 192.168.1.104 from 192.168.1.1
dhcpcd[5823]: wlan0: acknowledged 192.168.1.104 from 192.168.1.1
dhcpcd[5823]: wlan0: checking for 192.168.1.104
dhcpcd[5823]: wlan0: leased 192.168.1.104 for 86400 seconds
dhcpcd[5823]: forked to background, child pid 5900
Does it?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
xxBartonxx
n00b
n00b


Joined: 08 Mar 2012
Posts: 9

PostPosted: Tue May 08, 2012 12:57 am    Post subject: Reply with quote

Unfortunately, no. It did appear that it wasn't starting automatically, but manually starting it did not produce the desired results.

Code:
dhcpcd[4568]: version 5.2.12 starting
dhcpcd[4568]: no interfaces have a carrier
dhcpcd[4568]: forked to background, child pid 4969


After that, I tried
Code:
ifconfig wlan0 up
and still nothing. iwconfig returns "no wireless extensions" for each device. Network Manager still doesn't list wireless as an option, and wicd still says "No wireless networks found."

Thanks for the help. Any other suggestions?
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Tue May 08, 2012 1:26 am    Post subject: Reply with quote

first, does the device exist?

Code:

cat /proc/net/dev


if not, check for not just ATH9K but also ATH9K_PCI in your kernel

if you have both, once you modprobe ath9k, you should see it in /proc/net/dev

only *after* you have run wpa_supplicant by hand (leave it running, dont CTRL+C it), can you do dhcpcd. If you CTRL+C it you will no longer be associated/authenticated to the wireless AP.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
xxBartonxx
n00b
n00b


Joined: 08 Mar 2012
Posts: 9

PostPosted: Tue May 08, 2012 1:39 am    Post subject: Reply with quote

Thanks for your reply,

Using "cat /proc/net/dev" does show wlan0 as an interface (since my laptop isn't currently connected to any networks all of the fields are zeros). I currently have ATH9K_PCI built in instead of being a module. Should that change?

I've tried getting wpa_supplicant to run by hand, but have had no luck. I might not be using the proper commands, though. Either way, from what I've read on other boards wicd is supposed to take control of dhcpcd, wpa_supplicant, and all of your net.* interfaces for you.

This has been the one thing stalling my migration from Ubuntu to Gentoo. I need wireless to work!

Thanks again for the help.

Edit: typo
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Tue May 08, 2012 1:53 am    Post subject: Reply with quote

xxBartonxx wrote:

Using "cat /proc/net/dev" does show wlan0 as an interface (since my laptop isn't currently connected to any networks all of the fields are zeros). I currently have ATH9K_PCI built in instead of being a module. Should that change?


ATH9K_PCI is only Y/N if i recall, no module option. But yeah, sounds like your driver is good to go

xxBartonxx wrote:

I've tried getting wpa_supplicant to run by hand, but have had no luck. I might not be using the proper commands, though.


try:
Code:

wpa_supplicant -Dnl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

or
Code:

wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf


that assumes youve set up a wpa_supplicant.conf - 'man wpa_supplicant.conf' has a good bit of info on how to set one up. The one below will work as a template (less is more, as far as wpa_supplicant.conf goes)

Code:

network={
ssid="networkname"
scan_ssid=0
key_mgmt=WPA-PSK
psk="networkpassword"
}


any errors you hit, please post.

If you get an error about being unable to set wlan0 to 'up', do this, which should error, and post the output of dmesg

Code:

rmmod ath9k
modprobe -v ath9k
dmesg |tail -n30


xxBartonxx wrote:

Either way, from what I've read on other boards wicd is supposed to take control of dhcpcd, wpa_supplicant, and all of your net.* interfaces for you.


it does. rather, wicd does take all of that over. These bits with manually launching wpa_supplicant and dhcpcd are purely troubleshooting steps - in fact wicd does not use the wpa_supplicant.conf, rather, it generates its own .conf

xxBartonxx wrote:

This has been the one thing stalling my migration from Ubuntu to Gentoo. I need wireless to work!

Thanks again for the help.

Edit: typo


should be able to get it sorted. You are fortunate to have an Atheros rig, as they are hands down the most pain-free of the linux wireless chipsets. Current pain excluded of course!
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 5271
Location: Goose Creek SC

PostPosted: Tue May 08, 2012 1:54 am    Post subject: Reply with quote

Quote:
[*] Atheros ath9k PCI/PCIe bus support (NEW)
has to show as built in. Check for
Quote:
[*] Networking support --->
-*- Wireless --->
--- Wireless
<M> cfg80211 - wireless configuration API
[ ] nl80211 testmode command
[ ] enable developer warnings
[ ] cfg80211 regulatory debugging
[ ] enable powersave by default
[ ] cfg80211 DebugFS entries
[*] cfg80211 wireless extensions compatibility
[*] Wireless extensions sysfs files
<M> Common routines for IEEE802.11 drivers
[ ] lib80211 debugging messages
<M> Generic IEEE 802.11 Networking Stack (mac80211)
Default rate control algorithm (Minstrel) --->
[ ] Enable mac80211 mesh networking (pre-802.11s) support
-*- Enable LED triggers
[ ] Export mac80211 internals in DebugFS
[ ] Select mac80211 debugging features --->
and
Quote:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
<M> Atheros Wireless Cards --->
<M> Atheros 802.11n wireless cards support
[*] Atheros ath9k PCI/PCIe bus support (NEW)
[*] Atheros ath9k AHB bus support
[ ] Atheros ath9k debugging (NEW)
[*] Atheros ath9k rate control (NEW)
[*] Atheros ath9k bluetooth coexistence support (NEW)

run
Code:
lspci -k
and verify ath9k is listed as Kernel modules and Drivers in use as in:
Quote:
Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (rev 01)
Subsystem: Foxconn International, Inc. Device e034
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at f0100000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
Capabilities: [60] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 00-15-17-ff-ff-24-14-12
Capabilities: [170] Power Budgeting <?>
Kernel driver in use: ath9k
Kernel modules: ath9k
(emerge pciutils in chroot if you do not have it already but run lspci -k in booted gentoo)
_________________
Defund the FCC.
Back to top
View user's profile Send private message
erzapito
n00b
n00b


Joined: 02 Feb 2007
Posts: 61

PostPosted: Sun May 20, 2012 9:57 pm    Post subject: Reply with quote

I've got the same issue with an AR99227, I've checked all points made and still the problem persists. Kernel version is 3.2.12 and the strange thing is that I got a working USB realtek wifi.
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Mon May 21, 2012 2:51 am    Post subject: Reply with quote

erzapito wrote:
I've got the same issue with an AR99227, I've checked all points made and still the problem persists. Kernel version is 3.2.12 and the strange thing is that I got a working USB realtek wifi.


cant suggest heaps without seeing any diagnostic data
I posted some bits to try above, in order; try those, at whichever step fails, post output (e.g. post your dmesg after doing a rmmod and modprobe, post output of wpa_supplicant if you get that far)
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
erzapito
n00b
n00b


Joined: 02 Feb 2007
Posts: 61

PostPosted: Mon May 21, 2012 7:24 pm    Post subject: Reply with quote

I got wpa_supplicant working with the realtek USB, but with the atheros (and -dd flags) it keeps looking for APs constantly.

By the way, if I run:
Code:
 iwlist wlan0 scanning

I doesn't show any network with the Atheros card, but the realtek USB does shows them.
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Mon May 21, 2012 10:32 pm    Post subject: Reply with quote

erzapito wrote:
I got wpa_supplicant working with the realtek USB, but with the atheros (and -dd flags) it keeps looking for APs constantly.

By the way, if I run:
Code:
 iwlist wlan0 scanning

I doesn't show any network with the Atheros card, but the realtek USB does shows them.


should be

Code:

iw dev wlan0 scan


you may need to emerge net-wireless/iw

i would make sure you have the realtek module rmmod'd before you do this with the ath9k card; and vice versa for testing the realtek card

in addition to the specific output from wpa_supplicant when running from the CLI, id be interested to see dmesg output
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
erzapito
n00b
n00b


Joined: 02 Feb 2007
Posts: 61

PostPosted: Tue May 22, 2012 6:27 pm    Post subject: Reply with quote

I got the same results with iw.

Here are the logs for the Atheros (modprobe, wpa_supplicant):
http://pastebin.com/VNv3kDMR

and for the realtek (just for comparison):
http://pastebin.com/NZwCjzWu
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2557
Location: Slovenia

PostPosted: Tue May 22, 2012 7:27 pm    Post subject: Reply with quote

Instead of playing with that old kernel, I suggest either trying a newer kernel (3.3, 3.4) or wireless-compat.
Back to top
View user's profile Send private message
erzapito
n00b
n00b


Joined: 02 Feb 2007
Posts: 61

PostPosted: Wed May 23, 2012 10:15 am    Post subject: Reply with quote

I'll try, but that's the current stable kernel and 3.4 has just been added to the tree. By the way, what's the wireless-compat?
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2557
Location: Slovenia

PostPosted: Wed May 23, 2012 11:46 am    Post subject: Reply with quote

erzapito wrote:
By the way, what's the wireless-compat?

It's a tarball with the latest wireless drivers, compilable against arbitrary kernels. It allows you to keep your current kernel, but get the latest wireless drivers.

I know 3.2.12 is the current "stable" in portage, but it's old. Even in the 3.2 series, 3.2.18 is the latest. And I recall from Arch forums that the ath9k driver had issues some time back, that's why my advice to try newer kernels. You could also try passing nohwcrypt=1 to the ath9k module.
Back to top
View user's profile Send private message
erzapito
n00b
n00b


Joined: 02 Feb 2007
Posts: 61

PostPosted: Wed May 23, 2012 9:06 pm    Post subject: Reply with quote

I've tried kernel 3.4 and it keeps the same. I've trying to set the country code but I don't know how.

The funny thing is the wireless card works with an Ubuntu live.
Back to top
View user's profile Send private message
xxBartonxx
n00b
n00b


Joined: 08 Mar 2012
Posts: 9

PostPosted: Thu May 31, 2012 11:41 pm    Post subject: Reply with quote

Hope I'm not bumping too soon :D

I've been very busy with work and school, so today was my first day to sit down and mess with Gentoo again. Here's what we've got:

@cach0rr0 The first wpa_supplicant command you gave me (using -Dn180211) did not output any error. The second did; it gave me "Operation not supported" quite a few times, then "Failed to initiate AP scan". I ran the rmmod code while the first wpa_supplicant command was still active in another terminal; after doing so, wpa_supplicant started throwing the same errors. The output of my dmesg is here:
Code:
Deckard barton # dmesg | tail -n30
[ 2368.864899] eth0: no IPv6 routers present
[ 2369.115670] sky2 0000:04:00.0: eth0: Link is up at 100 Mbps, full duplex, flow control both
[ 2371.005284] sky2 0000:04:00.0: eth0: Link is down
[ 2372.768987] sky2 0000:04:00.0: eth0: Link is up at 100 Mbps, full duplex, flow control both
[ 2460.516978] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2460.566303] sky2 0000:04:00.0: eth0: disabling interface
[ 2460.572341] sky2 0000:04:00.0: eth0: enabling interface
[ 2460.572891] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 2460.583163] sky2 0000:04:00.0: eth0: disabling interface
[ 2460.593418] sky2 0000:04:00.0: eth0: enabling interface
[ 2460.594228] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 2462.423045] sky2 0000:04:00.0: eth0: Link is up at 100 Mbps, full duplex, flow control both
[ 2462.424246] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 2473.244771] eth0: no IPv6 routers present
[ 3710.349583] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 3739.133734] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 3773.109312] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 3809.806294] ath9k 0000:02:00.0: PCI INT A disabled
[ 3809.806309] ath9k: Driver unloaded
[ 3816.477450] ath9k 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 3816.477471] ath9k 0000:02:00.0: setting latency timer to 64
[ 3816.567105] ath: EEPROM regdomain: 0x65
[ 3816.567107] ath: EEPROM indicates we should expect a direct regpair map
[ 3816.567109] ath: Country alpha2 being used: 00
[ 3816.567110] ath: Regpair used: 0x65
[ 3816.568398] ieee80211 phy1: Selected rate control algorithm 'ath9k_rate_control'
[ 3816.569002] Registered led device: ath9k-phy1
[ 3816.569009] ieee80211 phy1: Atheros AR9287 Rev:2 mem=0xffffc900059e0000, irq=16
[ 3816.585936] CE: hpet increased min_delta_ns to 20113 nsec
[ 3816.587033] ADDRCONF(NETDEV_UP): wlan0: link is not ready


Here is the good news (yes there is some!):
Code:
iwdev wlan0 scan

does work! It gave me a list of APs near me. But... I still don't know where to go from here. :?

@DONAHUE I checked my kernel with what you posted and everything is good. At this point I'm pretty sure my kernel config is not what's stopping it from working.


Thanks again for the replies! I hope we can get this figured out for me and erzapito.
Back to top
View user's profile Send private message
xxBartonxx
n00b
n00b


Joined: 08 Mar 2012
Posts: 9

PostPosted: Sun Jun 03, 2012 6:10 pm    Post subject: Reply with quote

bump? I feel like I'm really close to getting this since I can now print out accurate APs. I just need to get wicd working as well.
Back to top
View user's profile Send private message
wikol
n00b
n00b


Joined: 07 Jun 2012
Posts: 1

PostPosted: Thu Jun 07, 2012 7:36 pm    Post subject: Reply with quote

I had just the same problem as you. Apparently,
Code:
wpa_supplicant -Dnl80211 -iwlan0 -cconf

solved it.
Also, I had to run
Code:
ifconfig wlan0 up
before.
Back to top
View user's profile Send private message
xxBartonxx
n00b
n00b


Joined: 08 Mar 2012
Posts: 9

PostPosted: Tue Jul 03, 2012 10:08 pm    Post subject: Reply with quote

Well, I finally got it. I'm only replying to this thread in case anyone has a similar issue in the future. I ended up doing a fresh install (for multiple reasons), so I now know exactly what it took to get it working. I'm going to put my steps below. More or less all of these can easily be found using the wireless docs on the official Gentoo page as well as the wicd page, but since it gave me months of grief I'm going to list the steps I performed, in order, from a fresh install.

Steps to get wireless working with Atheros AR9287 w/ wicd:

1. Build appropriate modules in the kernel (ath, ath9k, ath9k_hw, ath9k_common).
2. Ensure the modules load at boot by adding them to /etc/conf.d/modules
3. emerge dhcpcd
3. emerge wicd
4. If you've previously added wpa_supplicant, dhcpcd, or any net.* connection to the default run level, you should remove them since wicd takes care of these (with the obvious exception of net.lo), then add wicd.
5. emerge wpa_supplicant
6. Set up basic wpa_supplicant.conf in /etc/wpa_supplicant/. (I used the one previously suggested by cach0rr0)
7. Tell wicd about your wireless card under Preferences->General Settings-> Network Interfaces-> Wireless Interface.
8. Reboot

Note: this assumes that you have the other correct basic wireless kernel functions built in. All of these were automatically enabled for me in my kernel config, using the default/linux/amd64/10.0/desktop/gnome profile on kernel 3.3.8.

I would imagine you could change the order of getting wicd/wpa_supplicant, but since I had so much trouble I'm just posting the exact steps I took.

Assuming you followed all of these steps, you will need to reboot before wicd will start listing APs. I can see how anyone who has done this in the past would think this post is unnecessary since it mostly just follows the steps suggested in the Gentoo guide, but two months ago I could have used such a straightforward guide.
Back to top
View user's profile Send private message
erzapito
n00b
n00b


Joined: 02 Feb 2007
Posts: 61

PostPosted: Mon Aug 13, 2012 9:01 am    Post subject: Reply with quote

In my case I discovered that the card can detect WIFI networks with a lower channel (like 7). I think this may be an issue with country configuration, but I can't find a way to change it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum