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