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

About the muti connection of NRF51

My SDK version is NRF51_9.00, softdeive 130,  board nrf51822.

We want to confirm some questions about  BLE muti connection

1. When NRF51 is scanning, could it connect with other device at that same time?

2. When NRF51 connects with one perpheral device, could it connects with other peripheral device at the same time?

If I update the sdk version from sdk9.00 to sdk 11, softdevice 132, board nrf51822,

Could NRF51 support item1 &2 above?

Thanks

  • Hi,

    Yes, the nRF51822 can connect to multiple peripherals (up to eight) when running as a central in SDK 11.0 and S130. S132 is only for nRF52 devices. We have an example demonstrating your exact questions.

    Ketil

  • I have test with sdk9.0 like this,

    1. Use nrf51 as central device, scan and connect with device1.
    2. After connected successfully, start to scan again, then start to discover service.
    3. I found the return value of discovering service is success, but sometimes the discover event is not coming.
    4. If the discover event is success, pairing with device1, sometimes the paring event is not coming.
    5. So If nrf51 scanning and discovering(or pairing) at the same time, some event will be abnormal discard.

    So If nrf51 is discovering the service with device1, it can't scan at the same time.
    if nrf51 is pairing with device1, it can't connect with device2 at the same time.
    Is it true?

    if I update the sdk from 9 to 11, is it same?

    Thanks

    .

  • Hi,

    Are you using the provided example in SDK 9.0 or have you written your own code?

    Anyways, I highly recommend that you change to SDK 11.0 and S130 V2.0.x. According to the SDK 11.0 release notes there were significant improvements made to the multilink functionality:

    ** BLE **
    - Multi-instance handling of Service client modules has been greatly 
      improved. The client examples now handle service discovery in the main
      application context. The main application context must manage which 
      client instance belongs to which connection link.
    - The Multi-link Example has been modified to demonstrate multiple 
      client instances in a better way.

    Please try to compile and test the SDK 11.0 BLE Multi-link Example.

    Ketil

  • Maybe my question is not good enough, whether it is a problem if I do like below.
    1. call API "sd_ble_gap_connect()" to connect, then call API "sd_ble_gap_scan_start()" to scan
    before connection success.
    2. call API "sd_ble_gattc_primary_services_discover"to start to discover,
    then call API "sd_ble_gap_scan_start()"before discover complete event is coming.
    3.call API "sd_ble_gap_authenticate()" to pair with peripheral1, then call API "sd_ble_gap_connect()"" to peripheral2
    before pair successfully with peripheral1.

    I build one task central1, another task for central2. so the situation above may occur.
    they sometimes cause problem according to my test.

    For some APIs, before their corresponding event coming. another API shouldn't be called.
    Is it right?

  • Hi,

    1. This will not work. You are not able to perform scanning whilst connecting. You will need to wait till the connection is completed.
    2. This should work.
    3. This should work. Be careful to pass the correct conn_handle to sd_ble_gattc_primary_services_discover og sd_ble_gap_authenticate.

    Ketil

Related