Skip to content

Gattserver crashes during discovery when more than 20 writable characteristics added #9869

@cy-kishore

Description

@cy-kishore

When more than 20 writable characteristics are added then while adding 21st characteristic it is returning from following code in function insert_characteristic_value_attribute().

if ( _auth_char_count >= MAX_CHARACTERISTIC_AUTHORIZATION_CNT) {
printf(" BLE_ERROR_NO_MEM\n");
return BLE_ERROR_NO_MEM;
}

This error is not getting handled and the subsequent characteristics are getting added with same attribute_it.

This error causes crash during discovery in the following function attsFindServiceGroupEnd().

This issue is found while porting homekit adk and issue is resolved by incrementing MAX_CHARACTERISTIC_AUTHORIZATION_CNT to 25 from 20.

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