Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nRF51822
Diff: Source/BLE_Stuff.cpp
- Revision:
- 45:bd6a86de08f9
- Parent:
- 44:48ce47b35564
diff -r 48ce47b35564 -r bd6a86de08f9 Source/BLE_Stuff.cpp
--- a/Source/BLE_Stuff.cpp Mon Jul 06 16:24:06 2020 +0000
+++ b/Source/BLE_Stuff.cpp Mon Jul 27 21:26:07 2020 +0000
@@ -223,13 +223,12 @@
/* setup advertising */
ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED);
ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);
- ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::SHORTENED_LOCAL_NAME,
- (const uint8_t *)dev_name, len);
//ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_128BIT_SERVICE_IDS,
// (const uint8_t *)UARTServiceUUID_reversed, sizeof(UARTServiceUUID_reversed));
ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS,
(const uint8_t *)GenericServiceUUID_reversed, sizeof(GenericServiceUUID_reversed));
-
+ ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::SHORTENED_LOCAL_NAME,
+ (const uint8_t *)dev_name, len);
ble.gap().setAdvertisingInterval(ADV_INTERVAL);
ble.gap().setAdvertisingTimeout(BLE_ADVERTISING_DURATION);
ble.gap().setTxPower(-20); // -30, -20, -16, -12, -8, -4, 0, and 4 dBm