I've had Ubuntu 14.04 on this laptop for a while, and had previously had some difficulty connecting to the network at school, but had usually blamed that on the school wifi itself, since it was highly location dependent. I'm travelling in Brazil at the moment and have managed to occasionally successfully connect to my host's network. My Android phone has no trouble connecting (I'm writing this by tethering my computer through USB to my phone). Most of the time the computer just attempts to connect, then either asks me to reenter the password, and then stays disconnected.
There are a couple of things you can do that help when connecting to unresponsive networks.
First, increase your retry from a conservative 7 up to somewhere between 10 or 14. Run the following command in a terminal. Assuming your wireless device is wlan0:
sudo iwconfig wlan0 retry 12
or for wlan1:
sudo iwconfig wlan1 retry 12
Then refresh network-manager:
sudo service network-manager restart
Next, make sure you have ports 67 and 68 open for DHCP traffic and ports 52 and 53 for DNS. There are many ways to accomplish this. For testing purposes, you can disable the firewall using the following command:
sudo ufw disable
You can use ufw to open these ports. See:
Another option is to use the user friendly gui version of ufw, gufw.
sudo apt-get update sudo apt-get install gufw
gufw is pretty straightforward.
Finally, you may be experiencing some restrictions set by the most restrictive world regulatory domain default Ubuntu has set by default. Please be aware that using the wrong regulatory code may result in fines or punishment so only use the proper code that corresponds to the country or nation the computer is currently bieng used in and if you leave the country, you MUST change the code accordingly or use the default world regulatory domain instead which is legal and valid in all nations and countries.
For use inside Brazil ONLY!! execute the following command to apply local wireless restrictions:
sudo iw reg set BR
To make this setting permanent, you can set the regulatory domain in your /etc/default/crda file by running the following command. Again, this is for Brazil ONLY:
sudo sed -i 's/REGDOMAIN=/REGDOMAIN=BR/g' /etc/default/crda
Finally, if you ever leave the country and need to change this back to the default world regulatory domain, run the following command and then reboot:
sudo sed -i 's/REGDOMAIN=BR/REGDOMAIN=/g' /etc/default/crda