An example of creating and updating a simple GATT Service using the BLE_API
Dependencies: BLE_API mbed nRF51822 X_NUCLEO_IDB0XA1
This example creates and updates a standard Battery Level service, and a single GATT characteristic that contains the battery level.
Revision 14:39b4b11d9cf5, committed 2015-03-24
- Comitter:
- rgrover1
- Date:
- Tue Mar 24 08:15:17 2015 +0000
- Parent:
- 13:60e095fe4b45
- Child:
- 15:175eb5d06c45
- Commit message:
- Updating underlying libraries.
Changed in this revision
--- a/BLE_API.lib Tue Dec 16 09:12:25 2014 +0000 +++ b/BLE_API.lib Tue Mar 24 08:15:17 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#fb2a891a0d98 +http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#501ad8b8bbe5
--- a/main.cpp Tue Dec 16 09:12:25 2014 +0000 +++ b/main.cpp Tue Mar 24 08:15:17 2015 +0000 @@ -50,7 +50,7 @@ /* setup advertising */ ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED); ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); - ble.setAdvertisingInterval(Gap::MSEC_TO_ADVERTISEMENT_DURATION_UNITS(1000)); /* 1000ms; in multiples of 0.625ms. */ + ble.setAdvertisingInterval(1000); /* 1000ms; in multiples of 0.625ms. */ ble.startAdvertising(); while (true) {
--- a/mbed.bld Tue Dec 16 09:12:25 2014 +0000 +++ b/mbed.bld Tue Mar 24 08:15:17 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file
--- a/nRF51822.lib Tue Dec 16 09:12:25 2014 +0000 +++ b/nRF51822.lib Tue Mar 24 08:15:17 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#17fe69405098 +http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#bdc690669431