Node.js daemon for Raspberry Pi nodes in The African Village TVWS mesh network — spectrum, mesh, heartbeat, and Signal Bus
# African Village Node Agent
Node.js daemon for Raspberry Pi 4B nodes in The African Village TVWS mesh network.
**Platform:** theafricanvillage.org
**Kernel repo:**
github.com
**Node 001:** 2317 West Chestnut Street, Russell, Louisville KY
**FCC License:** 0667-EX-CN-2026
---
## What it does
The node agent runs on each physical Raspberry Pi node and handles:
- **TVWS spectrum** — queries the FCC geolocation database for available channels, selects the optimal channel, and configures the radio interface
- **MaNet mesh** — initializes and monitors Batman-adv mesh routing
- **Heartbeat** — reports telemetry to Supabase every 60 seconds
- **Signal Bus** — dispatches node online/offline/fault events to the village kernel
- **Media cache** — syncs broadcast content from Supabase Storage for local playback
---
## Hardware
| Component | Spec |
|-----------|------|
| Compute | Raspberry Pi 4B (4GB RAM) |
| OS | Raspberry Pi OS Lite 64-bit (Debian Bookworm) |
| TVWS radio | Carlson Wireless AG50 (FCC certified) |
| Mesh radio | Ubiquiti UniFi AC Mesh or Alfa AWUS036ACM |
| Mesh protocol | Batman-adv (802.11s) |
See african-village/docs/hardware-bom.md for full bill of materials.
---
## Quick install
On a fresh Raspberry Pi OS Lite installation:
```bash
curl -fsSL
raw.githubusercontent.com | sudo bash
```
Or manually:
```bash
sudo git clone
github.com /opt/village-node
cd /opt/village-node
sudo npm install --production
sudo cp .env.example .env
sudo nano .env # fill in your node configuration
sudo cp systemd/village-node.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now village-node
```
---
## Configuration
Copy `.env.example` to `.env` and set:
| Variable | Required | Description |
|----------|----------|-------------|
| `NODE_ID` | ✓ | Unique node identifier (e.g. `NODE-001`) |
| `NODE_NAME` | …