MintWifi

From The Linux Mint Wiki

Jump to: navigation, search

Contents

A howto for wifi

This article is used so much used in support that it is locked from editing to avoid that it is destroyed.
Unfortunately we even had the entire howto section of the wiki destroyed once and parts of it several times.
If you want to contribute please do so in the discussion tab and if it is good I will include it in the main article /husse
The primary objective of all equipment is to work right out of the box.

If that does not happen with your wifi, mintWifi is here to help you, even if you do not have an internet connection. This help page will take you through a series of steps that in almost all cases ends up with a working connection. This guide is valid for Cassandra and Celena.

If you want to use WPA and can see the network but not connect or only use WEP you can probably find a solution here This is (probably) valid for all cards.

If you cannot connect your wifi to the network this is

The first step

This is a fairly simple solution and solves a lot of problems.

Network manager is the icon (2 computers) next to the clock.

If you right click on the icon it should have enable networking ticked.

Left click on the icon. Ideally you should find your network there with a "radio button" to the left, but if you have problems this is most likely not the case. You should be able to click on "Connect to Other wireless network". If you find that option, jump to here.

If you cannot find that option, you have to edit a file and use the terminal, but you'll be fine.

Open a terminal window (right click on the desktop) Type:

sudo gedit /etc/network/interfaces.

Edit the interfaces file. Leave only the loopback interfaces lo (the first 2 lines). They should look like this:


auto lo
iface lo inet loopback

Save and close the file.

Restart networking

In a terminal type:

sudo /etc/init.d/networking restart

Networking restart works in Celena and earlier, but in Daryna it does not work. The command is accepted, but it does not do what it's supposed to.
Instead right click Network manager and untick "Activate Network"
Right click again and this time do the opposite - tick "Activate Network"
If that does not work you'll unfortunately have to reboot
Back to

The network manager.

Right click on the icon. It should show "Networking enabled"

Left click on the icon.

Click on "Connect to other wireless network".

Enter your essid, choose encryption type and enter your passphrase (key). This is the key used in your wifi - do not confuse it with the password for the keyring manager. Select ok or close once all information is entered.

You may have to do this several times before success. Likewise when you are set up you may have to (left) click your network several times before you succeed to get a connection.

The keyring manager will appear and ask you to enter a new password and confirm it.

Use the same as you use for your log in (account). This will make it possible to use autologin to the keyring. The keyring manager holds all encryption keys for apps on the system (mainly for wireless though)

Wireless is now working - we hope.

When you next login the keyring manager will ask you for the password you entered earlier.

How you achieve autologin to the keyring is described in the forum

http://www.linuxmint.com/forum/viewtopic.php?t=3372

and now that you have internet you can read that.

Note: Some cards don't allow "scanning", and some cards don't support encryption. If things don't work for you, try to set your network ESSID and don't use encryption at least until things are sorted out.

If the first step does not work

Now you have to do a bit more - but it is still not overly complicated.

You use Windows drivers

This is made possible by a tool called "ndiswrapper".

First find out which card you have.

Check the documentation you may have, if you do not find it there you must use some tools to find out

If you do NOT have a USB device then to find out which wifi card you have copy/paste the following into a terminal

sudo /usr/lib/linuxmint/mintWifi/mintWifi.py

(Note that to paste in a terminal you have to right click inside it and select paste in the context menu)

First in the output you should get something like:

  • I. scanning WIFI PCI devices...

-- Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)

==> PCI ID = 14e4:4318 (rev 02)


The second line holds the name of your wifi card.

The third line holds the PCI ID which is needed sometimes to exactly identify your card.

Sometimes you don't see a detected device. You will then have to resort to a slightly more elaborate method which you find here.

If you do have a USB device proceed as follows to determine which card it is.

Type lsusb in a terminal.

This gives an output something like: Bus 002 Device 002: ID 129b:160c

The caracters after ID is the USB ID. There is one entry for each ID, and one entry for ech Bus/Device combination.

You may have to pull out and plug in your device to find out which ID belongs to the USB wifi.

You may have to use sudo lsusb -v to find out more about your card than the USB ID - you should get manufatcurer and name of the chipset this way.

The output of lsusb is to varied to be used as a source for mintWifi.py unlike lspci.


Special instructions for Broadcom 43xx.

1 Find the driver if it is included in Mint

