Description
Turning your pi into an access point is a useful step. It allows the pi to be used as a bridge between networks and allows your pi to be accessed directly from a client device. This is useful for IoT devices.
This guide assumes that 2 WiFi adapters will be used, one for access point service and one for Internet access. The information presented, with minor modifications, would also apply for an Ethernet Internet connected and for a non-Internet connected access point.
Next up?
After reading this guide, you may be interested in reading:
- Raspberry Tor
- Using the WiFi Access Point with captured portal
- RPi Desktop Mods, Changes to the packages and defaults of the full Raspian
Parts List
- Raspberry Pi 2
- 4GB (or larger) class 10 MicroSD card
- Two USB WiFi dongles (second wifi is optional)
- See the discussion Which Wifi USB adapters
- USB to serial console cable (optional)
- Pi Case
- Mini-USB power
Overview
Start with a Raspberry Pi image. This is an image saved after following the RPi Initial Setup Guide. The image may be either Lite or Full depending on your needs. If you do not have such an image, start with a Raspbian image and follow the aforementioned guide before returning here.
Procedures
Write the image
Write the image to the MicroSD as described in the RPi Initial Setup Guide. Insert the MicroSD into the Pi.
Connect to the Pi
Attach the USB to serial console cable and allow the system to boot. Connect to the pi using a PuTTY terminal to the COM port or from Linux using sudo screen /dev/ttyUSB0 115200
.
It should also be possible to connect to the pi using SSH over the network connection. Your wlan0 connection should be fully functional unless you are not on the same access point.
Connect to your WiFi
This guide assumes that wlan1 is used for the access point and wlan0 is used for the network connection. If your pi is not currently connected on the network, use NetworkManager, nmcli. See the RPi Initial Setup Guide. Check your connection using ifconfig
.
4 Install new packages
5 Setup the DHCP server
6 Set a static IP on wlan1
7 Set the Pi as an Access Point
8 Configure NAT
9 Connect and Test
For the steps 4 through 9 follow the procedures given by Adafruit's guide to Setting up a Raspberry Pi as a WiFi access point. Read my Comments and additional references before following these steps as there are a few minor changes.
Conclusion
Well done, you now have a working wifi access point. From here you could turn it into a hotspot, a Tor router, or an IoT controller.
Remember to save your image file.
Comments and additional references