I don't know why this is happening.

Fork of BLE_API by Bluetooth Low Energy

Revision:
118:620d28e7a1ba
Parent:
115:47e4cdd7b0c5
Child:
144:c025c8839682
diff -r 0fb20195102b -r 620d28e7a1ba public/GattCharacteristic.h
--- a/public/GattCharacteristic.h	Mon Sep 08 17:11:58 2014 +0100
+++ b/public/GattCharacteristic.h	Mon Sep 22 10:59:09 2014 +0100
@@ -306,7 +306,9 @@
      *  @param[in]  uuid
      *              The UUID to use for this characteristic
      *  @param[in]  valuePtr
-     *              The memory holding the initial value.
+     *              The memory holding the initial value. The value is copied
+     *              into the stack when the enclosing service is added; and
+     *              thereafter maintained internally by the stack.
      *  @param[in]  initialLen
      *              The min length in bytes of this characteristic's value
      *  @param[in]  maxLen
@@ -317,13 +319,17 @@
      *              A pointer to an array of descriptors to be included within this characteristic
      *  @param[in]  numDescriptors
      *              The number of descriptors
+     *
+     * @NOTE: If valuePtr == NULL, initialLength == 0, and properties == READ
+     *        for the value attribute of a characteristic, then that particular
+     *        characteristic may be considered optional and dropped while
+     *        instantiating the service with the underlying BLE stack.
      */
     /**************************************************************************/
     GattCharacteristic(const UUID &uuid, uint8_t *valuePtr = NULL, uint16_t initialLen = 0, uint16_t maxLen = 0,
                        uint8_t props = BLE_GATT_CHAR_PROPERTIES_NONE,
                        GattAttribute *descriptors[] = NULL, unsigned numDescriptors = 0) :
         _valueAttribute(uuid, valuePtr, initialLen, maxLen), _properties(props), _descriptors(descriptors), _descriptorCount(numDescriptors) {
-        
     }
 
 public: