Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Configuring ath5k atheros wifi through openrc
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
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Fri Oct 10, 2014 6:21 pm    Post subject: [Solved] Configuring ath5k atheros wifi through openrc Reply with quote

Has anyone lately tried configuring ath5k through openrc lately?

Currently trying to rule out a hardware problem.

Situation: I have a AR5212/AR5213 miniPCI wifi card. I can run it just fine in my full laptop - removing the IPW2200BG and sticking the card in, and the card seems to work. I'm using NetworkManager on this computer and it configures the wireless just fine.

Then I move this miniPCI card to a single board computer. The miniPCI card enumerates and modprobe ath5k works just fine.
The dmesg log of both machines look very similar on startup.
I can iwconfig this device and it looks just fine:
Code:
# ifconfig wlan0 up
# iwconfig wlan0
wlan0     IEEE 802.11bg  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

However this is where the similarity ends. When I run
Code:
iwlist scan

The laptop reports the usual wifi AP's nearby including my own. However in the single board computer it reports
Code:
wlan0     No scan results

Is there anything special that needs to be done to enable the radio so that it could pick up APs nearby?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?


Last edited by eccerr0r on Sun Dec 14, 2014 6:50 am; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Fri Oct 10, 2014 6:45 pm    Post subject: Reply with quote

You probably didn't compile legacy wireless-extensions module.
It's not necessary anymore since you most likely have wpa_supplicant anyway and you can use wpa_cli to trigger scan and retrieve results. You can also use iw to do that.
For maual configuration iwconfig and friends is more convenient way though. I think the wireless extensions module is under networking support -> wireless.
Try it
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Fri Oct 10, 2014 6:57 pm    Post subject: Reply with quote

CONFIG_CFG80211_WEXT is defined in the kernel settings.

I was trying with wpa_supplicant and it would never find my WPA2 AP, so I was hoping that iwlist scan to see if it finds anything...

Code:
# /etc/init.d/wpa_supplicant start
 * Starting WPA Supplicant Daemon ...Successfully initialized wpa_supplicant
 [ ok ]
# sleep 10
# wpa_cli scan_results
Selected interface 'wlan0'
bssid / frequency / signal level / flags / ssid
#


Hmm...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Fri Oct 10, 2014 7:23 pm    Post subject: Reply with quote

Ops.. I've just realised I sent this message in wrong place.

In fact it is possible that rfkill stands on your way, you can check it with
Quote:

cat /sys/class/rfkill/rfkill0/{soft,hard}
(1 means blocked)

Also, what channel are you using? Your wifi is probably set to some particular region by factory defaults, and ath5k sets allowed channels to match allowed range. If your AP is not within this range, your adapter might not see it. (even though it would switch to AP's zone after connecting)
AFAIR this behaviour was different with much older ath5k.

Also, since it's miniPCI, what about antenna? Is it printed on PCB or perhaps stuffed somewhere behind your laptop's screen so you detach it when moving to another device? :)
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Fri Oct 10, 2014 11:07 pm    Post subject: Reply with quote

rfkill0/soft and rfkill0/hard are 0.

rfkill0/state is 1, not sure what that means.

I don't recall what channel my AP was using. It's in the standard US range from 1 through 11 somewhere, likely channel 6. I wonder if this card is scanning in the 1-11 range and not checking in the 5GHz range (it wasn't really clear if this AR5212/5213 supports 802.11a or not... Then again I don't have other 802.11a 5GHz equipment.)

Oddly enough the same card does pick up my AP with a very strong signal when installed in the laptop with a full NetworkManager setup. The AP is within 6 feet or so of my work area, which may be of concern to the next problem:

Antennas are definitely a concern. While in the laptop I was using the laptop's antennas which are probably pretty good, but no, I don't have standard antennas for my target, non-laptop platform - I have 6 inch pieces of 30 ga Kynar (full wave antennas, since wavelength is about 12cm) to both the main and aux ports and keep them face up. Even if they aren't the most efficient they should pick up and transmit *something*. I did this same trick before with an old Orinoco miniPCI and it worked fine in a laptop that didn't have a built-in antenna system with slightly less range. I may have to try running the laptop with the Atheros with these jury-rigged wire antennas to rule out the poor antenna possibility.

Another observation is that running hostapd doesn't work due to some initialization problem of nl80211. May also be related, but I didn't try hostapd on the Networkmanager setup.

For the curious:
The "target" platform is a AMD SC520 Single Board Computer with a miniPCI slot. I think it was part of an old router that someone parted. It has 64MB RAM so it probably isn't a good idea to install networkmanager on it :)
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Sun Dec 14, 2014 6:49 am    Post subject: Reply with quote

I think this is solved now, sort of.

This is a hardware problem of sorts. When I plugged in a Cardbus PCMCIA card and it works with the OpenRC config with no additional modification.

*shrug* this is weird.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
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