Previous version which works for my stm32f401 Nucleo board

Fork of X_NUCLEO_IDB0XA1 by ST

Revision:
28:edeb91b415c6
Parent:
27:b4c21a9e8b39
Child:
29:1870b03aa25b
--- a/BlueNRGGattServer.cpp	Wed Aug 20 07:55:23 2014 +0000
+++ b/BlueNRGGattServer.cpp	Wed Aug 20 12:09:06 2014 +0000
@@ -257,19 +257,22 @@
     @endcode
 */
 /**************************************************************************/
-GattCharacteristic* BlueNRGGattServer::getCharacteristicFromHandle(tHalUint16 charHandle)
+GattCharacteristic* BlueNRGGattServer::getCharacteristicFromHandle(tHalUint16 attrHandle)
 {
     GattCharacteristic *p_char;
     int i;
     uint16_t handle;
-    
+    DEBUG("Attribute Handle received 0x%x\n\r",attrHandle);
     for(i=0; i<characteristicCount; i++)
     {
         handle = p_characteristics[i]->getHandle();
-        if(charHandle==bleCharacteristicHandles[handle])
+        DEBUG("Handle 0x%x\n\r",bleCharacteristicHandles[handle]);
+        if(attrHandle==(bleCharacteristicHandles[handle]+1))//Testing attribute handle only and not Notify
         {
+            DEBUG("MATCH!\n\r");
             p_char = p_characteristics[i];
-            break;
+            DEBUG("Match Characteristic Properties 0x%x\n\r",p_char->getProperties());
+            
         }
     }
     return p_char;