Entrain Network: Complete Software Stack — Firmware, Relay OS, Companion App
ENTRAIN NETWORK — COMPLETE SOFTWARE STACK
FIRMWARE: EntrainOS Node (ESP32-S3, FreeRTOS)
Language: C/C++ (ESP-IDF framework) RTOS: FreeRTOS (bundled with ESP-IDF) Build: CMake + ESP-IDF toolchain OTA updates: via WiFi (signed firmware images)
Libraries:
- esp-dsp: FFT, filtering, signal processing
- esp-ble-mesh: BLE mesh networking
- esp-wifi: WiFi connectivity
- CMSIS-DSP (ported): Hilbert transform, phase
- Custom: Kuramoto solver, ADS1299 driver
Boot sequence:
- Hardware init (SPI, I2S, GPIO, BLE, WiFi)
- ADS1299 calibration (2 seconds)
- Scan for BLE mesh networks
- Join or create mesh (auto-provision)
- Begin EEG acquisition + phase broadcast
- Wait for user to start session via app
Total firmware size: ~1.2 MB Boot time: ~3 seconds Flash usage: 1.2 MB of 8 MB available
RELAY: EntrainRelay (Alpine Linux + Rust)
A lightweight server daemon that bridges local meshes to the global network.
Language: Rust (for safety and performance) Networking: rust-libp2p Transport: QUIC (UDP, low latency) Discovery: Kademlia DHT Pub/Sub: GossipSub API: WebSocket for local nodes + REST for dashboard Storage: None persistent (ephemeral by design)
install: curl -sSL entrain.network/install | sh
(auto-configures firewall, UPnP, relay)
(systemd service for auto-start)
Resource usage on Raspberry Pi 4:
RAM: ~30 MB
Power: no additional (Pi already running)
COMPANION APP: Entrain (iOS/Android/Web)
Framework: React Native (cross-platform) BLE library: react-native-ble-plx State: Redux for real-time data
SCREEN 1: DASHBOARD
- Your brainwave state (live FFT visualization)
- Your coherence with the group (0-100%)
- Network map (nodes you can see)
- Global coherence meter
SCREEN 2: SESSION
- Start/stop entrainment session
- Coupling slider: 0% (solo) to 100% (full sync)
- Target frequency selector:
◦ Theta (6Hz) — deep meditation
◦ Alpha (10Hz) — calm focus
◦ Group Mean — sync with the room
◦ Custom — enter any frequency 1-40Hz
- Session timer with gentle ramp-up/down
- Emergency stop button (instant off)
SCREEN 3: NETWORK
- Nearby nodes (BLE range)
- Regional hub status
- Global network statistics
- Join/create sessions
- Invite friends (QR code / link)
SCREEN 4: HISTORY
- Session logs (duration, avg coherence)
- Personal brainwave trends over time
- Sync achievements (first 10-person, etc.)
- All data stored LOCAL ONLY on device
SCREEN 5: SETTINGS
- Stimulation intensity limits
- Privacy preferences
- Node ID rotation frequency
- Relay server configuration
- Firmware update management
- Export personal data (CSV/JSON)
- Delete all data (GDPR compliance)
OPEN SOURCE STRATEGY
ALL software is open-source (MIT License):
- Firmware: github.com/entrain-network/node-os
- Relay: github.com/entrain-network/relay
- App: github.com/entrain-network/app
- Protocol spec: github.com/entrain-network/protocol
- Hardware design: github.com/entrain-network/hardware
Why open-source:
- Trust: anyone can verify no data exfiltration
- Safety: community audits stimulation limits
- Decentralization: no company can control it
- Innovation: anyone can improve the protocol
- The ancients didn't patent the pyramids. This technology belongs to humanity.
Related claims
No claims cite this entry yet.
More in Engineering
Entrain Network: Scientific Foundation and Real-World Use Cases
Every component of this system is backed by published, peer-reviewed research. 1. EEG can measure brainwave phase in real-time → Proven:...
Entrain Network: Three-Tier Decentralized Architecture — Local, Regional, Global
The network scales from a pair of headbands in a room to millions of nodes worldwide, using three nested communication tiers. No tier...
The Kuramoto Protocol: Mathematical Foundation for Collective Brain Synchronization
The mathematical heart of the Entrain Network is the Kuramoto model — a proven framework for describing how coupled oscillators...
EntrainOS: Custom Real-Time Operating System for the Mesh Network
A real-time operating system purpose-built for collective brainwave synchronization across a decentralized mesh. LAYER 1: NODE OS (runs on...