For the Raspberry Pi 2 owners, get the latest image file from the official website. Its date is 16/02/2015 as in the time of the writing. I've used the ordinary install, not the New Out of the Box Setup one.
So here's something you can try if you happened to have these in your drawer and can't get them to work:
1.) When it's off, plug in the wifi adapter. Make sure you have an Ethernet cable with you too - plug in the network cable to the R-Pi.
2.) Then turn on the R-Pi.
3.) Go to the console before you enter the GUI (startx) and key these in:
- CODE: SELECT_ALL_CODE
cd /tmp
sudo wget https://dl.dropboxusercontent.com/u/67643651/mt7601_3.18.7-v7.tar.gz
sudo tar xf mt7601_3.18.7-v7.tar.gz -C /
sudo depmod 3.18.7-v7+
sudo reboot
Thanks to alfonder, source: http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=49864&start=175
4.) Then, once it's done rebooting, wait for a few more seconds, you will see a green light lit on the wifi dongle.
5.) Again, type in "sudo nano /etc/network/interfaces"
You will see a few lines of code. Go to the "allow-hotplug wlan0".
Replace the wlan0 with ra0.
The bottom of the file should look like this:
- CODE: SELECT_ALL_CODE
allow-hotplug ra0
iface ra0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Save the file, Ctrl-X and then press "Y".
Afterwards, you will see that the wifi dongle is blinking a bit. It shows some activity.
6.) Go to StartX and click Preferences->WiFi Configuration.
7.) Click Manage Networks and then click Scan button.
8.) Once you have found the WiFi hotspot you wanted to log in (Scan Results), double click it and key in the PSK. Press Enter once it's done.
You have logged into the WiFi with your new Tp-Link Dongle! Go and surf the net there using the Epiphany or Dillo browser!