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

Parents
  • 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

  • >>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.>This should work.

    I don't think so. my nrf51 run ble_central_and_peripheral example.

    I called call API "sd_ble_gattc_primary_services_discover"to start to discover, in HOST MCU side.
    then call API "sd_ble_gap_scan_start()"before discover complete event is coming.
    Sometimes the service discover is wrong, discover command seems be discard by NRF51 chip.(about 1/10).So I think these two APIs may be conflict with each other.

Reply
  • >>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.>This should work.

    I don't think so. my nrf51 run ble_central_and_peripheral example.

    I called call API "sd_ble_gattc_primary_services_discover"to start to discover, in HOST MCU side.
    then call API "sd_ble_gap_scan_start()"before discover complete event is coming.
    Sometimes the service discover is wrong, discover command seems be discard by NRF51 chip.(about 1/10).So I think these two APIs may be conflict with each other.

Children
  • Hi,

    I talked to our SDK team and they had the following to say about your case:

    In principal, what he is trying to do is possible. The main issue is that he needs to adjust the db_discovery module, and each time there is a SoftDevice call, if it returns busy, he needs to have some kind of retry mechanism.

    We are planning to include a new module inside db_discovery module for handling this but that is going to be included in a future version of the SDK.

    A possible ‘simple’ work around, is to wait for the end of the discovery before doing a security procedure on another link or even before scanning again.

    Ketil

Related