Saturday, August 4, 2012

Wireless Setup in Ubuntu: Step by Step

The laptop I used in this Ubuntu tutorial is a Lenovo T60p.  I will show you how to setup several network cards for wireless use on Ubuntu.  The cards are a Cisco Aironet 350 series, a D-Link AirPlus XtremeG (DWL-G650) both which should work right out ot the box.  We will also look at several other harder to use wireless cards.  First, here are a few tips that will save you some frustration time as there are a few minor issues with the Ubuntu wireless setup.

A Few Ubuntu Wireless Tips First

Wireless Tip #1: Forget the Network Monitor Icon

One of the frustrating aspects of setting up wireless is that the network monitor as you see on the panel says that the networking is not connected.



Even worse when you  right click the icon it specifically says that wireless is not enabled.  However, in my case it was enabled.  In fact, it was working fine it was the network monitor program that was not working right and providing misleading information.




Wireless Tip #2: Check Your Firefox Browser Settings

A strange thing happened on my initial install of Ubuntu 8.10 Intrepid Ibex, the Firefox settings were started set to work offline only.  This setting is found by choosing File and Work Offiline on the Firefox browser version 3.0.3.  This box must be unchecked in order for you to get Internet access.

Wireless Tip #3: Test Your Network Connection

Because the network monitor can play games with your mind, as small as it might be, you need to test to see if the wireless network is really working.  An easy solution for that is to use the Network Tools found in System/Administration/Network Tools.  Use the ping option and enter the IP Address of your router or wireless access point and you should see return like you see below if it is working.

Installing Wireless Cards on Ubuntu

The wireless cards that are supposed to work right out of the box, have a few issues, like you will need to restart your network connections. Ndiswrapper requires some skills at the command line as well as a manual install. So, if you are new to Linux or are afraid of the command line, stick with the cards that work the easiest.

Cisco 350 Series

This is a card that works easily with Ubuntu 8.10 Intrepid Ibex but had to be configured manually with older Ubuntu versions.

Step #1: Insert and start the laptop
 
Initially this card will look and function as dead...no activity.  However it is easy to fix.  Right click the network monitor on the panel or go to Preferences/Network Configuration.
Step #2: Configure the Wireless Connection

This window opens and you need to enter a Connection name and a SSID.  Th e SSID is an identifier for your wireless router or wireless access point..  On my wireless router I allow connections based on MAC address so if that is the case you will need to enter that MAC address in the box.  For testing purpose I would suggest that you do not initially set up security until it is all working correctly.

Click OK.

Step #3:  Obtain an IP Address with DHCP

The Ip Address for an Internet connection will probably be supplied by DHCP from your wireless router or access point. The simplest way to get this going is now to issue this command:
sudo dhclient

This will tell your network card to go looking for a dhcp lease and I received this output which indicates that the wired connection is not working at all, as it is not connected.   However you can see at the bottom that the laptop has received a lease even though it initially says the network is down.
wifi0: unknown hardware address type 801
 
wmaster0: unknown hardware address type 801
SIOCSIFFLAGS: No such device
SIOCSIFFLAGS: No such device
SIOCSIFFLAGS: Operation not supported
SIOCSIFFLAGS: Operation not supported
wifi0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/wifi0/
Sending on   LPF/wifi0/
Listening on LPF/wlan0/00:18:de:65:ce:5f
Sending on   LPF/wlan0/00:18:de:65:ce:5f
Listening on LPF/wmaster0/
Sending on   LPF/wmaster0/
Listening on LPF/ath0/00:11:95:69:2f:c7
Sending on   LPF/ath0/00:11:95:69:2f:c7
Listening on LPF/pan0/0e:38:e5:44:ee:e0
Sending on   LPF/pan0/0e:38:e5:44:ee:e0
Listening on LPF/eth0/00:16:41:a8:a4:8f
Sending on   LPF/eth0/00:16:41:a8:a4:8f
Sending on   Socket/fallback
receive_packet failed on wlan0: Network is down
receive_packet failed on wmaster0: Network is down
DHCPREQUEST of 192.168.3.179 on ath0 to 255.255.255.255 port 67
DHCPDISCOVER on pan0 to 255.255.255.255 port 67 interval 5
DHCPACK of 192.168.3.179 from 192.168.3.22
bound to 192.168.3.179 -- renewal in 39901 seconds.
At this point this card is fully functiional.  When you restart and if it does not automatically start up again issue that command for it to find a dhcp IP Address and you will be set.  This card refused to start automatically.


