Lightly modified version of the BLE stack, that doesn't bring up a DFUService by default... as we have our own.

Fork of BLE_API by Bluetooth Low Energy

Revision:
165:ca406c1d0399
Parent:
164:93e52c3861a9
Child:
166:a03959283d48
--- a/services/URIBeacon2Service.h	Fri Nov 28 14:11:21 2014 +0000
+++ b/services/URIBeacon2Service.h	Fri Nov 28 14:11:21 2014 +0000
@@ -61,7 +61,7 @@
             return;
         }
 
-        GattCharacteristic *charTable[] = {&lockedStateChar, &uriDataChar};
+        GattCharacteristic *charTable[] = {&lockedStateChar, &uriDataChar, &flagsChar};
         GattService         beaconControlService(URIBeacon2ControlServiceUUID, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
 
         ble.addService(beaconControlService);
@@ -82,7 +82,7 @@
                 return;
             }
 
-            /* we don't handle very large writes at the moment. */
+            /* We don't handle very large writes at the moment. */
             if ((params->offset != 0) || (params->len > MAX_SIZE_URI_DATA_CHAR_VALUE)) {
                 return;
             }
@@ -90,7 +90,7 @@
             uriDataLength = params->len;
             memcpy(uriDataValue, params->data, uriDataLength);
         } else if (params->charHandle == flagsChar.getValueAttribute().getHandle()) {
-            if (lockedState) {
+            if (lockedState) { /* when locked, the device isn't allowed to update the flags characteristic */
                 ble.updateCharacteristicValue(flagsChar.getValueAttribute().getHandle(), &flags, 1 /* size */);
                 return;
             } else {