If you have administrative priveleges over the router, I suggest you change the WPA2 encryption method to AES. It is more secure. Also, if the router uses WPA and WPA2 mixed mode, change it to WPA2 only.
Second, if the connection is made as expected, but seems to drop for no apparent reason, there are a few things we can try:
sudo modprobe -r rtl8188ee
sudo modprobe rtl8188ee swenc=1
Also, find your country code here:
iw reg get
If it shows as 00, that's a one-size-fits-all...maybe code. Let's try setting your code explicitly. Find it here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Set it with:
sudo iw reg set IS
Of course, substitute your actual country code, if not Iceland.
Finally, tell your system you wish to always use your preferred network rather than roaming to another: Ubuntu connect drops. Worked for a while then started dropping again
In order to make some or all of these permanent, we'll need to amend a few files. First, tell us if the problem is resolved.
If none of these steps help, I suggest you compile a later version of the driver. Please obtain a temporary wired ethernet connection. Please download this file to your desktop: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.13.2/backports-3.13.2-1.tar.gz Right-click it and select 'Extract Here.' Now open a terminal and do:
sudo apt-get install linux-headers-generic build-essential
cd ~/Desktop/backports-3.13.2-1
make defconfig-rtlwifi
make
sudo make install
You will get a warning about signing that you may safely ignore. Detach the ethernet, reboot and let us hear your report.
lspci | grep etw
. – terdon Mar 09 '14 at 16:24