bjoernQ / bleps

A toy-level BLE peripheral stack
MIT License
55 stars 18 forks source link

How to achieve parallel connections? #35

Closed pkwagner closed 9 months ago

pkwagner commented 9 months ago

First of all, thank you so much for your great work!

I'm running bleps with embassy on an ESP32-C3 and was wondering if it's possible to open multiple BLE connections in parallel. Do you have any experience of this?

The chip should support it, but I'm too unfamiliar with Bluetooth to know at what level the parallelism should take place. Would it be enough to give multiple Ble instances access to the same embedded_io_async::{Read, Write} BleConnector instances?

bjoernQ commented 9 months ago

Thank you!

Supporting only one simultaneous connection was one of the first and most fundamental decisions. Supporting multiple concurrent connections would require a lot of changes and t.b.h. I haven't even thought about it.

Since it's a side project I don't see when/if I ever get to look into that. But I would certainly be happy about a PR adding this functionality

pkwagner commented 9 months ago

Makes sense, so I'll close it for now. If I find the time to dig into the Bluetooth specs, I'll definitely open a PR!