Add Local Mesh Discovery — multi-preset RF scanner with AI recommendations#1710
Conversation
…tions Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/503d8848-694e-488c-a5a8-1977e2f47ab7 Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
|
|
1 similar comment
|
|
|
@copilot Update this with the most recent version of the tool |
… implementation Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/2b199b98-71da-46fc-b3ea-d8005cc6f1af Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
Updated |
What changed?
Adds Local Mesh Discovery (Settings → Local Mesh Discovery) — an automated multi-preset RF scanner that cycles through LoRa modem presets to audit the local mesh environment and recommend optimal radio configuration using on-device AI.
Scan Engine (
DiscoveryScanEngine)@MainActor @Observablestate machine with states:idle→shifting→reconnecting→dwell→analysis→complete(pluspausedandrestoring).AdminMessage setConfig.lorato switch the connected radio to each selected presetData Model (3 new SwiftData
@Modeltypes)DiscoverySessionEntity— session-level aggregates: timestamp, presets scanned, total unique nodes, average channel utilization, message/sensor counts, furthest distance, AI summary, user location, completion statusDiscoveryPresetResultEntity— per-preset metrics: node counts (direct/mesh/infrastructure), message/sensor counts, channel utilization, airtime rate, packet success/failure rates, raw LocalStats fields (TX/RX/bad/dupe/relay/relay-canceled/online/total/uptime)DiscoveredNodeEntity— per-node observations: short/long name, neighbor type (direct vs. mesh), position, distance, hop count, SNR/RSSI, message/sensor counts, infrastructure flag, computediconName(social →person.2.fill, sensor →thermometer.medium)Views
DiscoveryScanViewDiscoveryScanTipexplainerDiscoveryMapViewRadarSweepViewoverlay during active scanRadarSweepViewDiscoverySummaryViewDiscoveryHistoryViewPDF Export (
DiscoverySummaryPDF)UIGraphicsPDFRenderer+MKMapSnapshotterfor map imageFileDocumentconformance for share sheet integrationIntegration Points
SettingsNavigationState.localMeshDiscoverycase,NavigationLinkin Settings viewDiscoveryScanTip(TipKit) explains the feature on first useLanguageModelSession(iOS 26+) generates natural-language preset recommendations; gated with#if canImport(FoundationModels)Why did it change?
There was no existing way to understand mesh activity across different LoRa presets in a given area. Users had to manually switch presets, wait, observe, and compare — a tedious process. This feature automates that workflow and uses on-device AI (FoundationModels, iOS 26+; no internet required) to surface which preset is optimal for a location based on node count, channel utilization, and traffic patterns.
How is this tested?
DiscoveryScanEngineTests(Swift Testing) — initial state,isScanningproperty, default dwell duration, state transitionsDiscoveryModelTests(Swift Testing) — entity relationships, computed properties (icon classification based on message vs. sensor counts)Screenshots/Videos (when applicable)
Checklist