To get a local copy up and running follow these steps.
You must download Android Studio at https://developer.android.com/studio
Import /AndroidApp into Android Studio and build the APK.
- Install Raspberry Pi OS onto a Raspberry Pi 4
apt update && apt upgrade
- Install the lastest version of Python
sudo apt install hostapd dnsmasq
sudo DEBIAN_FRONTEND=noninteractive apt install -y netfilter-persistent iptables-persistent
sudo systemctl unmask hostapd && sudo systemctl enable hostapd
sudo nano /etc/dhcpcd.conf
and add the following to the bottom of the page
interface wlan0
static ip_address=192.168.3.1/24
nohook wpa_supplicant
sudo nano /etc/sysctl.d/routed-ap.conf
and put the following into the confnet.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo netfilter-persistent save
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
thensudo nano /etc/dnsmasq.conf
and add the following
interface=wlan0
dhcp-range=192.168.3.2,192.168.3.20,255.255.255.0,24h
domain=wlan
address=/gw.wlan/192.168.3.1
sudo rfkill unblock wlan
sudo nano /etc/hostapd/hostapd.conf
- Enter information for Wi-Fi broadcast SSID
country_code=CA
interface=wlan0
ssid=HTN_Dev
hw_mode=g
channel=7
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=HacktheNorth2020
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
- Install the required dependencies for the program in Python
pip3 install flask
pip3 install numpy
pip3 install opencv-python
pip3 install imutils
cd into the directory where you have PiStream stored, and run the command below to start stream.
python3 stream.py -i 0.0.0.0 -o 8000
This project was created by Patrick Huynh, Justin Tran, Alejandro Gomez, and Ananya Rao for the Hack the North 2020++ Hackathon.
https://www.raspberrypi.org/documentation/configuration/wireless/access-point-routed.md