3 years, 1 month 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:

STM32L4 Discovery kit IoT node, low-power wireless, BLE, NFC, SubGHz, Wi-Fi

1 Answer

3 years, 1 month 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

Accepted Answer