Clear the existing data before we start advertising
This commit is contained in:
1 parent
e1f28982cf
commit
ca3192b3dc
1 file changed
+6
-1
@@ -225,6 +225,11 @@ void NRF52Bluetooth::setup()
|
||||
Bluefruit.autoConnLed(false);
|
||||
Bluefruit.begin();
|
||||
|
||||
// Clear existing data.
|
||||
Bluefruit.Advertising.stop();
|
||||
Bluefruit.Advertising.clearData();
|
||||
Bluefruit.ScanResponse.clearData();
|
||||
|
||||
// Set the advertised device name (keep it short!)
|
||||
Bluefruit.setName(getDeviceName());
|
||||
|
||||
@@ -276,4 +281,4 @@ void NRF52Bluetooth::clearBonds()
|
||||
|
||||
Bluefruit.Periph.clearBonds();
|
||||
Bluefruit.Central.clearBonds();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user