Hotspot Install Anleitung: Difference between revisions
(Created page with "= Setup a wifi hotspot with a Raspberry Pi = What you need: * Raspberry Pi 4 * USB-C Power Cord * SD-Card * A Computer with an SD Card reader == Step 1: Clone SD Card == * Insert SD Card into computer * Download image from: https://seafile.rlp.net/f/972ddd1625904263aef7/ ** Unzip the file (should be around 7.68 GB when unzipped) * Download https://etcher.balena.io/ or https://www.tweaking4all.com/software/macosx-software/applepi-baker-v2/ ** clone the image to the SD...") |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 20: | Line 20: | ||
* You should see a red turn on constantly and green led blink | * You should see a red turn on constantly and green led blink | ||
* After around 30 secs. you should see a wifi coming up called garden1 | * After around 30 secs. you should see a wifi coming up called garden1 | ||
* when connected to the wifi you should see this window pop up | |||
[[File:Screenshot 2023-12-11 at 12.49.22.png|thumb]] | |||
== Step 3: Connect to PI through SSH == | |||
(this only works as long as you are on the Garden1 wifi) | |||
* Now things will become a bit more tricky, because we need to use the command line (here is a free tutorial on the basics: https://www.codecademy.com/learn/learn-the-command-line) | |||
* Open the terminal on your computer and type | |||
** <code>ssh garden@garden.local</code> | |||
** When asked for the PW type: <code>master2023</code> | |||
== Step 4: Make changes to the website == | |||
I used this setup, so there is a lot more to read on here: https://github.com/Splines/raspi-captive-portal | |||
* when on the Pi you can make changes to the website by | |||
** <code>cd raspi-captive-portal/</code> | |||
** <code>cd server/public/</code> | |||
** <code>sudo nano index.html</code> | |||
== How to transfer files from computer to Pi? == | |||
* First exit the pi via the terminal to get back to your computer. Do this with the following line: <br> | |||
* <code>exit</code> and press Enter | |||
* Now you should be back at your computer. After that, use the following line to upload a HTML to the pi. Make sure that your computer is still connected to the pi's wifi. | |||
* <code>scp /path/to/your/index.html garden@garden.local:~/raspi-captive-portal/server/public</code> | |||
== How to change the WiFi name == | |||
* Make sure that you are connected to the pi's wifi | |||
* Open the terminal and connect to the pi via the following line | |||
* <code>ssh garden@garden.net</code> | |||
* Accept by pressing <code>Y</code> and Enter | |||
* Enter the password <code>master2023</code> | |||
* Edit the access point configuration file via the following line | |||
* <code>sudo nano /etc/hostapd/hostapd.conf</code> | |||
* Search for the line <code>ssid=wifiName</code>, change the name to your desired name and remember it (e.g. <code>ssid=newWifiName</code>) | |||
* Press control+X, enter <code>Y</code> for "Yes" and press Enter to save your changes and to exit the editor | |||
* Now open the dhcpcd configuration file via the following line | |||
* <code>sudo nano /etc/dhcpcd.conf</code> | |||
* Search for the line <code>denyinterfaces xyz</code> or add this line below the existing lines | |||
* Make sure to replace <code>xyz</code> with your chosen name (e.g. <code>denyinterfaces newWifiName</code>) | |||
* Press control+X, enter <code>Y</code> for "Yes" and press Enter to save your changes and to exit the editor | |||
* Restart the pi with the following line | |||
* <code>sudo reboot</code> | |||
* Reconnect to your pi's wifi. The name should be the new one now (e.g. newWiFiName) |
Latest revision as of 09:16, 17 April 2024
Setup a wifi hotspot with a Raspberry Pi
What you need:
- Raspberry Pi 4
- USB-C Power Cord
- SD-Card
- A Computer with an SD Card reader
Step 1: Clone SD Card
- Insert SD Card into computer
- Download image from: https://seafile.rlp.net/f/972ddd1625904263aef7/
- Unzip the file (should be around 7.68 GB when unzipped)
- Download https://etcher.balena.io/ or https://www.tweaking4all.com/software/macosx-software/applepi-baker-v2/
- clone the image to the SD card
Step 2: Turn on PI
- Insert the cloned SD Card into the raspberry Pi and plug the power after that
- You should see a red turn on constantly and green led blink
- After around 30 secs. you should see a wifi coming up called garden1
- when connected to the wifi you should see this window pop up
Step 3: Connect to PI through SSH
(this only works as long as you are on the Garden1 wifi)
- Now things will become a bit more tricky, because we need to use the command line (here is a free tutorial on the basics: https://www.codecademy.com/learn/learn-the-command-line)
- Open the terminal on your computer and type
ssh garden@garden.local
- When asked for the PW type:
master2023
Step 4: Make changes to the website
I used this setup, so there is a lot more to read on here: https://github.com/Splines/raspi-captive-portal
- when on the Pi you can make changes to the website by
cd raspi-captive-portal/
cd server/public/
sudo nano index.html
How to transfer files from computer to Pi?
- First exit the pi via the terminal to get back to your computer. Do this with the following line:
exit
and press Enter- Now you should be back at your computer. After that, use the following line to upload a HTML to the pi. Make sure that your computer is still connected to the pi's wifi.
scp /path/to/your/index.html garden@garden.local:~/raspi-captive-portal/server/public
How to change the WiFi name
- Make sure that you are connected to the pi's wifi
- Open the terminal and connect to the pi via the following line
ssh garden@garden.net
- Accept by pressing
Y
and Enter - Enter the password
master2023
- Edit the access point configuration file via the following line
sudo nano /etc/hostapd/hostapd.conf
- Search for the line
ssid=wifiName
, change the name to your desired name and remember it (e.g.ssid=newWifiName
) - Press control+X, enter
Y
for "Yes" and press Enter to save your changes and to exit the editor - Now open the dhcpcd configuration file via the following line
sudo nano /etc/dhcpcd.conf
- Search for the line
denyinterfaces xyz
or add this line below the existing lines - Make sure to replace
xyz
with your chosen name (e.g.denyinterfaces newWifiName
) - Press control+X, enter
Y
for "Yes" and press Enter to save your changes and to exit the editor - Restart the pi with the following line
sudo reboot
- Reconnect to your pi's wifi. The name should be the new one now (e.g. newWiFiName)