Sunday, October 5, 2008

Getting wireless to work in Ubuntu/Kubuntu 8.04 with atheros wireless card 5007EG - III

Getting WIFI Led to work:-
In this post, I'll describe on how to get the WIFI LED, if any on acer laptops to work. The ndiswrapper driver I used would normally not give a working LED or might be it would work with very low intensity.

The following method involves editing a file associated with the ndiswrapper driver installation and cannot be used for the madwifi installation. If I find any useful information on how to get the LED working in madwifi, I'll try posting that too.

First type the following command from command line and check for the output:-
xxxx@yyyyyy-laptop:~$ ndiswrapper -l
net5211 : driver installed
device (168C:001C) present (alternate driver: ath_pci)
here (168C:001C) means my device is listed under this sub-driver. Then you have to travel to /etc/ndiswrapper/net5211/ and check for the filename like 168C:001C.5.conf. Yours would be different as per the output of the "ndiswrapper -l" command.

Then open the above file as root from terminal by using the following command in case of ubuntu:
sudo gedit /etc/ndiswrapper/net5211/168C:001C.5.conf
and the following command in case of kubutu:
sudo kate /etc/ndiswrapper/net5211/168C:001C.5.conf
The file will look something like this:-
sys_files|ar5211.sys
NdisVersion|0x50001
Environment|1
class_guid|4d36e972-e325-11ce-bfc1-08002be10318
driver_version|,07/25/2007,5.0.3.67
BusType|5
SlotNumber|01
NetCfgInstanceId|{28022A01-1234-5678-ABCDE-123813291A00}

..................
..........
DriverDesc|NDIS Network Adapter
................
The (........) only means that other lines might be present. Please don't go about adding ....... to your file.

After the "DriverDesc|NDIS Network Adapter" line add the following 2 lines:-

gpioPinFunc1|3
gpioLedCustom|4
If "gpioPinFunc1|3" is already present, then add the gpioLedCustom|4 line alone. In gpioLedCustom|X, the last X can be anything between 1 to 4, This only makes the LED blink at different rates when it is idle. When you connect to a network, it all changes to normal. Finally you need to unload and reload the driver to check the LED utility. This can be donw using the following commands:

sudo modprobe -r ndiswrapper
sudo modprobe ndiswrapper
Thereafter the LED should be working correctly.

In my next post, I'll discuss on getting your network to a higher level of security such as WPA-PSK/WPA2-PSK than WEP. I'll try posting about this in a week or so.

Getting wireless to work in Ubuntu/Kubuntu 8.04 with atheros wireless card 5007EG - II

In this post, I'll describe about installing the madwifi drivers.

2)MADWIFI:-
This will surely be the future where further development will be made as it would seem. Though I dont think this is as good as ndiswrapper at present, this surely has loads of tools that made me enjoy tweaking with it. But I struggled to get it working though. You can try this, if the ndiswrapper method did not work or you don't want the word windows anywhere near you.

  • First go to System–>Administration–>Hardware Drivers” and disable by un-ticking the following option- Atheros Hardware Access Layer (Hal). Then Reboot your system.

  • sudo apt-get install build-essential in a terminal or using synaptic as you wish. Also install all the dependencies.

  • open the terminal from Applications–>Accessories–>Terminal and type the followind commands in the order given below.

wget http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz
tar xfz madwifi-ng-r2756+ar5007.tar.gz
cd madwifi-ng-r2756+ar5007
make
sudo make install
sudo modprobe ath_pci
sudo reboot(or restart your system manually)
if wget command doesn't work properly, you can directly download the file from the given link above to anywhere on your system. Change to that directory using your terminal and execute the remaining commands.
That should do. Now your wireless should work without any problem, just like ndiswrapper installation. If I'm correct the LED will not work, even here(especially with acer laptops). But as far as I know, there seems to be no way of getting it to work with madwifi. If you are ready to do away with the led, then you could be having the best set of madwifi tools available.

So continue using your network, till my next post on how to get the LED working as well as getting your network to a higher level of security namely WAP-PSK/WAP2/PSK than just WEP.
My next post will be on how to get the wireless LED working(with ndiswrapper).

Getting wireless to work in Ubuntu/Kubuntu 8.04 with atheros wireless card 5007EG - I

