I would like to connect to my TP_Link Wireless router via command line (from an Ubuntu Server). I'm trying with this:
ifconfig wlan0 down
iwconfig wlan0 essid {MY ESSID}
iwconfig wlan0 key s:{PASSWORD}
ifconfig wlan0 up
At this point, my iwconfig wlan0 output looks good, then I request an IP from the AP's DHCP server:
dhclient -r
dhclient wlan0
This last command hangs for 2-3 minutes, then exits without any output. The iwconfig wlan0 output the same, still "Access Point: Not-Associated" Looks like I cannot get an IP.
Can anybody help what is the problem?