Turning the Pi into a Wi-Fi hotspot
Let's say you're out in the field with a couple of fellow agents and you want to quickly put up a network for your computers, maybe even share an Internet connection together; your Pi equipped with a Wi-Fi dongle can easily be made into a makeshift access point. Follow these steps to set up your hotspot:
First install the required software with the following command:
pi@raspberrypi ~ $ sudo apt-get install hostapd bridge-utils
Next we need to prevent Raspbian from interfering with the Wi-Fi interface. Open up
/etc/network/interfaces
for editing:pi@raspberrypi ~ $ sudo nano /etc/network/interfaces
Find the block that starts with allow-hotplug wlan0 and put a
#
character in front of each line, like we've done here:#allow-hotplug wlan0 #iface wlan0 inet manual #wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf #iface default inet dhcp
Optionally, if you would like to share a wired Internet connection with the wireless clients, add the following three lines...