Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add L2CAP service infrastructure #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mickeyl
Copy link

@mickeyl mickeyl commented Apr 28, 2023

Refers to #83.

This commit adds the ability to service BLE L2CAP connection-oriented-connections (COC).

It follows the GATT service and delegate patterns.

It has been tested successfully on ESP32C3 and ESP32C6 as peripherals and various iOS and MacOS devices as centrals.

NOTE: Please consider this a request-for-comments. It's probably lacking documentation and an example, but as this has been working very well for me, I thought I let it be reviewed by others.

This commit adds the ability to service BLE L2CAP connection-oriented-connections (COC).

It follows the GATT service and delegate patterns.

It has been tested successfully on ESP32C3 and ESP32C6 as peripherals and various iOS and MacOS devices as centrals.
@mickeyl mickeyl mentioned this pull request Apr 28, 2023
@h2zero
Copy link
Owner

h2zero commented May 14, 2023

Looks great! An example would be welcome if you have time.

@mickeyl
Copy link
Author

mickeyl commented May 15, 2023

For sure. Before this is "pull-ready", I also want to do some changes towards more defensive programming, i.e. removing all the assert and return more error codes.

@mickeyl
Copy link
Author

mickeyl commented Mar 29, 2024

It's been a while, but in the meantime, this code has been put through a lot of tests. Apart from one race condition (probably even be in NimBLE) when shutting down a connection while there is still ongoing traffic, everything looks pretty well.

My plan is now:

  1. Write the example
  2. Sync with upstream
  3. Do some more tests, and
  4. Resubmit.

Will keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants