Skip to content

Instantly share code, notes, and snippets.

@johnantoni
Created January 12, 2014 19:46
Show Gist options
  • Save johnantoni/8389464 to your computer and use it in GitHub Desktop.
Save johnantoni/8389464 to your computer and use it in GitHub Desktop.
raspberry pi setup wifi

edit network interface

sudo nano /etc/network/interfaces

as:

auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

edit wpa supplicant

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

as:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
  ssid="Your SSID Here"
  proto=RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP
  psk="YourPresharedKeyHere"
}

start:

sudo ifup wlan0

stop:

sudo ifdown wlan0
@johnantoni
Copy link
Author

@johnantoni
Copy link
Author

works on latest build of raspbian

@johnantoni
Copy link
Author

for WPA2 + TKIP

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