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.
Fork of BLE_API by
Revision 136:723d378149be, committed 2014-11-21
- Comitter:
- rgrover1
- Date:
- Fri Nov 21 09:23:23 2014 +0000
- Parent:
- 135:6cf6e7bd21c9
- Child:
- 137:4b648181ea6b
- Commit message:
- Synchronized with git rev 0ee78c2c
Author: Rohit Grover
bringing in minor improvements from CSR's BLEDevice.h
Changed in this revision
| public/BLEDevice.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/BLEDevice.h Fri Nov 21 09:23:23 2014 +0000
+++ b/public/BLEDevice.h Fri Nov 21 09:23:23 2014 +0000
@@ -419,6 +419,7 @@
BLEDevice::accumulateAdvertisingPayload(GapAdvertisingData::Appearance app)
{
needToSetAdvPayload = true;
+ transport->getGap().setAppearance(app);
return advPayload.addAppearance(app);
}
@@ -433,6 +434,9 @@
BLEDevice::accumulateAdvertisingPayload(GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len)
{
needToSetAdvPayload = true;
+ if (type == GapAdvertisingData::COMPLETE_LOCAL_NAME) {
+ transport->getGap().setDeviceName(data);
+ }
return advPayload.addData(type, data, len);
}
@@ -452,8 +456,11 @@
inline ble_error_t
BLEDevice::startAdvertising(void)
{
+ ble_error_t rc;
+ if ((rc = transport->getGattServer().initializeGATTDatabase()) != BLE_ERROR_NONE) {
+ return rc;
+ }
if (needToSetAdvPayload) {
- ble_error_t rc;
if ((rc = setAdvertisingPayload()) != BLE_ERROR_NONE) {
return rc;
}
