Skip to content

Commit 6c15360

Browse files
Merge pull request #5400 from gabker01/master
Beetle BLE: Fix variable length GATT attribute
2 parents d1c65c9 + 0e2f5b9 commit 6c15360

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

features/FEATURE_BLE/targets/TARGET_ARM_SSG/TARGET_BEETLE/source/ArmGattServer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ ble_error_t ArmGattServer::addService(GattService &service)
130130
currAtt->pLen = p_char->getValueAttribute().getLengthPtr();
131131
currAtt->maxLen = p_char->getValueAttribute().getMaxLength();
132132
currAtt->settings = ATTS_SET_WRITE_CBACK | ATTS_SET_READ_CBACK;
133+
if (p_char->getValueAttribute().hasVariableLength()) {
134+
currAtt->settings |= ATTS_SET_VARIABLE_LEN;
135+
}
133136
if (p_char->getValueAttribute().getUUID().shortOrLong() == UUID::UUID_TYPE_LONG) {
134137
currAtt->settings |= ATTS_SET_UUID_128;
135138
}

0 commit comments

Comments
 (0)