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: BLE_API nRF51822
Fork of Puck by
Diff: Puck.h
- Revision:
- 20:29b0143f3af3
- Parent:
- 18:4c95a470d778
- Child:
- 21:00a3567124e3
diff -r e41c83f1430e -r 29b0143f3af3 Puck.h
--- a/Puck.h Sun Mar 01 18:37:05 2015 +0000
+++ b/Puck.h Tue Mar 03 20:51:34 2015 +0000
@@ -205,11 +205,16 @@
ble.init();
LOG_DEBUG("Inited BLEDevice.\n");
setState(DISCONNECTED);
-
+
+ char deviceName[10];
+ sprintf(&deviceName[0], "Puck %04X", minor);
+ deviceName[9] = '\0';
+ ble.setDeviceName((const uint8_t*) deviceName);
+
ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED);
LOG_DEBUG("Accumulate advertising payload: BREDR_NOT_SUPPORTED.\n");
- ble.accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, beaconPayload, sizeof(beaconPayload));
+ //ble.accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, beaconPayload, sizeof(beaconPayload));
LOG_DEBUG("Accumulate advertising payload: beacon data.\n");
ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);
