Before you carry on:
Do you know the full essid of your router?
Do you know if your adapter is plugged in?
Do you know if you have a static or dynamic IP or a DHCP?
If it's an RTxx driver, do you have ndiswrapper or Serialmonkey's drivers installed?
First off you need to know the full essid of your router (This is the name of the network), in my case it is Belkin_G_Plus_MIMO
So open up network admin in manual configuration, make sure wlan0 is plugged in, this is your adapter, click properties and disable Roaming Mode by clicking that checked box there.
In the first box, Network Name, type in your network's essid, this could be anything from My_Interwebs or NETGEAR121324345 or anything, it's best to use the dropdown box next to it and choose from the list of currently detected routers, pick yours.
Type in a WPA key if you have one, obviously make sure it's correct.
Now for the next column, it's best to check your Router's manual for this, but for most users it's Automatic Configuration (DHCP), if you know you have a Static or Dynamic IP or any other option, make sure you use them, but as I said, it's usually DHCP.
Now click OK.
These next few steps may not be necessary but it made sure I was connected. In Terminal run:
- sudo iwconfig wlan0 essid Network_Name
Obviously, Network_Name is the essid you used in Manual Configuration..
- sudo iwconfig wlan0 key off
- sudo iwconfig wlan0 key yourwpakey
Here goes your WPA key, if you don't have one, simply type off.
- sudo dhclient wlan0
This will make sure you're connected ok. If you only _send_ DHCPOFFERS and receive nothing, you are not connected and it's best you try another method.