## For instruction on writing tutorials
## http://www.ros.org/wiki/WritingTutorials
####################################
##FILL ME IN
####################################
## for a custom note with links:
## note =
## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links
## note.0=
## descriptive title for the tutorial
## title = Wifi Network Setup
## multi-line description to be displayed in search
## description = Instructions for setting up a wifi link to aid in development.
## the next tutorial description (optional)
## next =
## links to next tutorial (optional)
## next.0.link=[[bluerov/Tutorials/Tether Network Setup|Tether Network Setup]]
## next.1.link=
## what level user is this tutorial for
## level=IntermediateCategory
## keywords =
####################################
<<IncludeCSTemplate(TutorialCSHeaderTemplate)>>

If you are going to use the Pi's Ethernet port for the tether connection to the surface, we recommend adding a miniature wifi dongle and setting up wifi. This will enable easy development and will leave your Ethernet port free for a direct connection to a surface computer (see below.) First, install the {{{wpasupplicant}}} package if you haven't already:

{{{
sudo apt-get update
sudo apt-get install wpasupplicant
}}}

Then write your network connection details to {{{/etc/wpa_supplicant/wpa_supplicant.conf}}}. It should look something like this:

{{{
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="YourWifiNetworkName"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    psk="YourWifiNetworkPassword"
}
}}}

Next, configure your wireless adapter by adding or modifying the settings in {{{/etc/network/interfaces}}}:

{{{
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp
auto wlan0
}}}

Finally, restart your network interface by restarting the computer or the networking daemon and test out your new connection!

{{{
sudo /etc/init.d/networking restart
sudo ifup wlan0
ping -I wlan0 google.com
}}}

For more information, check out [[https://kerneldriver.wordpress.com/2012/10/21/configuring-wpa2-using-wpa_supplicant-on-the-raspberry-pi/|this guide]].

## AUTOGENERATED DO NOT DELETE
## TutorialCategory
## FILL IN THE STACK TUTORIAL CATEGORY HERE