# Infrastructure Node This directory contains the software for bridge nodes that connect the Meshtastic mesh to the internet. ## Components ### `bridge-daemon/` The **KosmoConnect Bridge Daemon** is a Python service that runs on a Raspberry Pi (or any Linux host) connected to a Meshtastic device via USB. **What it does:** - Receives mesh packets and publishes them to the cloud MQTT broker - Detects environmental data (JSON enviro packets) and routes them to `kosmo/ingest/enviro` - Subscribes to `kosmo/mesh/outbound/#` and injects web messages back into the mesh - Runs as a `systemd` service with auto-restart See [`bridge-daemon/README.md`](./bridge-daemon/README.md) for setup and RPi installation instructions. ### `firmware/` Placeholder for any custom firmware required specifically for the bridge radio (usually not needed; standard Meshtastic firmware works). ## Recommended Bridge Hardware | Device | Notes | |--------|-------| | **LILYGO T-Beam 868/915MHz** | Great for Pi USB bridge; ESP32 + GPS + LoRa | | **RAK4631** | Low power, nRF52840 based | | **LILYGO T-Deck** | Can work if put into USB-serial mode; better used as a handheld mesh client | ## Quick Test If you have a T-Beam or T-Deck connected to your computer: ```bash cd bridge-daemon python3 -m venv venv source venv/bin/activate pip install -r requirements.txt export MESHTASTIC_DEVICE=/dev/ttyUSB0 # adjust for your OS export MQTT_HOST=localhost python3 -m src.main ``` Send a text from any mesh node and watch it appear on `kosmo/mesh/inbound` in your MQTT broker.