High level Bluetooth Low Energy API and radio abstraction layer
Dependents: BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more
Overview
The BLE_API is a high level abstraction for using Bluetooth Low Energy on multiple platforms. For details and examples using the BLE_API please see the BLE_API Summary Page. Or click on the API Documentation tab above.
Supported Services
Supported services can be found in the BLE_API/services folder.
Diff: ble/services/URIBeaconConfigService.h
- Revision:
- 787:2a6a8313f393
- Parent:
- 766:03f1a26f132f
- Child:
- 843:7d22b29f91bf
--- a/ble/services/URIBeaconConfigService.h Tue Aug 11 15:13:13 2015 +0100 +++ b/ble/services/URIBeaconConfigService.h Tue Aug 11 15:13:13 2015 +0100 @@ -184,9 +184,6 @@ /* Helper function to switch to the non-connectible normal mode for URIBeacon. This gets called after a timeout. */ void setupURIBeaconAdvertisements() { - uint8_t serviceData[SERVICE_DATA_MAX]; - unsigned serviceDataLen = 0; - /* Reinitialize the BLE stack. This will clear away the existing services and advertising state. */ ble.shutdown(); ble.init(); @@ -209,6 +206,8 @@ ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE); ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, BEACON_UUID, sizeof(BEACON_UUID)); + uint8_t serviceData[SERVICE_DATA_MAX]; + unsigned serviceDataLen = 0; serviceData[serviceDataLen++] = BEACON_UUID[0]; serviceData[serviceDataLen++] = BEACON_UUID[1]; serviceData[serviceDataLen++] = flags;