Simple example to demonstrate custom made BLE service and characteristics.

Fork of BLE_GATT_Example by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
mbedAustin
Date:
Sat Feb 14 15:49:47 2015 +0000
Parent:
5:d0548c64e2e7
Child:
7:f6814152873c
Commit message:
added writeCharCallback handler, now when something is written we can handle it

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Feb 14 15:43:55 2015 +0000
+++ b/main.cpp	Sat Feb 14 15:49:47 2015 +0000
@@ -36,9 +36,9 @@
 // This function is called whenever someone writes something to the writeCharacteristic
 void writeCharCallback(const GattCharacteristicWriteCBParams *params)
 {
-    //TODO: when character is written here change the LED, update the read characteristic, and print out to console
     led = params->data[0];
     printf("LED Written To, value=%x",params->data[0]);
+    // TODO: update the readChar value to match write char, or better yet give it an english value
 }
 
 int