From 8729dfa656f61c875ebe9e5c25c8bb208c5c3924 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 21 Apr 2025 17:44:21 -0700 Subject: [PATCH] MQTT Map report opt in prototype, add legacy admin channel back to restricted channels. --- Localizable.xcstrings | 15 +++++++++++++++ Meshtastic/Views/Messages/ChannelList.swift | 2 +- .../Views/Settings/Config/Module/MQTTConfig.swift | 9 +++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 43a11bb0..6ca06337 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -2748,6 +2748,12 @@ } } } + }, + "By enabling the map report your node will periodically send a totally unencrypted packet to the configured MQTT server irrigardness of any channel specific uplink and downling MQTT Settings. This report includes short and long name, position, hardware model, role, firmware version, LoRa region, modem preset and primary channel name" : { + + }, + "By enabling this feature, you acknowledge and expressly consent to the transmission of your device’s real-time geographic location over the MQTT protocol without encryption. This location data may be used for purposes such as live map reporting, device tracking, and related telemetry functions." : { + }, "Bytes" : { "extractionState" : "migrated", @@ -5938,6 +5944,9 @@ } } } + }, + "Consent to Share Unencrypted Location Data via MQTT" : { + }, "contacts" : { "extractionState" : "manual", @@ -12265,6 +12274,9 @@ } } } + }, + "I have read and understand the above. I voluntarily consent to the unencrypted transmission of my location data via MQTT for map reporting purposes." : { + }, "IAQ" : { "localizations" : { @@ -22822,6 +22834,9 @@ } } } + }, + "Please be advised that because MQTT transmission is not encrypted by default, your location data may be stored permanently and displayed by third parties. Meshtastic does not assume responsibility for any such unauthorized access or disclosure resulting from unencrypted transmission." : { + }, "Please connect to a radio to configure settings." : { "localizations" : { diff --git a/Meshtastic/Views/Messages/ChannelList.swift b/Meshtastic/Views/Messages/ChannelList.swift index a4fd86bf..426cb0c7 100644 --- a/Meshtastic/Views/Messages/ChannelList.swift +++ b/Meshtastic/Views/Messages/ChannelList.swift @@ -24,7 +24,7 @@ struct ChannelList: View { @State private var isPresentingTraceRouteSentAlert = false - var restrictedChannels = ["gpio", "mqtt", "serial"] + var restrictedChannels = ["gpio", "mqtt", "serial", "admin"] @ViewBuilder private func makeChannelRow( diff --git a/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift b/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift index 29b06464..046d86aa 100644 --- a/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift @@ -30,6 +30,7 @@ struct MQTTConfig: View { @State var mqttConnected: Bool = false @State var defaultTopic = "msh/US" @State var nearbyTopics = [String]() + @State var mapReportingOptIn = false @State var mapReportingEnabled = false @State var mapPublishIntervalSecs = 3600 @State var mapPositionPrecision: Double = 14.0 @@ -92,9 +93,17 @@ struct MQTTConfig: View { } Section(header: Text("Map Report")) { + Text("Consent to Share Unencrypted Location Data via MQTT") + .font(.title2) + Text("By enabling this feature, you acknowledge and expressly consent to the transmission of your device’s real-time geographic location over the MQTT protocol without encryption. This location data may be used for purposes such as live map reporting, device tracking, and related telemetry functions.") + Text("Please be advised that because MQTT transmission is not encrypted by default, your location data may be stored permanently and displayed by third parties. Meshtastic does not assume responsibility for any such unauthorized access or disclosure resulting from unencrypted transmission.") + Toggle(isOn: $mapReportingOptIn) { + Label("I have read and understand the above. I voluntarily consent to the unencrypted transmission of my location data via MQTT for map reporting purposes.", systemImage: "hand.raised") + } Toggle(isOn: $mapReportingEnabled) { Label("enabled", systemImage: "map") + Text("By enabling the map report your node will periodically send a totally unencrypted packet to the configured MQTT server irrigardness of any channel specific uplink and downling MQTT Settings. This report includes short and long name, position, hardware model, role, firmware version, LoRa region, modem preset and primary channel name") } .toggleStyle(SwitchToggleStyle(tint: .accentColor)) if mapReportingEnabled {