Merck / Mbed OS SmartCap_OS5

Dependencies:   nRF51822

Revision:
45:bd6a86de08f9
Parent:
44:48ce47b35564
--- 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