Skip to content

BLE/HRM : Fix #4661 #4662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion features/FEATURE_BLE/ble/GattCharacteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,17 @@ class GattCharacteristic {
* @param[in] hasVariableLen
* Whether the attribute's value length changes over time.
*
* @note The UUID value must be unique in the service and is normally >1.
* @note The UUID value must be unique in the service and is normally >1.
*
* @note If valuePtr == NULL, length == 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.
*
* @note A CCCD should not be allocated if either the notify or indicate
* flag is set, as it is handled by the underlying BLE stack. In such
* a case, the param descriptors could be empty and the param
* numDescriptors equal to zero.
*/
GattCharacteristic(const UUID &uuid,
uint8_t *valuePtr = NULL,
Expand Down Expand Up @@ -584,6 +589,8 @@ class GattCharacteristic {
SecurityManager::SecurityMode_t _requiredSecurity;
/**
* The characteristic's descriptor attributes.
* This contains only CCCDs that has neither the notify nor the indicate
* flag set, as thoses are handled by the underlying BLE stack.
*/
GattAttribute **_descriptors;
/**
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/ble/services/HeartRateService.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class HeartRateService {
valueBytes(hrmCounter),
hrmRate(GattCharacteristic::UUID_HEART_RATE_MEASUREMENT_CHAR, valueBytes.getPointer(),
valueBytes.getNumValueBytes(), HeartRateValueBytes::MAX_VALUE_BYTES,
GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
hrmLocation(GattCharacteristic::UUID_BODY_SENSOR_LOCATION_CHAR, &location),
controlPoint(GattCharacteristic::UUID_HEART_RATE_CONTROL_POINT_CHAR, &controlPointValue) {
setupService();
Expand Down