ble

Dependencies:   HC_SR04_Ultrasonic_Library Servo mbed

Fork of FIP_REV1 by Robotique FIP

Revision:
4:69a35a56ac48
Parent:
2:b5166e24c7a6
--- a/BLE_BlueNRG/btle/src/btle.cpp	Tue May 19 20:42:25 2015 +0000
+++ b/BLE_BlueNRG/btle/src/btle.cpp	Thu Jul 09 13:33:36 2015 +0000
@@ -139,7 +139,7 @@
 {  
   tBleStatus ret;
   
-  const char local_name[] = {AD_TYPE_COMPLETE_LOCAL_NAME,'B','l','u','e','N','R','G', '1', '2'};
+  const char local_name[] = {AD_TYPE_COMPLETE_LOCAL_NAME,'F','I','P'};
   
   /* disable scan response */
   hci_le_set_scan_resp_data(0,NULL);
@@ -250,8 +250,11 @@
                                     
                                     BlueNRGGattServer::getInstance().handleEvent(GattServerEvents::GATT_EVENT_DATA_WRITTEN, evt->attr_handle);
                                     //Write the actual Data to the Attr Handle? (uint8_1[])evt->att_data contains the data
+                                    //handleUpdated = evt->attr_handle;
+                                    //dataUpdated =  evt->att_data;
                                     if ((p_char->getValuePtr() != NULL) && (p_char->getInitialLength() > 0)) {
-                                        BlueNRGGattServer::getInstance().updateValue(p_char->getHandle(), p_char->getValuePtr(), p_char->getInitialLength(), false /* localOnly */);
+                                        BlueNRGGattServer::getInstance().updateValue(p_char->getHandle(), evt->att_data, p_char->getInitialLength(), false /* localOnly */);
+                                        DEBUG("%d", p_char->getValuePtr());
                                     }
                           }                   
                         }