The wireless networks are detected, but I am unable to connect to them.
Here is the code I've tried:
sudo iwlist wlan0 scan (Working) iwconfig wlan0 essid "Network name" key s:"key" (Error for wireless request "Set Encode" (8B2A)) SET failed on device wlan0 ; Invalid argument wpa_passphrase essid password > /etc/wpa_supplicant.conf wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument
Then i tried by adding
ctrl_interface=/var/run/wpa_supplicant at the beginning of file
wpa_supplicant.conf and running the same wpa_supplicant command but result is
ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument ctrl_iface exists and seems to be in use - cannot override it Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore Failed to initialize control interface '/var/run/wpa_supplicant'. You may have another wpa_supplicant process already running or the file was left by an unclean termination of wpa_supplicant in which case you will need to manually remove this file before starting wpa_supplicant again.
How do I connect to a specified wireless network through command line in Ubuntu 12.04?