-
Notifications
You must be signed in to change notification settings - Fork 3k
BLE Fix read and write callbacks for descriptors not firing if characteristic is not readable or writable #13293
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
BLE Fix read and write callbacks for descriptors not firing if characteristic is not readable or writable #13293
Conversation
Tested in the new pytest suite:
|
@@ -510,7 +510,7 @@ ble_error_t GattServer::insert_descriptor( | |||
#endif // BLE_FEATURE_SECURITY | |||
} | |||
|
|||
if (properties & READ_PROPERTY && !(attribute_it->settings & ATTS_SET_CCC)) { | |||
if (!(attribute_it->settings & ATTS_SET_CCC)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the real condition to check is descriptor->isReadAllowed() which is already checked above
@@ -543,7 +543,7 @@ ble_error_t GattServer::insert_descriptor( | |||
#endif // BLE_FEATURE_SECURITY | |||
} | |||
|
|||
if (properties & WRITABLE_PROPERTIES && !(attribute_it->settings & ATTS_SET_CCC)) { | |||
if (!(attribute_it->settings & ATTS_SET_CCC)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@paul-szczepanek-arm, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @paul-szczepanek-arm it works well.
Ci started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
Summary of changes
The write and read callback for gatt attributes that are used as descriptors were not firing because they were tied to characteristic properties which might be different than descriptor. This removes that limitation and allows the callbacks for fire on read and write.
Impact of changes
Migration actions required
Documentation
none
Pull request type
Test results
Reviewers