Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/JAlcocerT/RPi
Browse files Browse the repository at this point in the history
  • Loading branch information
JAlcocerT committed May 14, 2024
2 parents 6eded8a + 993f7e6 commit 791a738
Show file tree
Hide file tree
Showing 8 changed files with 363 additions and 34 deletions.
45 changes: 33 additions & 12 deletions _posts/2021-07-21-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,38 @@ All of the services/projects that we can make the RPi to run, can be easily port

First I would recommend you to install Raspbian to the RPi.

Raspbian is based on Debian, a Linux distribution. But you dont have to be worried about this as I have created to onboard anyone to Linux and particularly to [Debian based distros here](https://jalcocert.github.io/Linux/debian/).
* **Raspbian/Raspberry Pi OS** is based on Debian, a Linux distribution.
* You can also Try [Home Assistant OS](#home-assistant-os), with strong Focus on IoT Home Project, [even Android!](##other-oss)

Under the **RPi Setup** section on this page, I will be including an extra explanation here where some specifics apply to the RPi.
But you dont have to be worried about this as I have created to onboard anyone to Linux and particularly to [Debian based distros here](https://jalcocert.github.io/Linux/docs/debian/).

If you are doing the **RPi Setup**, 99% of that information is applicable to our SBC.

Install Raspbian from any computer with RPi Imager:

```sh
apt update
apt upgrade

sudo snap install rpi-imager
```

> There are [other Single Board Computers](https://fossengineer.com/testing-performance-orange-pi5-versus-raspberry-pi4/) out there that you can use to do similar projects.
![rpi-imager](/img/rpi-imager.png)
_Getting the OS ready at the RPi_

Now plug the SD Card to the RPi and make sure to [enable SSH Access](https://jalcocert.github.io/Linux/docs/linux__cloud/selfhosting/) & open the related port 22.

You can **pre-enable SSH Access** by:

1. Open the boot partition of the SD card. This partition should be automatically accessible from any computer, as it is formatted in a standard FAT32 format.
2. In the root (main) directory of the boot partition, create an empty file named `ssh`. Ensure the file has **no file extension** — it should not be ssh.txt or any other variant.

> There are [other Single Board Computers](https://jalcocert.github.io/RPi/posts/pi-vs-orange/) out there that you can use to do similar projects.
{: .prompt-info }

<!-- How To Use Your Laptop As A Display For Your Raspberry Pi (with OBS + VIDEO CAPTURE KARTA)
https://youtu.be/uO0XtSckHOM -->

### Other OS's

### Android in a Raspberry Pi?
Expand All @@ -50,9 +69,14 @@ Yes, it is possible to run Android in our SBC.
#### Lineage OS

* Visit: <https://konstakang.com/devices/rpi4/>
* Download the latest version: <https://konstakang.com/devices/rpi4/LineageOS20/>
* Create a bootable SD card with the image and boot it
* Download the **MindTheGapps** file that matches your Lineage version and reboot into recovery mode, then load that file and **Google Play Store** will be ready to use.
* Download the latest version: <https://konstakang.com/devices/rpi4/LineageOS20/>
* Create a bootable SD card with the image and boot it
* Download the **MindTheGapps** file that matches your Lineage version and reboot into recovery mode, then load that file and **Google Play Store** will be ready to use.

### Light OS for Raspberry Pi

* Raspberry Pi OS Lite
* DietPi

### Home Assistant OS

Expand Down Expand Up @@ -94,23 +118,20 @@ You can also use it with the Cloud:
* AWS IoT: <https://www.youtube.com/watch?v=hgQ-Ewrm48c>


## Analytical Software for IoT Projects
### Analytical Software for IoT Projects

| Tool | FOSS | Pros | Cons |
|------|------|------|------|
| **Metabase** | Yes | Easy to use for creating dashboards and reports. Strong in data visualization and business intelligence. Supports a wide range of databases | Limited in advanced analytics capabilities. Not as flexible for custom data processing as some other tools |
| **Apache Superset** | Yes | Open-source data visualization and data exploration platform. Supports SQL querying. Customizable and extensible | Requires technical knowledge for setup and customization. May have performance issues with very large datasets |
| **Kibana** | Yes | Part of the Elastic Stack, excellent for visualizing Elasticsearch data. Great for log and time-series analytics. Real-time data visualization | Primarily tailored to Elasticsearch data. Can be complex to configure and optimize. Less versatile for non-Elasticsearch data |
| **KNIME** | Yes | User-friendly, visual data pipeline design. Extensive plugin ecosystem. Good for non-programmers. Strong in data preprocessing and analysis | Can be less intuitive for complex, custom data analysis. Performance issues with very large datasets |
<!-- | **KNIME** | Yes | User-friendly, visual data pipeline design. Extensive plugin ecosystem. Good for non-programmers. Strong in data preprocessing and analysis | Can be less intuitive for complex, custom data analysis. Performance issues with very large datasets |
| **Python Libraries** (e.g., pandas, scikit-learn) | Yes | Highly flexible and powerful. Huge ecosystem and community. Ideal for custom, complex analysis | Requires programming knowledge. Steeper learning curve for non-programmers |
| **R Libraries** (e.g., ggplot2, dplyr) | Yes | Excellent for statistical analysis and data visualization. Large number of packages for various analyses. Strong academic and research community support | Requires programming knowledge. Less intuitive for those unfamiliar with R |
| **R Libraries** (e.g., ggplot2, dplyr) | Yes | Excellent for statistical analysis and data visualization. Large number of packages for various analyses. Strong academic and research community support | Requires programming knowledge. Less intuitive for those unfamiliar with R | -->

* **Others**: Grafana, Redash, Node-Red, JS ([Epoch](https://epochjs.github.io/epoch/real-time/), [Plotly](https://plotly.com/javascript/streaming/), [chartjs](https://nagix.github.io/chartjs-plugin-streaming/1.9.0/))

### Light OS for Raspberry Pi

* Raspberry Pi OS Lite
* DietPi

### How to BackUP a RPi

Expand Down
127 changes: 121 additions & 6 deletions _posts/2021-11-25-rpi-raspap.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,50 @@ tags: [Networking]
render_with_liquid: false
---

Make your RPi work as a router that you can trust on your trips while connecting to unknown networks:
Make your **RPi work as a router** that you can trust on your trips while connecting to unknown networks.

There are 2 modalities:

* RPi + RaspAP as Wifi Repeater
+ [x] A Raspberry Pi (Im using a Pi4 2gb, ARM32) with [Raspberry Pi OS installed](https://jalcocert.github.io/RPi/posts/getting-started/#how-to-get-started-with-a-rpi)
+ [x] Ethernet Cable
+ [ ] We will use Ethernet to connect the RPi to Internet and then server an amplified WIfi signal with the built in Wifi


* RPi + RaspAP as Wifi AP
+ [x] A Raspberry Pi, ofc
+ [ ] A Wifi dongle / usb stick compatible

> And there is also a containerized [(Docker) way to use RaspAP](#raspap-with-docker)
## RaspAP is All You Need

* https://github.com/RaspAP/raspap-webgui

> The [Official docs](https://raspap.com/) are using **RaspOS Lite 32bits**
```sh
sudo apt-get update
sudo apt-get full-upgrade
sudo reboot
cat /etc/os-release #will specify the OS name, example RaspOS `bookworm`
uname -a #kernel check
```

### RaspAP Quick Setup

* https://github.com/RaspAP/raspap-webgui?tab=readme-ov-file#quick-installer

```sh
sudo apt-get update
sudo apt-get full-upgrade
sudo reboot

sudo raspi-config
sudo raspi-config #to select your wifi country: localization options -> WLAN country

curl -sL https://install.raspap.com | bash
```


The built in wlan0, will be generating our hotspot (by default)

Following a reboot, the wireless AP network will be configured as follows:


Expand All @@ -30,4 +61,88 @@ Password: secret
DHCP range: 10.3.141.50 — 10.3.141.255
SSID: raspi-webgui
Password: ChangeMe
```
```

You can check the status of the services with:

```sh
#sudo systemctl status
sudo systemctl status hostapd #allows your Raspberry Pi to act as a wireless access point
sudo systemctl status dnsmasq #provides DNS and DHCP services, including handing out IP addresses to connected clients.

#sudo systemctl status raspap
#sudo systemctl disable raspapd.service

sudo systemctl status lighttpd #web interface running
```

The wireless interface should also be ready:

```sh
ip a
#iwconfig
```

You should be able to **access the Web UI interface** from any local network device at `http://your_rpi_localip`.

![Enable WLan0 RASP-AP](/img/RaspAP-start-wlan0.png){: width="972" height="589" }
_Dont Forget to Enable the WLAN0 to connect to RaspAP_

> Remember, the **default AP WIFI** pass is `ChangeMe`, you can configure it by accessing the UI: `10.3.141.1` when connected to the AP

### RaspAP with Docker

We can also combine [RaspAP with Docker](https://github.com/RaspAP/raspap-webgui?tab=readme-ov-file#docker-support) to make a perfect bundle:

1. Get [Docker and Portainer](https://jalcocert.github.io/Linux/docs/linux__cloud/selfhosting/) UI Ready
2. Run RaspAP as Docker container with: *as per [Official Github](https://github.com/RaspAP/raspap-docker)*

```sh
#sudo systemctl status docker

docker run --name raspap -it -d --privileged --network=host -v /sys/fs/cgroup:/sys/fs/cgroup:ro --cap-add SYS_ADMIN ghcr.io/raspap/raspap-docker:latest
```
> Web GUI should be accessible on `http://localhost` by default
---

## Aknowledgments

* For WIFI AP (WIFI 2 WIFI):
* https://www.youtube.com/watch?v=3PvDqb66Rw4
* https://www.youtube.com/watch?v=jlHWnKVpygw&t=1528s

* For WIFI extender mode:
* https://www.youtube.com/watch?v=nifXL_5MZeM&t=54s
* https://www.youtube.com/watch?v=Z85ma0xTakE
* https://www.youtube.com/watch?v=GdNK2p3RhB0

---

## FAQ

* The Wifi adapter must be **OpenWRT compatible** (?)

* https://github.com/morrownr/USB-WiFi?tab=readme-ov-file
* https://github.com/morrownr/USB-WiFi/blob/main/home/AP_Mode/Bridged_Wireless_Access_Point.md

### WIFI Repeaters for RaspAP

Adapters working out of the box for Linux Kernel [here](https://github.com/morrownr/USB-WiFi)
* TP-LINK Archer T3U Plus
* TPLINK: TL-WN821N
* Edimax EW-7611ULB (Recommended in the docs)


### How to Use a VPN with RaspAP

* OpenVPN
* Wireguard Compatible
* VPN Providers support: Mullvad, NordVPN...


### How to make a RPi Pico W local AP

* https://www.youtube.com/watch?v=cZNoXXIEPbg
* https://shillehtek.com/blogs/news/creating-a-wireless-network-with-raspberry-pi-pico-w-ap-mode-walkthrough-part-1
8 changes: 6 additions & 2 deletions _posts/2022-07-25-selfhosting-with-docker.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
title: Raspberry Pi - Self-Hosting anything with Docker
title: Raspberry Pi & How to Self-Host anything
author: JAlcocerT
date: 2022-07-25 14:10:00 +0800
categories: [RPi Setup]
tags: [Self-Hosting, Docker, RPi 101]
render_with_liquid: false
---

Self-Hosting can be simplified with Docker, thanks to the great work of the community that bundles a lot of Apps/services into docker images and make them available with their code.
So you already have your [RPi and the OS Setup](https://jalcocert.github.io/RPi/posts/getting-started/)

[Self-Hosting can be simplified](https://jalcocert.github.io/Linux/docs/linux__cloud/selfhosting/) with Docker.

Thanks to the great work of the community that **bundles a lot of Apps/services** into docker container images and make them available, together with their code.

## Install Docker

Expand Down
Loading

0 comments on commit 791a738

Please sign in to comment.