Private Network with a Raspberry Pi 0 W 2
In this small article we will briefly create a private network, or Access Point, using a Raspberry Pi 0 W 2 where we can use it in a vast majority of projects.
Having a Raspberry Pi 0 W 2 fully configured and ready to go, open a terminal and execute the following command to clone a script that will automate and setup a Access Point and WiFi Client/Station network on the single WiFi chip of Raspberry Pi:
git clone https://github.com/idev1/rpihotspot.git
Navigate to the script directory with:
Then execute the following to give the script permission to be executable:
sudo chmod +x setup-network.sh
Before proceeding to the execution of the full command that will create the new access point, we need to consider some valid points like:
--ap-ssidwill define the SSID/Network Name of the new Access Point;
--ap-passwordwill define the password for the new Access Point;
--ap-country-codewill be the country code as
--ap-ip-addressis the IP address for the Access Point device where we can use the
10.0.0.1. Be aware that the IP given to any of the access point clients will be represented in the same type of address that we choose.
Now, use the next command, with the necessary changes, to create the Access Point on the Raspberry Pi 0 W 2:
sudo ./setup-network.sh --install --ap-ssid="[ACCESS_POINT_NAME]" --ap-password="[ACCESS_POINT_PASSWORD]" --ap-password-encrypt
--ap-country-code="PT" --ap-ip-address="10.0.0.1" --wifi-interface="wlan0"
After everything completed, reboot the Raspberry Pi safely and then, on a terminal, execute the following command to see the new Access Point information, where in this case, in the
Using a smartphone or computer, check for the new Access Point in the available WIFI Networks.
Hope you liked this small article, best regards, Ricardo Costa (Richards).