WIP: Revert to public addresses pending further debug

This commit is contained in:
Joe Finney 2015-12-18 12:27:08 +00:00
parent c7ea0af6fe
commit 203246b975
2 changed files with 3 additions and 1 deletions

View file

@ -141,7 +141,7 @@
// Enable/Disable the use of private resolvable addresses.
// Set '1' to enable.
#ifndef MICROBIT_BLE_PRIVATE_ADDRESSES
#define MICROBIT_BLE_PRIVATE_ADDRESSES 1
#define MICROBIT_BLE_PRIVATE_ADDRESSES 0
#endif
// Enable/Disable BLE Service: MicroBitDFU

View file

@ -233,8 +233,10 @@ void MicroBitBLEManager::pairingMode(MicroBitDisplay &display)
// Update the advertised name of this micro:bit to include the device name
ble->clearAdvertisingPayload();
#if CONFIG_ENABLED(MICROBIT_BLE_PRIVATE_ADDRESSES)
// Always configure for public addresses in pairing mode...
ble->setAddress(Gap::ADDR_TYPE_PUBLIC, NULL);
#endif
ble->accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);
ble->accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)BLEName.toCharArray(), BLEName.length());