Nordic stack and drivers for the mbed BLE API Modified for HRM 1017 and correct DISCONNECT event processing
Fork of nRF51822 by
Diff: nRF51GattServer.cpp
- Revision:
- 29:cee837a465a1
- Parent:
- 28:fdc1a88a80c8
- Child:
- 30:85305292b44f
diff -r fdc1a88a80c8 -r cee837a465a1 nRF51GattServer.cpp --- a/nRF51GattServer.cpp Wed Jun 11 13:55:00 2014 +0100 +++ b/nRF51GattServer.cpp Wed Jun 11 14:44:16 2014 +0100 @@ -47,11 +47,14 @@ /* Add the service to the nRF51 */ ble_uuid_t nordicUUID; nordicUUID = custom_convert_to_nordic_uuid(service.getUUID()); + + uint16_t serviceHandle; ASSERT( ERROR_NONE == sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &nordicUUID, - service.getHandlePtr()), + &serviceHandle), BLE_ERROR_PARAM_OUT_OF_RANGE ); + service.setHandle(serviceHandle); /* Add characteristics to the service */ for (uint8_t i = 0; i < service.getCharacteristicCount(); i++) {