Thesis Blog

Edit file to auto connect pi to wifi

instructions from https://davidmaitland.me/2015/12/raspberry-pi-zero-headless-setup/ 


If you’re not sure how to edit files on Linux, try sudo nano /etc/network/interfaces then Ctrl + x to save when done.

Find this block in the file:

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Then change it to this:

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Now let’s setup the WiFi connection and passkey. Edit the file /etc/wpa_supplicant/wpa_supplicant.conf.

Add this to the end:

network={
  ssid="my network name"
  psk="my network password"
  proto=RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP
  auth_alg=OPEN
}

Check if it is connected to the internet from commandline.

https://raspberrypi.stackexchange.com/questions/41020/how-do-i-use-the-command-line-to-check-which-wifi-network-i-am-connected-to

 

or simpy use:

traceroute 93.93.128.176

or

traceroute www.raspberrypi.org

(this is the address for www.raspberrypi.org)


also here is a link from the raspberry pi website itself:

https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

« »