D-Link 650 Air Plus

This network card was chosen as it it listed as installable right out of the box. I mean, really isn't that what you are looking for is the easiest install. In addition, it uses the faster connection.
Step #1: Insert the Card
Open the Preferences/ Network Configuration  option and check to see if your wireless card was detected.You will be disappointed to find that again the network monitor says it is not working and that it has never connected .
Step #2: Check the Drivers
If you check the Ubuntu drives under System/Administration/Hardware Drives you will see that this card is listed and has been tested.  This is an information step and you really do not have to do it.



Step #3: Configure the Wireless Connection

This window opens and you need to enter a Connection name and a SSID.  Th e SSID is an identifier for your wireless router or wireless access point..

Step #4:  Obtain an IP Address with DHCP

The IP Address for an Internet connection will probably be supplied by DHCP from your wireless router or access point. The simplest way to get this going is now to issue this command:
sudo dhclient
That should do it, now it is working.

Dell TrueMobile 1180

I tried this one as it has several different features. This is a WLAN CompactFlash Card.    This is an older card that came with many Dell laptops.  Guess what, it worked right off ...
Step #1: Insert the Card
Open the Preferences/ Network Configuration  option and check to see if your wireless card was detected.You will be disappointed to find that again the network monitor says it is not working and that it has never connected .
Step #2: Configure the Wireless Connection
This window opens and you need to enter a Connection name and a SSID.  Th e SSID is an identifier for your wireless router or wireless access point..
Step #3:  Obtain an IP Address with DHCP
The Ip Address for an Internet connection will probably be supplied by DHCP from your wireless router or access point. The simplest way to get this going is now to issue this command:
sudo dhclient
Amazingly ...this worked fine.

LinkSYS CompactFlash Card 2.4 GHz

Have soooo much success with wireless I decided to try this one, which I was sure would not work.

Ndiswrapper

Some cards work right out of the box, more or less. Other cards you will need to use ndiswrapper and the Windows drivers for the card. Here are the steps for ndiswrapper.

Step #1: Installation
Download the current ndiswrapper from http://ndiswrapper.sourceforge.net Here is the file in the home directory.



Copy the file to the /usr directory where as root you can expand it.
sudo cp ndiswrapper* /usr
sudo cd /usr

sudo tar zxvf ndiswrapper*
cd ndiswrapper-1.53
# ls
AUTHORS driver loadndisdriver.8 ndiswrapper.8 README
ChangeLog INSTALL Makefile ndiswrapper.spec utils
sudo cd utils
This will move you into the utils directory.

sudo ./ndiswrapper -i /home/user/LSBCMNDS.inf
installing lsbcmnds ...
Now in this command note that the ndiswrapper command is preceded with a ./ and followed by the -i option to install a Windows driver. Put your the installation CD for the wireless card in the cdrom and look for drivers. You are looking for a .inf file like the one you see here. Copy these files into your home directory and then point the command that you see above to the .inf file.




sudo ./ndiswrapper -l
lsbcmnds : driver installed
device (14E4:4318) present (alternate driver: bcm43xx)
This will verify that the driver was installed. The next thing to do is to add ndiswrapper so it will load at startup with modprobe.

sudo modprobe ndiswrapper
sudo ./ndiswrapper -m
adding "alias wlan0 ndiswrapper" to /etc/modprobe.d/ndiswrapper ...

That should do it for cards that can use Ndsiwrapper


Problems:Linksys Wireless-G with SpeedBooster


This sounded good...after all don't you want more speed. The card was detected by the system the lights indicated that it was trying to talk to the wireless network, but it failed to get on the network.
Click Here for a list of Wireless Cards
This should help in determining which card to purchase or how to install.
Step #1: Verify Card Detection

As root it was first necessary to see exactly what the system was detecting.

sudo pccardctl ident

Socket 0:
no product info available
If you see this output this is bad...this means the memory card cannot be read.
This means that it knows a wireless card is available but it does not even know what kind of wireless card. For this particular card I installed the drivers with ndiswrapper and went through every step but it still failed to work. The point- some cards will not work even with continual effort, get one that is easy to install.

1 comments:

  1. Heya i'm for the first time here. I found this board and I find It truly useful & it helped me out a lot. I hope to give something back and help others like you helped me.

    Here is my homepage: ezinepr.com

    ReplyDelete