Closed nicolasfara closed 1 year ago
By starting advertising when a connection is established, it is possible to respond to scans even while connected. You can do it with the code below.
let ble_device = BLEDevice::take();
let server = ble_device.get_server();
server.on_connect(|_| {
ble_device.get_advertising().start();
});
By default the maximum number of connections is 3.
If you want to change the maximum number of connections, please set CONFIG_BT_NIMBLE_MAX_CONNECTIONS
in sdkconfig.defaults
.
Ohh, thank you, @taks!! I'll try it out this weekend!
Hi,
I need to connect multiple clients to the BLE server. Using your example code for the server, only one client at a time is connected. Is there a way to enable a multi-client connection?
Thank you!