I would like to use my wifi doggle in my pc (ubuntu 12.04). I am able to connect to my access point through the GUI. I would like to do the same in the terminal.
My access point uses WEP. So I typed the following commands
iwconfig wlan0 mode managed key 6d6f6e6579
iwconfig wlan0 essid "AccessPoint"
dhclient wlan0
after typing dhclient wlan0
it waits like 1-2 min then outputs nothing and cannot connect to the Access Point.
iwconfig output:
wlan0 IEEE 802.11bgn ESSID:"AccessPoint"
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long timit:7 RTS thr=2347 B Fragment thr:off
Encryption key:6D6F-6E65-79
Power Management:off
I would appreciate any suggestion
Best Answer
You can't get IP from DHCP Server.. probably you have wrong parameters in your iwconfig command or its not complete! Im going to make a comprehensive troubleshoot for you however some of them would be unrelated to your case! First of all lets check if there's other services using your wireless card.. you can try unblocking radio frequencies with this command:
after that check block status :
if there's any "yes" beyond Wireless LAN , it means something preventing rfkill to unblock your wifi; you should find that service and stop it. $ sudo service {service} stop generally,they are other network tools.especially network managers. stop them or uninstall.
after that set iwconfig parameters in a proper way..to see wifi access points and their specifications:
You can add
| grep searchvalue
to search for a particular namecheck those parameters and fill (use root privilege sudo or su root) : note : the wifi interface name could be different in your machine (eth# or wlan#)
or if you don't know the MAC Address of access point :
and :
at last pull up connection :
now request for an IP :
check if your connection succeed (there should be an IP4) :
or ping your gateway (route) ..Good luck