Skip to content

_bleio: Pass connection to PacketBuffer, its Characteristic, or its Service #2852

Open
@dhalbert

Description

@dhalbert

PacketBuffer needs to know about its Connection to determine .incoming_packet_length and .outgoing_packet_length. When its Characteristic is remote, the Connection is know via the Service, but when the Characteristic and Service are local, the Connection is not easily found. Right now, PacketBuffer grabs the conn_handle by spying on GATTS write operations, and also notices disconnections.

It might make more sense for the Python program simply to pass the Connection in, once a connection has been established. This could be to the PacketBuffer itself, or to the Service. An API like Service.connection = or similar could be used.

This would be an incompatible change, deferred until 6.0.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions