Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
4 years, 10 months ago.
Can connect more than two BLE_LED devices to BLE_LEDBlinker?
Hi there,
I've used Mbed online to connect one BLE_LEDBlinker device to one BLE_LED. It's run Ok.
I don't know whether we can use one BLE_LEDBlinker device to connect and work with more than two BLE_LED devices simultaneously?
Thanks.
Question relating to:
1 Answer
4 years, 10 months ago.
Hi Sang,
Mbed OS is able to connect to multi peripherals simultaneously. To achieve this, you need to modify the example BLE_LEDBlinker.
First, you need to do another scan after the first connection complete.
Second, you need to add service/characteristic callback for each handle, handle is get by event.getConnectionHandle()
in onConnectionComplete()
.
The example uses _is_connecting
to prevent receiving more adv report, you also need to remove that.
Let me know if you have any questions.
Regards,
Desmond