0
  1. 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
    

    What does iwconfig wlan0 essid your_network_name do?

    Is iwconfig wlan0 essid your_network_name needed? I saw other webpages which doesn't have this step.

  2. lshw shows the driver for wlan0 is 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 -Diwlwifi or -D iwlwifi? Both have the above problem.

Thanks.

1
  1. iwconfig wlan0 essid your_network_name sets the ESSID your card should attempt to connect to. If there are multiple hotspots with the same name, the card would attempt authentication with all of them until it finally associates and authenticates with the right one. This is optional, given that you provide your BSSID using sudo iwconfig wlan0 essid NETWORK ap 00:60:1D:01:23:45

  2. Try to either use wext or nl80211 (wext recommended, because nl80211 is said to be obsolete). They will take care of interfacing with your wifi card. Basically your command should be:

    sudo wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf

    Spaces don't really matter. -Dwext and -D wext are supposed to be the same.

12
  • thanks. 1. is BSSID same as ap? Is this step necessary, given that ISSD is given to wpa_passphrase and stored in wpa.conf? 2. why not iwlwifi, the wifi adapter driver? Is wext my wifi adapter's driver? – Tim Apr 25 '15 at 3:33
  • 1. Yes, BSSID is the same as AP. The BSSID is simply the AP's MAC address. This step is necessary. You have to let the wifi card know what hotspot to connect to, right? So either ESSID (general) or BSSID (Specific AP) would work, BSSID working faster (your card doesn't have to try to authenticate to all those AP's with the same name. – PNDA Apr 25 '15 at 3:40
  • 2. I think wext is the one interfacing with iwlwifi. wext provides the interface necessary for iwlwifi to understand your commands. Wext takes your parameters and tells iwlwifi what to do. – PNDA Apr 25 '15 at 3:42
  • 1. ISSD is given to wpa_passphrase and stored in wpa.conf in the first command in the quote. Then wpa.conf is referred to in the last command wpa_supplicant -B -Wnl80211 -i wlan0 -c wpa.conf in the quote. Is it necessary to run iwconfig wlan0 essid your_network_name or sudo iwconfig wlan0 essid NETWORK ap 00:60:1D:01:23:45? – Tim Apr 25 '15 at 3:45
  • 2. Is wtext my wifi adapter's driver or something else? Is it at a lower or higher level than iwlwifi? – Tim Apr 25 '15 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.