Now I did replace /sbin/wpa_supplicant with a soft link to /bin/true (to make sure that it was wpa_supplicant) now I do
sudo ifconfig wlan0 up sudo iwconfig wlan0 mode managed key xxxxxxxxxx essid MANIMAHESH sudo dhclient3 wlan0
and it connects all the time.
Now I did replace /sbin/wpa_ supplicant with a soft link to /bin/true (to make sure that it was wpa_supplicant) now I do
sudo ifconfig wlan0 up
sudo iwconfig wlan0 mode managed key xxxxxxxxxx essid MANIMAHESH
sudo dhclient3 wlan0
and it connects all the time.