Drivers for the following chipsets are included in mintWifi

   * Marvell 88w8335 "Libertas" chipset (PCI ID = 11ab:1faa)
   * Realtek RTL8180 rev.20 chipset (PCI ID = 10ec:8180 rev20)
   * Ralink rt2500 chipset (PCI ID = 1814:0201 and 13b1:000d)
   * more will be added

As you see the Ralink rt2500 has two "PCI ID". You have to use a different driver for each of them, and you have them already identified.

If your PCI ID is found above you can use the driver in Mint.

2 Find the driver if it is not included in Mint

A) Get it from the CD included with your hardware. Your wireless card probably came with some CDs which contain the Windows drivers for it. If you didn't find the driver in mintWifi, now would be the time to go and look for these CDs.

B) Search in the list included with Mint for your PCI ID or USB ID (ctl +F for most browsers) You may be able to download from another internet connection.

3 Load ndiswrapper

In a terminal type

sudo modprobe ndiswrapper 

to load ndiswrapper. Note: If this didn't work and you get an error message like the one below, just ignore it and proceed to section 4: FATAL: Error inserting ndiswrapper (/lib/modules/2.6.17-10-generic/kernel/drivers/net/ndiswrapper/ndiswrapper.ko): Invalid argument.

If ndiswrapper fails (your computer fails to connect) you could download a new version of ndiswrapper from the ndiswrapper home page (on another connection of course)

4 Install the Driver

To install the driver we'll use a graphical tool

It's called ndisgtk in the previous version of this instruction, but nowhere else. This information is kept for reference only.

You find it in the contol center in the menu, under Mint Config > Hardware. Its called

Windows wireless drivers
Ndiswrapper driver installation tool
1. Double click and it asks for your password
2. Click on "Install New Driver"
3. Click on "Location" and browse to point at the location where the 
   .INF file for your Windows driver is (/usr/lib/linuxmint/mintWifi/drivers/1010etc.. 
   for mintWifi, /media/cdrom0/...etc for the CD).
4. Click "Install"

You should see an entry for your driver which says "Hardware present: Yes". To know if your card has been recognized, open a Terminal and type iwconfig. An entry should be there for your card. If this didn't work, you need to get a better driver.

Oddly it may happen that the ndiswrapper tool says "Hardware present: No" and you still find it with iwconfig and it works! This probably only (?) happens if mintWifi.py did not identify your card.

The author has a laptop that behaves like that.

5 Configure the card

If your card is recognized all you need to do is configure it.

1. The Network Manager (icon with two computers in the Gnome panel) should detect it and use it automatically. You proceed as in "The first step" The network manager

2. If you can't use Network Manager

Network Manager has problems with some cards. If this is the case for you, you need to deactivate the Network Manager: right click on it and deactivate Wireless and Networking.

Now you can use the more traditional way of setting things up. Go to "Network" in the Control Center. Mark the wireless connection and select properties. Here is how to use the command line to configure your card if you prefer that.

6 Once everything works

Once everything works type

sudo ndiswrapper -m 

in the Terminal.

And add the following line to /etc/modules: (sudo gedit /etc/modules)

ndiswrapper

Now you are done!

Tell us if things worked out!

Don't hesitate to come and tell us if things went right or wrong. Come and talk to us on the IRC channel (Applications->Internet->XChat-Gnome) or on the forums http://www.linuxmint.com/forum

Good luck.

The Linux Mint Development Team.

Broadcom 43xx

  • There is a detailed how to for bcm that works from Feisty to (at least) Hardy at the Ubuntu forums. This should work for Cassandra to (at least) Elyssa.

[1]
A way to get BCM94311MCG wlan mini-PCI working on Elyssa is found here [2] This is an extension of the above mentioned how to
Another tutorial in the how to section of the forum is here [3]
A solution for bcmwl5 here [4]
The methods above are probably better than the original solution in this wiki which follows below.

1. With ndiswrapper.

To do this you need to blacklist the linux driver. To avoid any misunderstanding, the driver is called bcm43xx, in this case you are not supposed to switch the xx with your number.

Open a Terminal

Type

gksu gedit /etc/modprobe.d/blacklist

At the bottom add the lines

# get rid of the default kernel drivers for bcm43xx
blacklist bcm43xx

Save the changes.

You could of course use any comment that suits you.

Unload the driver.

In a terminal type

sudo modprobe -r bcm43xx

