HW layer for the Nucleo board, it only work with old BLE_API
Dependents: Hello_BLE F446RE-BLE
Fork of X_NUCLEO_IDB0XA1 by
Diff: platform/src/btle.cpp
- Revision:
- 84:2beeb1cc9d57
- Parent:
- 78:13e75d352d53
diff -r 52a08354a933 -r 2beeb1cc9d57 platform/src/btle.cpp --- a/platform/src/btle.cpp Tue Jun 30 09:16:48 2015 +0000 +++ b/platform/src/btle.cpp Thu Jul 09 08:38:06 2015 +0000 @@ -326,7 +326,8 @@ DEBUG("CharHandle %d, length: %d, Data: %d\n\r",evt->attr_handle, evt->data_length, (uint16_t)evt->att_data[0]); //Extract the GattCharacteristic from p_characteristics[] and find the properties mask - GattCharacteristic *p_char = BlueNRGGattServer::getInstance().getCharacteristicFromHandle(evt->attr_handle); + //If the char has handle 'x', then the value declaration will have the handle 'x+1' + GattCharacteristic *p_char = BlueNRGGattServer::getInstance().getCharacteristicFromHandle(evt->attr_handle-1); if(p_char!=NULL) { DEBUG("getProperties 0x%x\n\r",p_char->getProperties()); if((p_char->getProperties() & (GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY