For connecting to networks use WPA/WPA2 with PSK, from here
wpa_passphrase your_network_name your_password > wpa.conf ifconfig wlan0 down ifconfig wlan0 up iwconfig wlan0 essid your_network_name wpa_supplicant -B -Wnl80211 -i wlan0 -c wpa.conf dhclient wlan0
iwconfig wlan0 essid your_network_namedo?
iwconfig wlan0 essid your_network_nameneeded? I saw other webpages which doesn't have this step.
lshwshows the driver for
iwlwifi. My wifi adapter is PRO/Wireless 5100 AGN [Shiloh]. But why:
$ sudo wpa_supplicant -B -Diwlwifi -i wlan0 -c /etc/wpa_supplicant.conf Successfully initialized wpa_supplicant wlan0: Unsupported driver 'iwlwifi'
Do I need to write
-D iwlwifi? Both have the above problem.