Skip to content

CordioBLE stack Read callback for RW attributes #9732

@cy-kishore

Description

@cy-kishore

Description

We found that that when a GATT attribute is configured as Read/Write by the Gattserver, the application does not receive Read callback when GATT client tries to read the attribute. While debugging the issue we found following issue in Cordio stack implementation.

In file CordioGattserver.cpp in fxn GattServer::insert_characteristic_value_attribute the call back bit is over written as assignment is done instead of Bitwise or. After changing to bitwise or then we are getting the read callbacks for Readwrite attributes. Is this a bug or intentional implementation?

// Set value attribute settings
if (properties & READ_PROPERTY) {
attribute_it->settings = ATTS_SET_READ_CBACK;
}
if (properties & WRITABLE_PROPERTIES) {
attribute_it->settings = ATTS_SET_WRITE_CBACK; // Change this to attribute_it->settings |= ATTS_SET_WRITE_CBACK
}

Issue request type

[ ] Question
[ ] Enhancement
[ X] Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions