mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
Push-to-talk voice messaging using the Codec2 ultra-low-bitrate speech codec, transmitted as V: prefixed packets over the existing MeshCore LoRa mesh pipeline. Voice recording UI (long-press send button or + menu) is gated behind Platform.isIOS || Platform.isMacOS since the `record` package only supports microphone capture on those platforms in this build. Key changes: - VoiceRecorderService: streams 8kHz mono PCM chunks via `record` package - VoicePlayerService: decodes Codec2 bytes to WAV and plays via audioplayers - VoiceCodecService: async Codec2 encode/decode in background isolates - VoiceProvider: reassembles multi-packet sessions, drives playback - VoiceMessageBubble: shows packet progress, play/stop controls - MessagesProvider: detects V: prefix, routes to VoiceProvider - MessagesTab: PTT long-press gesture + recording indicator (iOS/macOS) - Message model: isVoice + voiceId fields for session tracking - Auto-selects codec mode from radio bandwidth (700C/1200/1300 bps) - codec2_flutter + meshcore_client switched from path to git deps
94 lines
2.8 KiB
Markdown
94 lines
2.8 KiB
Markdown
# MeshCore SAR
|
|
|
|
Flutter app for Search and Rescue operations over a [MeshCore](https://github.com/meshcore-dev) mesh radio network via Bluetooth Low Energy.
|
|
|
|
## Features
|
|
|
|
- **Messaging** — send/receive messages to contacts and channels
|
|
- **Contacts** — track team members, repeaters, and rooms with live telemetry
|
|
- **SAR Markers** — drop emoji-coded location pins (person found, fire, staging area) via chat messages
|
|
- **Map** — view team positions and markers on OpenStreetMap / topo / satellite; tiles cached for offline use
|
|
- **Location tracking** — periodic GPS updates broadcast to the mesh
|
|
- **Packet log** — inspect raw BLE frames for debugging
|
|
|
|
## BLE Protocol
|
|
|
|
MeshCore SAR is powered by the `meshcore_client` package:
|
|
**[github.com/dz0ny/meshcore_client](https://github.com/dz0ny/meshcore_client)**
|
|
|
|
The client handles BLE connection management, command queueing, and binary frame parsing/building, and is extracted so you can build custom tools, integrations, and apps on top of MeshCore.
|
|
|
|
## Requirements
|
|
|
|
- Flutter 3.19+ / Dart 3.3+
|
|
- Physical device with Bluetooth (BLE does not work on simulators)
|
|
- iOS 13+ or Android SDK 21+
|
|
|
|
## Build
|
|
|
|
```bash
|
|
flutter pub get
|
|
flutter run # debug
|
|
flutter build apk --release # Android
|
|
flutter build ios --release # iOS
|
|
```
|
|
|
|
## GitHub Actions artifacts
|
|
|
|
Every push runs the `Build And Upload Release Assets` workflow and uploads build artifacts for:
|
|
|
|
- Android (`.apk`)
|
|
- Linux (`.tar.gz`)
|
|
- macOS (`.dmg`)
|
|
- Windows (`.zip`)
|
|
|
|
How to download them:
|
|
|
|
1. Open the repository on GitHub.
|
|
2. Go to **Actions**.
|
|
3. Open a workflow run named `Build And Upload Release Assets`.
|
|
4. In the run summary, scroll to **Artifacts**.
|
|
5. Download the artifact you need (`release-android`, `release-linux`, `release-macos`, `release-windows`).
|
|
|
|
For published releases, the same files are also attached to the GitHub Release page.
|
|
|
|
### iOS signing
|
|
|
|
```bash
|
|
open ios/Runner.xcworkspace
|
|
# Select team in Signing & Capabilities, then run from Xcode
|
|
```
|
|
|
|
### Clean rebuild
|
|
|
|
```bash
|
|
flutter clean && flutter pub get
|
|
cd ios && pod deintegrate && pod install && cd ..
|
|
```
|
|
|
|
## Permissions
|
|
|
|
| Platform | Permissions |
|
|
|----------|-------------|
|
|
| iOS | Bluetooth, Location (when in use) |
|
|
| Android | `BLUETOOTH_SCAN`, `BLUETOOTH_CONNECT`, `ACCESS_FINE_LOCATION`, `INTERNET` |
|
|
|
|
## SAR Marker format
|
|
|
|
```
|
|
S:<emoji>:<lat>,<lon>
|
|
```
|
|
|
|
Examples: `S:🧑:46.0569,14.5058` · `S:🔥:46.057,14.506` · `S:🏕️:46.0571,14.506`
|
|
|
|
## Architecture
|
|
|
|
```
|
|
lib/
|
|
├── models/ — data types (re-exported from meshcore_client)
|
|
├── providers/ — state management (Provider pattern)
|
|
├── screens/ — top-level pages
|
|
├── services/ — location tracking, SSE bridge, tile cache
|
|
└── widgets/ — reusable UI components
|
|
```
|