2022-09-04 21:45:03 -07:00
//
// M Q T T . s w i f t
// M e s h t a s t i c
//
// C o p y r i g h t ( c ) G a r t h V a n d e r H o u w e n 9 / 4 / 2 2 .
//
2024-03-13 05:52:31 -07:00
import CoreLocation
2024-06-07 22:09:20 -05:00
import MeshtasticProtobufs
2024-06-03 02:17:55 -07:00
import OSLog
2024-06-07 22:09:20 -05:00
import SwiftUI
2022-09-04 21:45:03 -07:00
struct MQTTConfig : View {
2025-10-05 17:51:18 -07:00
2022-09-04 21:45:03 -07:00
@ Environment ( \ . managedObjectContext ) var context
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
@ EnvironmentObject var accessoryManager : AccessoryManager
2022-12-09 18:19:00 -08:00
@ Environment ( \ . dismiss ) private var goBack
2022-09-04 21:45:03 -07:00
var node : NodeInfoEntity ?
@ State private var isPresentingSaveConfirm : Bool = false
@ State var hasChanges : Bool = false
@ State var enabled = false
2023-08-06 17:41:46 -07:00
@ State var proxyToClientEnabled = false
2022-09-04 21:45:03 -07:00
@ State var address = " "
2025-09-18 13:19:45 -07:00
@ State var defaultServer = true
@ State var showTls = true
2022-09-04 21:45:03 -07:00
@ State var username = " "
@ State var password = " "
2023-10-03 08:41:44 -07:00
@ State var encryptionEnabled = true
2022-09-04 21:45:03 -07:00
@ State var jsonEnabled = false
2024-08-25 23:02:43 -07:00
@ State var tlsEnabled = false
2023-05-04 21:49:35 -07:00
@ State var root = " msh "
2024-03-13 05:52:31 -07:00
@ State var selectedTopic = " "
2024-01-20 21:25:02 -08:00
@ State var mqttConnected : Bool = false
2024-03-14 18:58:05 -07:00
@ State var defaultTopic = " msh/US "
2024-03-13 05:52:31 -07:00
@ State var nearbyTopics = [ String ] ( )
2024-03-26 13:26:23 -07:00
@ State var mapReportingEnabled = false
2025-04-30 18:02:39 -07:00
@ AppStorage ( " mapReportingOptIn " ) private var mapReportingOptIn : Bool = false
2025-10-05 17:51:18 -07:00
@ State private var mapPublishIntervalSecs : UpdateInterval = UpdateInterval ( from : 3600 )
2024-09-08 11:10:58 -07:00
@ State var mapPositionPrecision : Double = 14.0
2025-10-05 17:51:18 -07:00
2024-03-14 18:58:05 -07:00
let locale = Locale . current
2025-10-05 17:51:18 -07:00
2022-09-04 21:45:03 -07:00
var body : some View {
2023-12-06 12:32:17 -08:00
VStack {
Form {
2024-02-06 09:13:57 -08:00
if node != nil && node ? . loRaConfig != nil {
let rc = RegionCodes ( rawValue : Int ( node ? . loRaConfig ? . regionCode ? ? 0 ) )
2024-05-29 16:40:07 -05:00
if rc ? . dutyCycle ? ? 0 > 0 && rc ? . dutyCycle ? ? 0 < 100 {
2024-02-14 21:43:29 -08:00
Text ( " Your region has a \( rc ? . dutyCycle ? ? 0 ) % duty cycle. MQTT is not advised when you are duty cycle restricted, the extra traffic will quickly overwhelm your LoRa mesh. " )
2024-02-06 09:13:57 -08:00
. font ( . callout )
. foregroundColor ( . red )
}
}
2025-10-05 17:51:18 -07:00
2024-02-17 22:39:22 -07:00
ConfigHeader ( title : " MQTT " , config : \ . mqttConfig , node : node , onAppear : setMqttValues )
2025-10-05 17:51:18 -07:00
2025-04-26 16:05:09 -07:00
Section ( header : Text ( " Options " ) ) {
2025-10-05 17:51:18 -07:00
2023-12-06 12:32:17 -08:00
Toggle ( isOn : $ enabled ) {
2025-04-26 16:05:09 -07:00
Label ( " Enabled " , systemImage : " dot.radiowaves.up.forward " )
2023-12-06 12:32:17 -08:00
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2025-10-05 17:51:18 -07:00
2023-12-06 12:32:17 -08:00
Toggle ( isOn : $ proxyToClientEnabled ) {
2025-10-05 17:51:18 -07:00
2025-05-08 22:50:44 -07:00
Label ( " MQTT Client Proxy " , systemImage : " iphone.radiowaves.left.and.right " )
2024-03-13 05:52:31 -07:00
Text ( " Utilizes the network connection on your phone to connect to MQTT. " )
2023-12-06 12:32:17 -08:00
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2025-10-05 17:51:18 -07:00
2025-02-07 12:27:55 -08:00
if enabled && proxyToClientEnabled && node ? . mqttConfig ? . proxyToClientEnabled ? ? false = = true {
2024-01-20 21:25:02 -08:00
Toggle ( isOn : $ mqttConnected ) {
2025-04-26 16:00:00 -07:00
Label ( " Connect to MQTT via Proxy " , systemImage : " server.rack " )
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if accessoryManager . mqttError . count > 0 {
Text ( accessoryManager . mqttError )
2024-04-05 17:14:04 -07:00
. fixedSize ( horizontal : false , vertical : true )
. foregroundColor ( . red )
}
2025-10-05 17:51:18 -07:00
2024-01-20 21:25:02 -08:00
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
}
2025-10-05 17:51:18 -07:00
2023-12-06 12:32:17 -08:00
Toggle ( isOn : $ encryptionEnabled ) {
Label ( " Encryption Enabled " , systemImage : " lock.icloud " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2025-10-05 17:51:18 -07:00
2025-02-11 11:52:37 -08:00
if ! proxyToClientEnabled {
Toggle ( isOn : $ jsonEnabled ) {
Label ( " JSON Enabled " , systemImage : " ellipsis.curlybraces " )
Text ( " JSON mode is a limited, unencrypted MQTT output for locally integrating with home assistant " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2023-12-06 12:32:17 -08:00
}
2024-03-26 13:26:23 -07:00
}
2025-10-05 17:51:18 -07:00
2024-03-26 13:26:23 -07:00
Section ( header : Text ( " Map Report " ) ) {
Toggle ( isOn : $ mapReportingEnabled ) {
2025-04-26 16:05:09 -07:00
Label ( " Enabled " , systemImage : " map " )
2025-04-23 23:08:41 -07:00
Text ( " Your node will periodically send an unencrypted map report packet to the configured MQTT server, this includes id, short and long name, approximate location, hardware model, role, firmware version, LoRa region, modem preset and primary channel name. " )
. foregroundColor ( . gray )
. font ( . caption )
2023-12-06 12:32:17 -08:00
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-03-26 13:26:23 -07:00
if mapReportingEnabled {
2025-04-23 23:08:41 -07:00
Text ( " Consent to Share Unencrypted Node Data via MQTT " )
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. " )
. foregroundColor ( . gray )
. font ( . caption )
Text ( " Please be advised that because the map report is not encrypted, your data may be stored and displayed permanently by third parties. Meshtastic does not assume responsibility for any such storage, display or disclosure of this data. " )
. foregroundColor ( . gray )
. font ( . caption )
Toggle ( isOn : $ mapReportingOptIn ) {
Label ( " I have read and understand the above. I voluntarily consent to the unencrypted transmission of my node data via MQTT. " , systemImage : " hand.raised " )
. foregroundColor ( . gray )
. font ( . callout )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
}
if mapReportingEnabled && mapReportingOptIn {
2025-10-05 17:51:18 -07:00
UpdateIntervalPicker (
config : . broadcastMedium ,
pickerLabel : " Map Publish Interval " ,
selectedInterval : $ mapPublishIntervalSecs
)
2024-03-26 13:26:23 -07:00
VStack ( alignment : . leading ) {
2024-09-06 17:05:25 -07:00
Label ( " Approximate Location " , systemImage : " location.slash.circle.fill " )
2025-04-23 23:08:41 -07:00
Text ( " To comply with privacy laws like CCPA and GDPR, we avoid sharing exact location data. Instead, we use anonymized or approximate (imprecise) location information to protect your privacy. " )
. foregroundColor ( . gray )
. font ( . callout )
2025-05-21 22:11:03 -07:00
Slider ( value : $ mapPositionPrecision , in : 12. . . 15 , step : 1 ) {
2024-09-06 17:05:25 -07:00
} minimumValueLabel : {
Image ( systemName : " plus " )
2025-05-21 22:11:03 -07:00
} maximumValueLabel : {
Image ( systemName : " minus " )
2024-03-26 13:26:23 -07:00
}
2024-09-06 17:05:25 -07:00
Text ( PositionPrecision ( rawValue : Int ( mapPositionPrecision ) ) ? . description ? ? " " )
. foregroundColor ( . gray )
. font ( . callout )
2024-03-26 13:26:23 -07:00
}
}
}
Section ( header : Text ( " Root Topic " ) ) {
HStack {
Label ( " Root Topic " , systemImage : " tree " )
TextField ( " Root Topic " , text : $ root )
. foregroundColor ( . gray )
2024-10-05 15:50:57 -07:00
. onChange ( of : root ) {
2024-09-22 08:03:18 -07:00
var totalBytes = root . utf8 . count
2024-03-26 13:26:23 -07:00
// O n l y m e s s w i t h t h e v a l u e i f i t i s t o o b i g
2024-09-22 08:03:18 -07:00
while totalBytes > 30 {
2024-04-04 09:39:03 -07:00
root = String ( root . dropLast ( ) )
2024-09-22 08:03:18 -07:00
totalBytes = root . utf8 . count
2024-03-26 13:26:23 -07:00
}
2024-10-05 15:50:57 -07:00
}
2024-03-26 13:26:23 -07:00
. foregroundColor ( . gray )
}
. keyboardType ( . asciiCapable )
. disableAutocorrection ( true )
. listRowSeparator ( . hidden )
Text ( " The root topic to use for MQTT. " )
. foregroundColor ( . gray )
. font ( . callout )
2025-10-05 17:51:18 -07:00
2024-03-26 13:26:23 -07:00
if nearbyTopics . count > 0 {
Picker ( " Nearby Topics " , selection : $ selectedTopic ) {
ForEach ( nearbyTopics , id : \ . self ) { nt in
Text ( nt )
}
}
. pickerStyle ( InlinePickerStyle ( ) )
. listRowSeparator ( . hidden )
Text ( " If the default region topic is too busy you can choose a more local topic. " )
. foregroundColor ( . gray )
. font ( . callout )
}
2022-12-30 11:08:59 -08:00
}
2025-10-05 17:51:18 -07:00
2024-03-13 05:52:31 -07:00
Section ( header : Text ( " Server " ) ) {
2023-12-06 12:32:17 -08:00
HStack {
Label ( " Address " , systemImage : " server.rack " )
TextField ( " Server Address " , text : $ address )
. foregroundColor ( . gray )
. autocapitalization ( . none )
. disableAutocorrection ( true )
2024-10-05 15:50:57 -07:00
. onChange ( of : address ) {
2024-09-22 08:03:18 -07:00
var totalBytes = address . utf8 . count
2023-12-06 12:32:17 -08:00
// O n l y m e s s w i t h t h e v a l u e i f i t i s t o o b i g
2024-09-22 08:03:18 -07:00
while totalBytes > 62 {
2024-04-04 09:39:03 -07:00
address = String ( address . dropLast ( ) )
2024-09-22 08:03:18 -07:00
totalBytes = address . utf8 . count
2022-12-30 11:08:59 -08:00
}
2023-12-06 12:32:17 -08:00
hasChanges = true
2024-10-05 15:50:57 -07:00
}
2023-12-06 12:32:17 -08:00
. keyboardType ( . default )
}
. autocorrectionDisabled ( )
2025-09-18 13:19:45 -07:00
if ! defaultServer {
2025-01-01 11:56:25 -08:00
HStack {
2025-04-26 16:00:00 -07:00
Label ( " Username " , systemImage : " person.text.rectangle " )
TextField ( " Username " , text : $ username )
2025-01-01 11:56:25 -08:00
. foregroundColor ( . gray )
. autocapitalization ( . none )
. disableAutocorrection ( true )
. onChange ( of : username ) {
var totalBytes = username . utf8 . count
// O n l y m e s s w i t h t h e v a l u e i f i t i s t o o b i g
while totalBytes > 62 {
username = String ( username . dropLast ( ) )
totalBytes = username . utf8 . count
}
hasChanges = true
2022-12-30 11:08:59 -08:00
}
2025-01-01 11:56:25 -08:00
. foregroundColor ( . gray )
}
. keyboardType ( . default )
HStack {
2025-04-26 16:00:00 -07:00
Label ( " Password " , systemImage : " wallet.pass " )
TextField ( " Password " , text : $ password )
2025-01-01 11:56:25 -08:00
. foregroundColor ( . gray )
. autocapitalization ( . none )
. disableAutocorrection ( true )
. onChange ( of : password ) {
var totalBytes = password . utf8 . count
// O n l y m e s s w i t h t h e v a l u e i f i t i s t o o b i g
2025-02-25 07:02:10 -08:00
while totalBytes > 30 {
2025-01-01 11:56:25 -08:00
password = String ( password . dropLast ( ) )
totalBytes = password . utf8 . count
}
hasChanges = true
2022-09-04 21:45:03 -07:00
}
2025-01-01 11:56:25 -08:00
. foregroundColor ( . gray )
}
. keyboardType ( . default )
. listRowSeparator ( /* @ S T A R T _ M E N U _ T O K E N @ */ . visible /* @ E N D _ M E N U _ T O K E N @ */ )
2025-09-12 23:03:38 -07:00
}
2025-09-18 13:19:45 -07:00
if showTls {
2025-09-12 23:03:38 -07:00
Toggle ( isOn : $ tlsEnabled ) {
Label ( " TLS Enabled " , systemImage : " checkmark.shield.fill " )
Text ( " Your MQTT Server must support TLS. " )
2025-01-01 11:56:25 -08:00
}
2025-09-12 23:03:38 -07:00
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-03-13 05:52:31 -07:00
}
2023-05-04 21:49:35 -07:00
}
2024-03-26 14:57:00 -07:00
Text ( " For all Mqtt functionality other than the map report you must also set uplink and downlink for each channel you want to bridge over Mqtt. " )
2023-12-06 12:32:17 -08:00
. font ( . callout )
2022-09-04 21:45:03 -07:00
}
2025-09-13 14:13:20 -07:00
. scrollDismissesKeyboard ( . immediately )
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
. disabled ( ! accessoryManager . isConnected || node ? . mqttConfig = = nil )
2025-10-05 17:51:18 -07:00
. safeAreaInset ( edge : . bottom , alignment : . center ) {
HStack ( spacing : 0 ) {
SaveConfigButton ( node : node , hasChanges : $ hasChanges ) {
let connectedNode = getNodeInfo ( id : accessoryManager . activeDeviceNum ? ? - 1 , context : context )
if connectedNode != nil {
var mqtt = ModuleConfig . MQTTConfig ( )
mqtt . enabled = self . enabled
mqtt . proxyToClientEnabled = self . proxyToClientEnabled
mqtt . address = self . address
mqtt . username = self . username
mqtt . password = self . password
mqtt . root = self . root
mqtt . encryptionEnabled = self . encryptionEnabled
mqtt . jsonEnabled = self . jsonEnabled
mqtt . tlsEnabled = self . tlsEnabled
mqtt . mapReportingEnabled = self . mapReportingEnabled
2025-11-02 08:49:33 -08:00
mqtt . mapReportSettings . shouldReportLocation = UserDefaults . mapReportingOptIn
2025-10-05 17:51:18 -07:00
mqtt . mapReportSettings . positionPrecision = UInt32 ( self . mapPositionPrecision )
mqtt . mapReportSettings . publishIntervalSecs = UInt32 ( self . mapPublishIntervalSecs . intValue )
Task {
do {
_ = try await accessoryManager . saveMQTTConfig ( config : mqtt , fromUser : connectedNode ! . user ! , toUser : node ! . user ! )
Task { @ MainActor in
// S h o u l d s h o w a s a v e d s u c c e s s f u l l y a l e r t o n c e I k n o w t h a t t o b e t r u e
// f o r n o w j u s t d i s a b l e t h e b u t t o n a f t e r a s u c c e s s f u l s a v e
hasChanges = false
goBack ( )
}
}
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
}
}
2025-03-14 12:47:31 -04:00
}
}
} . onChange ( of : enabled ) { _ , newEnabled in
if newEnabled != node ? . mqttConfig ? . enabled { hasChanges = true }
}
. onChange ( of : proxyToClientEnabled ) { _ , newProxyToClientEnabled in
if newProxyToClientEnabled {
jsonEnabled = false
tlsEnabled = false
}
if newProxyToClientEnabled != node ? . mqttConfig ? . proxyToClientEnabled { hasChanges = true }
}
. onChange ( of : address ) { _ , newAddress in
2025-04-26 16:00:00 -07:00
if address . lowercased ( ) = = " mqtt.meshtastic.org " {
username = " meshdev "
password = " large4cats "
2025-09-18 13:19:45 -07:00
defaultServer = true
if proxyToClientEnabled {
showTls = false
}
} else {
defaultServer = false
showTls = true
2025-04-26 16:00:00 -07:00
}
2025-03-14 12:47:31 -04:00
if newAddress != node ? . mqttConfig ? . address ? ? " " { hasChanges = true }
}
. onChange ( of : username ) { _ , newUsername in
if newUsername != node ? . mqttConfig ? . username ? ? " " { hasChanges = true }
}
. onChange ( of : password ) { _ , newPassword in
if newPassword != node ? . mqttConfig ? . password ? ? " " { hasChanges = true }
}
. onChange ( of : root ) { _ , newRoot in
if newRoot != node ? . mqttConfig ? . root ? ? " " { hasChanges = true }
}
. onChange ( of : selectedTopic ) { _ , newSelectedTopic in
root = newSelectedTopic
}
. onChange ( of : encryptionEnabled ) { _ , newEncryptionEnabled in
if newEncryptionEnabled != node ? . mqttConfig ? . encryptionEnabled { hasChanges = true }
}
. onChange ( of : jsonEnabled ) { _ , newJsonEnabled in
if newJsonEnabled {
proxyToClientEnabled = false
}
if newJsonEnabled != node ? . mqttConfig ? . jsonEnabled { hasChanges = true }
}
. onChange ( of : tlsEnabled ) { _ , newTlsEnabled in
2025-09-18 13:19:45 -07:00
if defaultServer {
2025-03-14 12:47:31 -04:00
tlsEnabled = false
} else {
if newTlsEnabled != node ? . mqttConfig ? . tlsEnabled { hasChanges = true }
}
}
. onChange ( of : mqttConnected ) { _ , newMqttConnected in
if newMqttConnected = = false {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if accessoryManager . mqttProxyConnected {
accessoryManager . mqttManager . disconnect ( )
2025-03-14 12:47:31 -04:00
}
} else {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if ! accessoryManager . mqttProxyConnected && node != nil {
accessoryManager . mqttManager . connectFromConfigSettings ( node : node ! )
2025-03-14 12:47:31 -04:00
}
2022-09-04 21:45:03 -07:00
}
}
2025-03-14 12:47:31 -04:00
. onChange ( of : mapReportingEnabled ) { _ , newMapReportingEnabled in
if newMapReportingEnabled != node ? . mqttConfig ? . mapReportingEnabled { hasChanges = true }
}
2025-10-05 17:51:18 -07:00
. onChange ( of : mapPublishIntervalSecs . intValue ) { _ , newMapPublishIntervalSecs in
2025-03-14 12:47:31 -04:00
if newMapPublishIntervalSecs != node ? . mqttConfig ? . mapPublishIntervalSecs ? ? - 1 { hasChanges = true }
}
2022-09-04 21:45:03 -07:00
}
2025-05-08 22:50:44 -07:00
. navigationTitle ( " MQTT Config " )
2024-08-11 09:07:22 -07:00
. navigationBarItems (
trailing : ZStack {
ConnectedDevice (
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
deviceConnected : accessoryManager . isConnected ,
name : accessoryManager . activeConnection ? . device . shortName ? ? " ? "
2024-08-11 09:07:22 -07:00
)
}
)
2024-09-05 19:31:29 -07:00
. onFirstAppear {
// N e e d t o r e q u e s t a M q t t M o d u l e C o n f i g f r o m t h e r e m o t e n o d e b e f o r e a l l o w i n g c h a n g e s
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if let deviceNum = accessoryManager . activeDeviceNum , let node {
let connectedNode = getNodeInfo ( id : deviceNum , context : context )
2024-09-05 19:31:29 -07:00
if let connectedNode {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if node . num != deviceNum {
if UserDefaults . enableAdministration && node . num != deviceNum {
2024-09-05 19:31:29 -07:00
// / 2 . 5 A d m i n i s t r a t i o n w i t h s e s s i o n p a s s k e y
let expiration = node . sessionExpiration ? ? Date ( )
if expiration < Date ( ) || node . mqttConfig = = nil {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
Task {
do {
Logger . mesh . info ( " ⚙️ Empty or expired mqtt module config requesting via PKI admin " )
try await accessoryManager . requestMqttModuleConfig ( fromUser : connectedNode . user ! , toUser : node . user ! )
} catch {
Logger . mesh . error ( " 🚨 Mqtt module config request failed " )
}
}
2024-09-05 19:31:29 -07:00
}
} else {
// / L e g a c y A d m i n i s t r a t i o n
2025-05-13 06:19:27 -07:00
Logger . mesh . info ( " ☠️ Using insecure legacy admin that is no longer supported, please upgrade your firmware. " )
2024-09-05 19:31:29 -07:00
}
}
2024-03-26 13:26:23 -07:00
}
}
}
2022-09-04 21:45:03 -07:00
}
2025-10-05 17:51:18 -07:00
2023-03-19 18:37:23 -07:00
func setMqttValues ( ) {
2025-10-05 17:51:18 -07:00
2024-10-05 10:44:46 -07:00
nearbyTopics = [ ]
let geocoder = CLGeocoder ( )
if LocationsHandler . shared . locationsArray . count > 0 {
2024-12-13 06:40:19 -08:00
let region = RegionCodes ( rawValue : Int ( node ? . loRaConfig ? . regionCode ? ? 0 ) )
defaultTopic = " msh/ " + ( region ? . topic ? ? " UNSET " )
2024-10-05 10:44:46 -07:00
geocoder . reverseGeocodeLocation ( LocationsHandler . shared . locationsArray . first ! , completionHandler : { ( placemarks , error ) in
if let error {
2025-03-31 22:06:00 -07:00
Logger . services . error ( " Failed to reverse geocode location: \( error . localizedDescription , privacy : . public ) " )
2024-10-05 10:44:46 -07:00
return
}
2025-10-05 17:51:18 -07:00
2024-10-05 10:44:46 -07:00
if let placemarks = placemarks , let placemark = placemarks . first {
2024-12-13 06:40:19 -08:00
// / C o u n t r y T o p i c u n l e s s y o u r r e g i o n i s a c o u n t r y
if ! ( region ? . isCountry ? ? false ) {
2024-10-05 10:44:46 -07:00
let countryTopic = defaultTopic + " / " + ( placemark . isoCountryCode ? ? " " )
if ! countryTopic . isEmpty {
nearbyTopics . append ( countryTopic )
2024-03-13 05:52:31 -07:00
}
}
2024-10-05 10:44:46 -07:00
let stateTopic = defaultTopic + " / " + ( placemark . administrativeArea ? ? " " )
if ! stateTopic . isEmpty {
nearbyTopics . append ( stateTopic )
}
let countyTopic = defaultTopic + " / " + ( placemark . administrativeArea ? ? " " ) + " / " + ( placemark . subAdministrativeArea ? . lowercased ( ) . replacingOccurrences ( of : " " , with : " " ) ? ? " " )
if ! countyTopic . isEmpty {
nearbyTopics . append ( countyTopic )
}
let cityTopic = defaultTopic + " / " + ( placemark . administrativeArea ? ? " " ) + " / " + ( placemark . locality ? . lowercased ( ) . replacingOccurrences ( of : " " , with : " " ) ? ? " " )
if ! cityTopic . isEmpty {
nearbyTopics . append ( cityTopic )
}
let neightborhoodTopic = defaultTopic + " / " + ( placemark . administrativeArea ? ? " " ) + " / " + ( placemark . subLocality ? . lowercased ( )
. replacingOccurrences ( of : " " , with : " " )
. replacingOccurrences ( of : " ' " , with : " " ) ? ? " " )
if ! neightborhoodTopic . isEmpty {
nearbyTopics . append ( neightborhoodTopic )
}
} else {
Logger . services . debug ( " No Location " )
}
} )
2024-03-13 05:52:31 -07:00
}
2025-10-05 17:51:18 -07:00
2024-03-26 13:26:23 -07:00
self . enabled = node ? . mqttConfig ? . enabled ? ? false
self . proxyToClientEnabled = node ? . mqttConfig ? . proxyToClientEnabled ? ? false
2023-03-19 18:37:23 -07:00
self . address = node ? . mqttConfig ? . address ? ? " "
2025-09-18 13:19:45 -07:00
if address . lowercased ( ) . contains ( " mqtt.meshtastic.org " ) {
defaultServer = true
} else {
defaultServer = false
}
2023-03-19 18:37:23 -07:00
self . username = node ? . mqttConfig ? . username ? ? " "
self . password = node ? . mqttConfig ? . password ? ? " "
2023-05-04 21:49:35 -07:00
self . root = node ? . mqttConfig ? . root ? ? " msh "
2024-03-26 13:26:23 -07:00
self . encryptionEnabled = node ? . mqttConfig ? . encryptionEnabled ? ? false
self . jsonEnabled = node ? . mqttConfig ? . jsonEnabled ? ? false
self . tlsEnabled = node ? . mqttConfig ? . tlsEnabled ? ? false
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
self . mqttConnected = accessoryManager . mqttProxyConnected
2024-03-26 13:26:23 -07:00
self . mapReportingEnabled = node ? . mqttConfig ? . mapReportingEnabled ? ? false
2025-05-22 08:19:19 -07:00
if node ? . mqttConfig ? . mapPublishIntervalSecs ? ? 0 < 3600 {
2025-10-05 17:51:18 -07:00
self . mapPublishIntervalSecs = UpdateInterval ( from : 3600 )
2025-05-22 08:19:19 -07:00
} else {
2025-10-05 17:51:18 -07:00
self . mapPublishIntervalSecs = UpdateInterval ( from : Int ( node ? . mqttConfig ? . mapPublishIntervalSecs ? ? 3600 ) )
2025-05-22 08:19:19 -07:00
}
2024-09-06 17:05:25 -07:00
self . mapPositionPrecision = Double ( node ? . mqttConfig ? . mapPositionPrecision ? ? 14 )
2025-05-22 08:19:19 -07:00
self . mapReportingOptIn = UserDefaults . mapReportingOptIn
2024-09-06 17:05:25 -07:00
if mapPositionPrecision < 11 || mapPositionPrecision > 14 {
self . mapPositionPrecision = 14
self . hasChanges = true
} else {
self . hasChanges = false
2024-03-26 13:26:23 -07:00
}
2023-03-19 18:37:23 -07:00
}
2022-09-04 21:45:03 -07:00
}