This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to "ble_app_hids_keyboard" app can connect multi device?

Hello all.

I have a question relate to: How to "ble_app_hids_keyboard" app can connect multi device?

My task: make equip peripheral base on nrf52811/840 can Adv and connect to multi central(maybe 2-3 centrals)/or smart phone(may be 2-3 smart phones) by whitelist.

I try to using  "ble_app_multiperipheral" app. Whitelist i refer to "ble_app_hids_keyboard" but it seem setup to connect one device.

--> 1.How to "ble_app_hids_keyboard" app can connect multi device to work parallel?

- SDK 17.02

- SEGGER Embedded Studio for ARM 4.52c

-->>2.Can we did multi connection between 1 peripheral to multi central work parallel with whitelist("Advertising module")?
I remember read somewhere on devzone.nordicsemi.com said that  "Advertising module" only work single link at one time.

-->>3."ble_app_multiperipheral" can work multi connection parallel because it using "Advertising and Scan Response Data Encoder" not using "Advertising module" technical, is it right??

Thanks!!

  • Hi

    1. Do you want to connect to multiple devices at the same time, or one after the other?

    Do you want to send the same data to all the connected devices?

    2. The advertising module should work fine for connecting to multiple centrals, there is no inherent limit on this, but you need to change the SoftDevice configuration (through sdk_config.h) in order to allow several peripheral connections. 

    3. The ble_app_multiperipheral example is not using the advertising module, instead it is simply configuring advertising directly through the SoftDevice API. 

    The data encoder module is available as a convenience to build the advertising payload, and is also used when you use the advertising module (indirectly). 

    Best regards
    Torbjørn 

  • Hello Mr Ovrebekk,

    thank you for your support.

    1. Do you want to connect to multiple devices at the same time, or one after the other?

    Do you want to send the same data to all the connected devices

    -->> yes i want they connect and work at the same time,

           send same data to all the connected device.

    2. The advertising module should work fine for connecting to multiple centrals, there is no inherent limit on this, but you need to change the SoftDevice configuration (through sdk_config.h) in order to allow several peripheral connections. 

    -->> Can you suggest for me the main parameter need to change on sdk_config.h.

    I am using sdk17.02, segger studio 4.52c

  • Hi

    You need to increase the NRF_SDH_BLE_PERIPHERAL_LINK_COUNT to the number of peripheral links you want to support, and make sure that you also increase NRF_SDH_BLE_TOTAL_LINK_COUNT by the same amount. 

    Please note that when you do this the RAM requirements of the SoftDevice will increase. If you run the debugger with logging enabled you will get an error message in the log telling you what you need to change the SoftDevice RAM allocation to. 

    For more information about changing the RAM settings you can have a look at this guide.  

    Best regards
    Torbjørn

Related