Hardware Setup¶
Raspberry Pi Wi-Fi Scanning¶
To enable Wi-Fi scanning and correlation with mesh activity on a Raspberry Pi:
Ensure you have a compatible Wi-Fi chip (e.g., built-in or USB dongle).
Install required tools:
sudo apt-get update sudo apt-get install wireless-tools
Enable the Wi-Fi interface (usually wlan0):
sudo ifconfig wlan0 up
Run mesh Wi-Fi scan in Python:
from gatenet.mesh import MeshRadio mesh = MeshRadio() networks = mesh.scan_wifi(interface="wlan0") print(networks)
For non-root users, you may need to add permissions for iwlist or run with sudo.
GPS Module Integration¶
To log GPS location with MeshRadio:
Connect a USB or serial GPS module (e.g., u-blox, Adafruit Ultimate GPS).
Install gpsd and Python bindings:
sudo apt-get install gpsd gpsd-clients python3-gps
Start the GPS daemon:
sudo systemctl start gpsd
Read GPS data in Python:
import gps session = gps.gps(mode=gps.WATCH_ENABLE) report = next(session) lat, lon = report.lat, report.lon mesh.log_gps(lat, lon)
SDR Radio Integration¶
To scan frequencies and map RF activity:
Connect an SDR device (e.g., RTL-SDR USB dongle).
Install SDR tools:
sudo apt-get install rtl-sdr pip install pyrtlsdr
Scan frequencies in Python:
from rtlsdr import RtlSdr sdr = RtlSdr() sdr.center_freq = 100e6 sdr.sample_rate = 2.048e6 sdr.gain = 'auto' samples = sdr.read_samples(256*1024) # Analyze samples for activity, then mesh.log_rf_signal(signal_strength)
See each subpage for more details and troubleshooting.