Continue the guide here


2. With the Linux driver

Some people might find this solution more complicated. You must also have an internet connection for the computer with the bcm43xx card, you ought to be able to temporarily hook it up to a wired connection.

You have to use a tool called fwcutter, where fw stands for firmware.

The firmware of bcm43xx is loaded on the card when it is activated, and not present on the card all the time as one would expect. The firmware is not included in Mint by default for legal reasons. The driver is present in the kernel since 2.6.17.rc2

Here's how to do it - a brief explanation.

sudo apt-get install bcm43xx-fwcutter

It will ask if you want it to download and extract the firmware, choose yes. This is a download of the firmware that is not included by default for legal reasons. You don't have to download it separately as suggested elsewhere.

Load the module:

sudo modprobe bcm43xx

This may not be necessary as it is included in the kernel by default, but just in case it's unloaded.

The device gets loaded as either eth1/eth2. Find out which one it is by doing a

iwconfig

This should return the name of the interface as ethX. Check if you can scan for networks using

sudo iwlist ethX scan

You should get a list of available wifi nets.

Note that fwcutter is a necessary prerequisite for the driver to work.

Continue the guide here

If you still can't get it working there is a guide in the Ubuntu forums to use a scripted install. Someone wrote a script to help with the install. There are two methods mentioned and the bash script method is basically what's described above, but the first, python script method, is "new". Here is the link

http://ubuntuforums.org/showthread.php?t=405990

WUSB54G

This is originally posted by sourwire in the planet

Here is a quick way to install Linksys WUSB54G v1 (only tried on v1, but it should work the same way on other versions as well).
Step 1: Get the Windows driver for your adapter. You can get it here.
Unpack the file and get the needed driver, in this case it's WUSB54G.inf
Step 2: By default Mint has ndiswrapper installed
Step 3: The easiest way to install the driver file is to first copy into your home folder (/home/username/).
Now open the Terminal and type in ndiswrapper -i WUSB54G.inf. If you decide not to move the driver into Home, just do ndiswrapper -i .inf (Modify as needed if the version is different).
Next do ndiswrapper -l to make sure that the hardware is working and connected. Now run ndiswrapper -m, ndiswrapper -mi and ndiswrapper -ma.
(The options mi and ma are unknown to me husse - hopefully they work)
The wireless should now be working, check Network Manager to see if it found any networks.

Find out what card you have, if mintWifi does not detect it

The important thing is to identify exactly which chipset is used by your wireless card. You need to identify your card's chipset in order to know exactly which driver will work for it. Follow the steps below to find out your card's PCI ID (which uniquely identifies your chipset):

  1. Open a Terminal, type lspci and press the return/enter key.
  2. Look through the output of the lspci command for an entry for your wireless card.
  3. Once you have identified your card, note down the contents of the first column, which should look like 0000:00:0c.0.
  4. Now, type lspci -n into the Terminal and press return.
  5. Find the PCI ID for your device. Your device will be referred to in the output of the command by the identifier which you just made a note of, e.g. 0000:00:0c.0. The PCI ID will be in the third column of the output and will be in the form 104c:8400.

Use the command line to configure your card

Note: You can also use the command line to configure your card. For instance to use DHCP and the "galaxy" ESSID, do the following:

  1. sudo iwconfig (to see what the name of your card interface is (let's say it's wlan0 for instance).
  2. sudo iwconfig wlan0 essid galaxy
  3. sudo ifconfig wlan0 up
  4. sudo dhclient

WPA

We can use wpa_supplicant, which is installed by default. The procedure is as follows:

Create the file /etc/wpa_supplicant.conf and insert the following:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
   ssid="your_accesspoints_essid"
   scan_ssid=1
   psk="your_wpa_passphrase_in_plaintext"
}

It's probably simplest to create wpa_supplicant.conf on the desktop and copy it to /etc

sudo cp ~/Desktop/wpa_supplicant.conf /etc

Make this file "root only"

sudo chmod go-rwx /etc/wpa_supplicant.conf

There is also an extensive tutorial in the Ubuntu forums

http://ubuntuforums.org/showthread.php?t=318539,

Other resources

This is a very long post in the Ubuntu forums that may help. The bcm43xx section above is basically the same, but there are reports now and then that the Ubuntu version helped
http://ubuntuforums.org/showthread.php?t=405990

Personal tools