Using Raspberry Pi as Access Point
Last updated on September 15th, 2020
One of my friends asked me in last weeks to provide a simple how-to guide to transform a Raspberry Pi in an Access Point able to add WiFi connectivity to old routers. There are several ways to accomplish this need, but for this task I remembered that DietPi has a very user friendly procedure, So I decided to write it down to make procedure available to peppe8o.com readers.
The idea is to realize what sintetized in the following picture:
Our router will take internet connectivity from its connection, giving it to all ethernet clients. The Raspberry Pi, on the other side, will share this connectivity in its WiFi Lan created in the following procedure. So, the router will be connected with its WAN port to internet, while Raspberry Pi will be connected to one of router Ethernet ports.
What We Need
As usual, I suggest adding from now to your favourite e-commerce shopping cart all the needed hardware, so that at the end you will be able to evaluate overall costs and decide if continue with the project or remove them from the shopping cart. So, hardware will be only:
- Raspberry PI (including proper power supply or using a smartphone micro usb charger with at least 3A)
- micro SD card (at least 16 GB, at least class 10)
- USB/wireless keyboard
Check hardware prices with following links:
We’ll use my previous article, already containing all the steps to install the OS (how to install DietPi). Please note that in this case you will skip step 2 (Wifi settings), because in this case our Raspberry PI is going to become an ethernet client.
Access Point Software Setup
Once the OS installation is finished, we can go on in WiFi software setup. Enter the following command:
go to “Search” (as in the following picture) and press Enter
type “WiFi” in the Search box and press enter:
press Space Bar to enable software selection and press enter:
the following screen will confirm the requirements meet. Press enter again
the screen will go back to dietpi-software. Go down to “Install” and press enter:
next screen will ask you for an installation confirm. Go to “Ok” and press enter:
a reboot will be required after installation. On the next screen guess what… press enter!
At this point, we need to fine tune the configuration. Connect via SSH to you Raspberry PI and launch the following command:
Select “Network Options: Adapters” and press enter:
Go to WiFi and press enter:
edit the Country Code according to your Region
press enter to confirm the need to reboot
Exit from dietpi-config. At this point, there is a known issue (referred here): hostapd seems to be not working properly, so we need to reinstall it:
apt install --reinstall hostapd
Reboot the system. Now you should see in you available WiFi a new connection wit SSID “DietPi-HotSpot”. Use this with password “dietpihotspot”. You should now be able to navigate in internet and use your Raspberry PI as Access Point.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?
7 thoughts on “Using Raspberry Pi as Access Point”
This sets an AP full mode, or an AP in bridge mode? I ask since i didn’t see you dealing with DHCP servers, DNSMasq, and all the other details that usually are delt with a full AP installation in Linux.
Hi Dan. Honestly I don’t remember if DietPi Wifi Hotspot creates a new DHCP range valid inside the its new Wireless network. If so, it automatically installs all needed networking tools. I’m going to check next week because this one I’m in holidays far from home 🙂
Hi Dan. It is AP full mode: DietPi does all the DHCP and IP routing automatically during installation (see here https://github.com/MichaIng/DietPi/blob/70586d247d3c27b3852dbcbe52b11c2e69b22619/dietpi/dietpi-software#L9671-L9759). Thank you
Hi, thanks for the tutorial! I have to ask, does this make a private network broadcast from the Pi or is it like a bridged/extended AP? For instance would it make a secure AP in a public Wifi like OpenWRT?
DietPI creates a new network for your devices and routes it from its WAN addess (your router wired interface) adding NAT service. You can add services to make your PI network secure and expand your services by simply installing them.
Hi, is there a way to check if my wifi usb dongle is connected and working because I followed all instructions but I cant see the new network !!! Thanks a lot!
USB dongle issues are strictly connected to devices and their manufacturers… however, you can try with this Raspberry PI USB dongle troubleshooting guide:
Hope this can help