[NC10] How to enable wireless card, with RFKILL support
Posted: 15 Feb 2009, 14:44
The Samsung NC10 has an Atheros wireless card, for which a free driver is actually under heavy development stage. Every day a lot of bugs got fixed and almost all the features of the card are supported.
Anyway, when we come to a new Ubuntu 8.10 installation, the wireless card does not work and we need to install a newer driver.
Easy to do: just install linux-backports-modules-intrepid package from official repos and disable old driver adding the following lines to /etc/modprobe.d/blacklist:
After a system restart the card will work correctly.
Now the interesting part of this thread:
we are going to enable the RFKILL support, so the wireless card can be switched on/off when needed.
A patch for the driver which enables this functionality already exists, it has been written by Tobias Doerffel, and it's awaiting for being merged on main development trunk.
For more information, check the ath5k-devel mailing list.
Here is the patch, which obviously needs to be applied to driver sources.
Another usefull patch that I'm using is this one (written by Bob Copeland), which fixes an annoying bug happening sometime, when the card can't be reset until next system power cycle.
Now we have to enable the FN-F9 key to toggle the wireless card. To do this we'll use a script which will insert/remove the wireless module, but it will need admin rights to do that. So, we have to set up sudo with a new rule, in order to run the script with no need to insert our password everytime.
In a terminal, launch the command
This will open the sudo configuration file for editing.
Go to the line
and below it add this one:
Now go to the end of file and add this line:
Exit (CTRL+x) and save the file.
This way, all the users in admin group can run the WLTOGGLE command (and ONLY this command) with no need for the password.
Now get the script, copy it to /usr/local/bin and make it executable. Then configure the FN-F9 key:
Now the XF86WLAN key (ie FN-F9) will launch the 'sudo /usr/local/bin/wlonoff.sh' command when pressed.
For any information or help, just ask here!
Anyway, when we come to a new Ubuntu 8.10 installation, the wireless card does not work and we need to install a newer driver.
Easy to do: just install linux-backports-modules-intrepid package from official repos and disable old driver adding the following lines to /etc/modprobe.d/blacklist:
Code: Select all
blacklist ath_pci
blacklist ath_hal
Now the interesting part of this thread:
we are going to enable the RFKILL support, so the wireless card can be switched on/off when needed.
A patch for the driver which enables this functionality already exists, it has been written by Tobias Doerffel, and it's awaiting for being merged on main development trunk.
For more information, check the ath5k-devel mailing list.
Here is the patch, which obviously needs to be applied to driver sources.
Another usefull patch that I'm using is this one (written by Bob Copeland), which fixes an annoying bug happening sometime, when the card can't be reset until next system power cycle.
Now we have to enable the FN-F9 key to toggle the wireless card. To do this we'll use a script which will insert/remove the wireless module, but it will need admin rights to do that. So, we have to set up sudo with a new rule, in order to run the script with no need to insert our password everytime.
In a terminal, launch the command
Code: Select all
sudo visudo
Go to the line
Code: Select all
# Cmnd alias specification
Code: Select all
Cmnd_Alias WLTOGGLE=/usr/local/bin/wlonoff.sh
Code: Select all
%admin ALL=(ALL) NOPASSWD: WLTOGGLE
This way, all the users in admin group can run the WLTOGGLE command (and ONLY this command) with no need for the password.
Now get the script, copy it to /usr/local/bin and make it executable. Then configure the FN-F9 key:
Code: Select all
gconftool-2 -s --type string /apps/metacity/keybinding_commands/command_2 'sudo /usr/local/bin/wlonoff.sh'
gconftool-2 -s --type string /apps/metacity/global_keybindings/run_command_2 XF86WLAN
For any information or help, just ask here!