Skip to content

Feature request: BleakClient.write_gatt_char response default should be dynamic #909

@jackjansen

Description

@jackjansen

The default value for the BleakClient.write_gatt_char argument response is False.

This is a nuisance for BLE devices that support write, but not write-without-response. And we could know this: the properties on the characteristics have this information.

Suggestion: we make response an Optional[bool] defaulting to None. And in the default case we examine the properties, use write-without-reponse if it is supported, otherwise we use write.

If this is a good idea I'll create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions