Okie dokie - some progress; well, at least in Arch. I tried to sort things out in Ubuntu but I ended up with a kernel panic when trying to unload and then reload the ath9k drivers. Probably not a good thing!
Anyway, I thought I'd post my Arch sequence here in case it helps any of the rest of you along the way. No guarantees this will work - it might even break stuff, but, as with anything you see in these fora, if it does, you get to keep both pieces!
--- Preparation ---
First things first - Arch comes without any kind of GUI interface - thus no 'network-manager' and no 'wicd', so it might be wise to disable and even uninstall them (at least until you get a connection working). Also, currently I can only get it to work if WPA-PSK encryption is activated - I can't even get an open connection to work, but I've listed the commands you should use anyway to see if you can figure it out. Also, as I was working as 'root' in Arch, some of the commands below might need raised privileges - if this is the case, just type to repeat the last command as the superuser. You should also do this without your Ethernet connection connected - I recommend unplugging it and rebooting if you've already started up with Ethernet active - I've found that some of the commands are sent via the Ethernet if it's active instead of straight to the wireless card.
--- 1: Kernel Modules ---
The first thing I did with regards to setting up the system was I made sure that ndiswrapper was not active (I had been messing with it) and ensured that ath9k was active. This you can do by:
Code:
lsmod | grep ndiswrapper
lsmod | grep ath9k
If ndiswrapper shows up, do:
Code:
modprobe -r ndiswrapper
and if ath9k doesn't show up:
EDIT:
It seems the ath9k module support for kernels older than 2.6.27 has gone. You used to need to compile the ath9k module yourself as it's not built-in to these kernels. I'll leave the links for the download and instruction sites here in case they come back (wireless.kernel.org), but it looks like Hardy users might have to either switch to Intrepid or compile their own kernel (instructions). I'm currently in the middle of compiling 2.6.28.2, so I'll let you know in due course if this is the way to go.
FURTHER EDIT:
Just finished compiling 2.6.28.2 and it broke a load of stuff - so I definitely don't recommend that! Looks like it's not going to be so easy to get AR928X working with Hardy.
--- 2: Interface Activation ---
Next, use:
and:
to determine whether your card is active and what designation it has been given. If it is present in 'iwconfig' but not in 'ifconfig', then it is recognised but disabled. To enable it use:
Code:
ifconfig <INTERFACE> up
replacing <INTERFACE> with the name of card in 'iwconfig'. Now wait a few seconds for the card to initialise, and then scan for local networks using:
Code:
iwlist <INTERFACE> scan
If it comes up with:
try disabling your wireless card using:
Code:
ifconfig <INTERFACE> down
and then shutting down and restarting the ath9k module
Code:
modprobe -r ath9k; modprobe ath9k
WARNING: this caused a kernel panic on my Ubuntu system - not sure why as it was fine in Arch. If anyone can give any insight into this, please let us know!
--- 3: Network Assignment ---
Next you need to assign a network to your wireless interface. If you're using an open (unencrypted) connection or using WPA-PSK, use command #1 below - for WEP use command #2:
Code:
#1: iwconfig <INTERFACE> essid <ESSID>
#2: iwconfig <INTERFACE> essid <ESSID> key <HEX KEY>
where <ESSID> is the name of your network and <HEX KEY> is the hexadecimal key string (NB: will be visible in your terminal as you type). <ESSID> should match one of the cells (yours!) listed in the output of 'iwlist <INTERFACE> scan' done earlier. If using an unencrypted connection or WEP, go to step 5.
--- 4: WPA-PSK Encryption ---
If you're using WPA-PSK, you'll need to set up your encryption scheme. If you don't have it already, install 'wpa_supplicant' via your usual method. You then need to create a config file for it (backing up the old one first, of course):
Code:
sudo mv /etc/wpa_supplicant.conf{,.bak}
echo "ctrl_interface=DIR=/var/run/wpa_supplcant GROUP=$USERNAME" | sudo tee /etc/wpa_supplcant.conf
wpa_passphrase '<ESSID>' '<PSK>' | sudo tee -a /etc/wpa_supplcant.conf
where <PSK> is your connection password (NB: will be visible as you type). Please note the single quotes. As the new file contains your key in plaintext, you should change the access privileges of the file so that only root can read it:
Code:
sudo chmod 0600 /etc/wpa_supplicant.conf
Now you need to activate the encryption by using:
Code:
wpa_supplicant -B -Dwext -i <INTERFACE> -c /etc/wpa_supplicant.conf
Adding '-d' or '-dd' will give you more verbose output.
--- 5: IP Address Assignment ---
Now, no matter which type of connection you have (unencrypted, WEP or WPA-PSK), you should wait a little while before getting or assigning an IP address (I would wait at least 30 seconds) as the wireless card needs time to get itself up and running. Once it's ready, you can get an address via DHCP using either of the commands below:
Code:
dhcpcd <INTERFACE>
dhclient <INTERFACE>
Fingers crossed! I'll keep hacking away to try and give you more concise instructions; I still need to figure out a few more things myself!
Bookmarks