Skip to content

feat(darwin): add L2CAP support#434

Open
acouvreur wants to merge 4 commits intotinygo-org:devfrom
acouvreur:add-l2cap-support-darwin
Open

feat(darwin): add L2CAP support#434
acouvreur wants to merge 4 commits intotinygo-org:devfrom
acouvreur:add-l2cap-support-darwin

Conversation

@acouvreur
Copy link
Copy Markdown
Contributor

@acouvreur acouvreur commented Apr 4, 2026

Add L2CAP CoC support for Darwin.

You can now open an L2CAP CoC to a device to send data and read directly at the L2CAP layer.


My proposition is that there is also a common interface for L2CAP Channels that implement io.ReadWriteCloser.

As a client only, you could:

  • Read(p []byte) (int, error)
  • Write(p []byte) (int, error)
  • Close() error

Although those operations would also need Contexts or options so that each read write can exit on cancellation/timeouts.


This was successfully tested on MacOS against an esp32-s3 running esp-idf L2Cap channels.

@acouvreur acouvreur marked this pull request as ready for review April 19, 2026 15:12
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.

1 participant