I did have some ..... well to say the truth, a lot of trouble in getting wireless to work in ubuntu. Mine being an atheros 242x 5007eg card kind of saved me from the hectic work as most of the nice people in the ubuntu development section had already put the critical code on how to get the WIFI up with ubuntu.

For a first time user, all those can be very hectic. I didn't understand what ndiswrapper was or what madwifi was. I went about reading lot of forums/posts to get an idea on how to go about them. And to say the truth, I'm happy that I did some reading because I have got nearly each and every component in my laptop to work - from the wifiadapter to its led. Explain the 2 major wifi drivers in linux in as simple terms as possible.

ndiswrapper - using a driver created by atheros/microsoft for windows operating system in linux using a wrapper around it to work properly in linux.

madwifi - Open source linux wifi drivers running on top of proprietary HAL(Hardware Abstraction layer). I got the above sentence from madwifi site. They are also working on the new drivers to madwifi namely the ath5k and ath9k. Go here madwifi.org to learn much more about the madwifi. There are some excellent madwifitools available that can be of extreme use to the users

Most of them have used both and feel that both of them are equally good, though I felt the ndiswrapper was slightly better and the faster method.

So what both the drivers do is to detect the wireless card on your system. It doesn't scan for networks automatically and connect to them and all. Just tell the OS that there is a wireless card in your system.

Here I'll try illustrating the step to get your wireless card to be detected in your system. I did use the ndiswrapper method, so I'll go about it first.

Ubuntu/kubuntu 8.04 comes with a version of madwifi installed that doesn't account for much. It didn't work for me. So I went for ndiswrapper, just because it was easy to install than madwifi. But still madwifi will be the future in linux.

1)NDISWRAPPER:-
First you have to disable the madwifi drivers from being loaded at startup as you are going to use the ndiswrapper. This can be done in 2 steps.


  • First, If you are using ubuntu, goto "System–>Administration–>Hardware Drivers” and disable by un-ticking the following option. Incase of kubuntu , goto "System->Hardware Drivers Manager" and do the same.

  • For making sure that the system does'nt load these drivers automatically at restart, execute the following command in a terminal or console.
echo “blacklist ath_pci” | sudo tee -a /etc/modprobe.d/blacklist
(enter your account password if asked to at this point)
The /etc/modprobe.d/blacklist is actually like a text file, so open and check whether the line "blacklist ath_pci" is added to it using gedit or kate.

  • Restart the system after the previous step.
Now you can install the ndiswrapper(with ndisgtk) in your laptop


  • Incase of adept manager in kubuntu, just search for ndiswrapper and ndisgtk and install the following packages:- ndiswrapper-common, ndiswrapper-utils-1.9 and ndisgtk. Incase of synaptic in ubuntu, you might have to enable the multiverse and universe repositories. This can be done by following the steps in this page in the ubuntu wiki - here.

  • After installing the above softwares, you'll get the "Windows wireless Drivers" menu either in "System->Administration" or "System" menu. Click on it. A window as below will open up.


  • In this window, click on "Install New Driver" and point to "net5211.inf". This file is one of the many files in a zip file that has to be downloaded from atheros directly if possible. The name of the driver file that worked for me was from acer site itself, the link was ftp://ftp.work.acer-euro.com/notebook/aspire_5110/driver/Wireless_Atheros_V5.3.0.67_XP_XB63_XB62(WHQL).zip unzip this file and traverse to "Wireless_Atheros_V5.3.0.67_XP_XB63_XB62(WHQL)/Drivers/XP-x32" folder in the zip file. There you can find the 32-bit wireless drivers i.e. net5211.inf file. If you are ot able to get this driver, the try getting an atheros driver that is atleast WHQL (that could do).select it and install the driver.

  • After installing, just check whether the line after the driver name in ndisgtk changes to hardware present is "YES". That means you have installed the right drivers for your wireless card. If it shows that the hardware is not present, then you might need to try some other drivers, or check for the correct wireless card in your laptop.
After installing ndiswrapper drivers, open a console/terminal check whether you are able to detect your network by typing the command

iwlist wlan0 scan
(it can be wlanX or even ethX or athX, you can check that by using the command ifconfig or iwconfig in a terminal/console to see the correct name of your wireless interface.)
If you are not able to see any networks, then try scanning again, after pressing any wireless button(if any present) that you use for turning on your wireless. For me (aspire 4720z), this button was at the top of the laptop keyboard. You should be able to detect some network like this:-

