WiFi & Bluetooth signal mapping tool for Raspberry Pi with: - WiFi scanning via iw command - Bluetooth Classic/BLE device discovery - RSSI-based distance estimation - OUI manufacturer lookup - Web dashboard with multiple views: - Radar view (polar plot) - 2D Map (Leaflet/OpenStreetMap) - 3D Map (MapLibre GL JS with building extrusion) - Floor-based device positioning - Live BT tracking mode (auto-starts on page load) - SQLite database for historical device tracking: - RSSI time-series history - Device statistics (avg/min/max) - Movement detection and velocity estimation - Activity patterns (hourly/daily) - New device alerts - Automatic data retention/cleanup - REST API for all functionality Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
53 lines
1.9 KiB
Markdown
53 lines
1.9 KiB
Markdown
# RF Mapper - Claude Context
|
|
|
|
RF Environment Scanner for WiFi and Bluetooth signal mapping on Linux.
|
|
|
|
## Key Documentation
|
|
|
|
- **[USAGE.md](USAGE.md)** - User guide with CLI commands, web interface, configuration, and API reference
|
|
- **[TODO.md](TODO.md)** - Pending features and improvements
|
|
- **[config.yaml](config.yaml)** - Current configuration (GPS, web server, scanner, building settings)
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
src/rf_mapper/
|
|
├── __main__.py # CLI entry point and argument parsing
|
|
├── scanner.py # WiFi/Bluetooth scanning (WifiNetwork, BluetoothDevice dataclasses)
|
|
├── config.py # Configuration management (Config, BuildingConfig, etc.)
|
|
├── distance.py # RSSI to distance estimation
|
|
├── oui.py # MAC address manufacturer lookup
|
|
├── bluetooth_*.py # Bluetooth device identification and classification
|
|
├── visualize.py # ASCII radar and chart generation
|
|
├── profiling.py # CPU/memory profiling utilities
|
|
└── web/
|
|
├── app.py # Flask application and API endpoints
|
|
├── templates/ # Jinja2 HTML templates (base.html, index.html)
|
|
└── static/ # CSS, JS, vendor libraries (Leaflet, MapLibre GL)
|
|
```
|
|
|
|
## Key Files for Common Tasks
|
|
|
|
| Task | Files |
|
|
|------|-------|
|
|
| Add CLI command | `src/rf_mapper/__main__.py` |
|
|
| Add API endpoint | `src/rf_mapper/web/app.py` |
|
|
| Modify data model | `src/rf_mapper/scanner.py`, `config.py` |
|
|
| Change web UI | `web/templates/index.html`, `static/js/app.js`, `static/css/style.css` |
|
|
| Add configuration | `src/rf_mapper/config.py`, `config.yaml` |
|
|
|
|
## Running
|
|
|
|
```bash
|
|
source venv/bin/activate
|
|
rf-mapper web # Web interface at http://localhost:5000
|
|
rf-mapper scan -l room # CLI scan
|
|
rf-mapper --help # All commands
|
|
```
|
|
|
|
## Tech Stack
|
|
|
|
- Python 3.10+, Flask, PyYAML
|
|
- Leaflet.js (2D maps), MapLibre GL JS (3D maps)
|
|
- Linux tools: `iw`, `hcitool`, `bluetoothctl`
|