AnsweredAssumed Answered

KW36: Multiple connection timing

Question asked by Finn Schmitz on Oct 18, 2019
Latest reply on Oct 22, 2019 by Xiang Li

Hallo all,


I am running a FRDM-KW36 with SDK 2.2.1 as BLE central (without low power mode, module is always on) in an environment with multiple peripherals.


The overall data exchange and battery life requirements dictate, that the advertisement is quite slow (currently 3 s) and the connection intervals fast (10 ms). Nontheless, we need all peripherals to be connected once the central is switched on in a few seconds time.


My expectation was the following:

  • The KW36 would connect on the first scanned advertisement package from the peripheral it is supposed to connect to
  • The KW36 would scan/(initiate connections to the other peripherals) in parallel to any delay in the connection made to the first peripheral. So that there would be some kind of parallel handling


However the behavior I see (see screenshot) is the following:

  • The KW36 will initiate the connection on BleApp_ScanningCallback with event gDeviceScanned_c on the first package scanned, but the connection will only be done (BleApp_ConnectionCallback with gConnEvtConnected_c) one advertisement cycle later (so in my case 3s later). Can this be changed, so that not a whole advertisement intervall takes place to connect? I find the behavior surprising since The ScanningCallback directly calls App_Connect().
  • I would expect, that in the meantime (3s), the KW36 would continue to scan and hence also initiate connections with the other peripherals (BleApp_ScanningCallback with gDeviceScanned_c does not stop the scanning explicitly). But as you can see, the 3 peripherals are connected completely serially, which takes quite a long time in total. How can this be parallelized?


So I guess you get the overall question: What needs to be done here to get all peripherals to connect much quicker, WITHOUT reducing the advertisement interval of the peripherals? Or is the behavior I see a limitation of the stack or the controller?


For example when I trace a startup not with the KW36 but with an dedicated app on iPad to connect to the peripherals, I see a connection on the first advertisement package, it does not take 3 seconds.


Thank you for your help.


Kind regards