wlan0 Scan completed :
Cell 01 - Address: 00:1E:40:40:C4:36
ESSID:""
Protocol:IEEE 802.11g
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality:96/100 Signal level:-34 dBm Noise level:-96 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:bcn_int=100
Extra:atim=0
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK

If you get something like the above that means, you are able to detect your network properly. If your network is unencrypted or uses WEP encryption, you should be able to browse right away using Network Manager in ubuntu or KNetwork Manager in kubuntu, after giving necessary ip settings and WEP passwords etc. I did prefer WIFI-Radar, as It did detect my network automatically and I was able to browse instantly.

All this time, the wireless LED, if any on some acer laptops would not have worked or worked with very little brightness. I'll explain on how to get that working in the future posts. Next I'll give an brief overlook of madwifi installation.

Friday, October 3, 2008

Installing GFX GRUB in Ubuntu - grub graphically reloaded

Well, GRUB has grown and has grown to be more beautiful. The new GNU Graphics GRUB is the new improvement to standard GRUB boot screen that adds much visual appeal. To install GFX GRUB, the older GRUB has to be removed. (Warning:- removing grub is tedious. If you don't any idea please suspend this tutorial here itself.)
  • To remove GRUB, open a terminal and type the following command.
sudo apt-get remove grub
  • Download GFX Grub from here.
Before starting make a backup copy of your GRUB menu. goto the folder /boot/grub and copy your menu.lst file .
Now download some additional themes for GFX Grub Menu Click Here.
  • Now unzip the files and move it to /boot/grub .. Since it comes under root file system you need to gain root privileged to do that .. Type the following in Terminal

    sudo su root

    Enter password and then type this nautilus this will open a new Nautilus Window. .Navigate to /boot/grub through root nautilus window.. Copy all the message.xyz (xyz can be anything)file to /boot/grub.

  • Now since you have added theme .. Lets do final settings to make this GFX Grub work.. Open terminal and type this

    sudo gedit /boot/grub/menu.lst

    Add this line at the top of the Menu.lst file

    gfxmenu /boot/grub/message.xyz # the xyz should be replaced with the theme name that you are going to use

  • Since you have removed you older grub you need to restore GFX Grub so that you boot through OS without any problem.. Open Terminal and do these
    Type
    sudo grub
    find /boot/grub/stage1
    You will get a output like (hd0,4) or other depending on you HDD partitions

  • Then type this

    root (hdx,y)
    setup (hdx)
    quit

Where “x” represent the value of hdd sector in which you have installed grub.

  • The last thing you have to do is to install Grub MBR .

    sudo fdisk -l

    You will get an output like this

    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0×0dd6c6bd

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 3187 25599546 7 HPFS/NTFS
    /dev/sda2 3188 8287 40965750 f W95 Ext’d (LBA)
    /dev/sda3 8288 9607 10602900 83 Linux
    /dev/sda4 9608 9729 979965 82 Linux swap / Solaris
    /dev/sda5 3188 5737 20482843+ 7 HPFS/NTFS
    /dev/sda6 5738 8287 20482843+ 7 HPFS/NTFS

    Look for the bold Entry and finally install MBR in Filesystem

    sudo grub-install /dev/sdaX
    Note : Replace sda by hda or anything else, if it is in fdisk -l output. If the grub-install fails you can try adding “–recheck” option to the command.

    Where X represent the number of you Hard Disk sector in which you had installed Grub.
This is what my boot screen looks like:

That must do. If no error occured in any of the steps, Your gfx grub installation has gone well. If any error has occured, please re-install the grub from your repository and follow the final 3 steps (marked by bullets) completely to get working GRUB. and replace the backed up copy of the menu.lst file. I can in no way, help incase of error. Even my understanding of GRUB is minimal. Everything went well for me. So I have posted this here.
All The Best!!!!!!!!!!!

Ubuntu Intrepid Ibex beta released

Ubuntu 8.10 aka Intrepid Ibex has been released for developer testing as on October 2nd and I'm waiting for any reviews about how people feel about the new release.
I'm using 8.04 on my acer aspire 4720z and have been looking for the new one to see if there is any support for my Atheros AR5007eg wireless card(inbuilt). I think I'll wait till the end of this month when they'll release the actual thing. I'm really waiting for that with lots of things to look upto.
I also want to see how kde4 goes about as well.


The countdown has started for the next release of the most popular linux distribution ever.