Skip to content
This repository was archived by the owner on May 18, 2022. It is now read-only.
This repository was archived by the owner on May 18, 2022. It is now read-only.

Support for closing connections #147

@daboross

Description

@daboross

Right now, there isn't any way to properly close a connection, flush the associated queues, and turn off the radio.

Supporting this isn't necessarily trivial, however. Quoting from @jonas-schievink from #140 (comment) (on a simple-and-incorrect radio shutdown PR):

Hmm, yeah, we want something like this eventually, but getting it correct is a bit more involved. For example, the low-priority part of the stack needs to know that the connection is being teared down to drain the packet queue before the operation can complete (otherwise establishing a new connection will start processing and transmitting packets from the old connection, which is pretty bad).

Fixing this would mean adding the ability to properly close a connection from the device, and fixing "start_advertising" so that it uses this method to close any active connections before advertising.

See also #70.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: link layerCode Area: BLE Link Layer (establishing and maintaining connections, encryption, etc)type: enhancementA new feature or an improvement for an existing one

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions