Manually Configuring WiFi

The file /etc/wpa_supplicant/wpa_supplicant.conf will be created/modified when setting up WiFi (it is referenced from the /etc/network/interfaces file that is no longer to be edited).


sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

You can find details of what it needs to contain here.

An example network to add to the bottom of the file:


#SPECIFY OUR WIFI NETWORK
network={
    ssid="MyWiFiNetworkName"
    scan_ssid=1
    key_mgmt=WPA-PSK
    psk="MySecretPassphrase"
}

After making changes reset the interface – see here.

SSID Unicode Characters

Unicode characters are permitted in a SSID and the wpa_supplicant.conf SSID field requires Unicode characters in its string if there are any used, (it will not convert from \x## to unicode when using the field).

This is a problem, for instance the iPhone will have a SSID of “Adam\xE2\x80\x99s iPhone” for “Adam’s iPhone”.
When performing “sudo iwlist wlan0 scan” you will get \x values returned as it returns using UTF8 format. So you have to convert them somehow.

Hex SSID

SSID can be specified in hex. In wpa_supplicant.conf if the SSID is surrounded by quotes “” then its dealt with as a string, but otherwise it is dealt with as 2 digit hex characters. An example of converting a string is shown here.

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *