Randomize configid

This commit is contained in:
Garth Vander Houwen 2022-04-07 19:26:40 -07:00
parent a2c73418fc
commit 90ba351aeb

View file

@ -318,7 +318,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
if meshLoggingEnabled { MeshLogger.log("✅ BLE did discover TORADIO characteristic for Meshtastic by \(peripheral.name ?? "Unknown")") }
TORADIO_characteristic = characteristic
var toRadio: ToRadio = ToRadio()
toRadio.wantConfigID = 32168
toRadio.wantConfigID = UInt32.random(in: UInt32(UInt8.max)..<UInt32.max)
let binaryData: Data = try! toRadio.serializedData()
peripheral.writeValue(binaryData, for: characteristic, type: .withResponse)