Skip to content

Instantly share code, notes, and snippets.

@meigwilym
Created October 1, 2018 08:30
Show Gist options
  • Save meigwilym/35f63b1689d728a9b78523b2595adf58 to your computer and use it in GitHub Desktop.
Save meigwilym/35f63b1689d728a9b78523b2595adf58 to your computer and use it in GitHub Desktop.
Configuring WPA2 Wifi on a Raspberry Pi

I had real trouble connecting my Raspberry Pis (v3 Model Bs) to a WPA Enterprise network.

Here's what I did to get it to work.

For this example, my wifi network name is "WiFi Network", usernames and passwords have also been swapped out. The Wifi Country is GB.

Wifi

Edit /etc/wpa_supplicant/wpa_supplicant.conf with the following (using your "real" password):

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
# must set the correct country
country=GB

network={
    ssid="WiFi Network"
    scan_ssid=1
    key_mgmt=WPA-EAP
    group=CCMP TKIP
    eap=PEAP
    identity="my.wifi.username"
    password="my.wifi.password"
    phase1="peapver=0"
    phase2="MSCHAPV2"
}

Run:

sudo iwconfig wlan0 essid "WiFi Network"

and reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment