This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Enable/Disable Slave Latency using nRF Connect SDK + Zephyr BT Stack on nRF52840

Hello,

I have an interest in reproducing within Zephyr (and nRF5 SDK) a specific behaviour that was possible to implement with the classic SoftDevice API, running on a nRF52 chip.
Is there a way with Zephyr BT Stack to force the Link Layer to "ignore" temporarily current slave latency setting during an active connection?

I'm taking as a reference the BLE_GAP_OPT_SLAVE_LATENCY_DISABLE option available through the sd_ble_opt_set API.
In that case you could just toggle the use of slave latency for a peripheral device, without renegotiating the entire sets of parameters.

Ideally, we are looking to have exactly the same feature within the new environment, regardless if it's available on Nordic SoftDevice Controller or Zephyr Open Source Controller.

Thanks in advance,

D

  • Hi,
    Are you making a peripheral or central?
    For the central you decide the connection parameters and most examples use BT_LE_CONN_PARAM_DEFAULT, where the slave latency is 0. If you want other values you should make your own bt_le_conn_param instance, for instance using BT_LE_CONN_PARAM_INIT, and use that in the bt_scan_init_param instance you pass to bt_scan_init().
    If you are making a peripheral you can specify the preferred slave latency using CONFIG_BT_PERIPHERAL_PREF_SLAVE_LATENCY.
  • Dear Einar,

    this is not what I'm looking for.

    Our device is only peripheral AND in this issue the connection is already established (with a specific set of parameters).
    One of them is Slave Latency, that in our case cannot be 0.

    What we want is being able to toggle Slave Latency on and off, so that we can be more "reactive" in specific cases (e.g. before pairing) but then going back to "low power" without renegotiating the whole sets of parameters.

    Now, this behaviour was perfectly possible using the option BLE_GAP_OPT_SLAVE_LATENCY_DISABLE and sd_ble_opt_set API with SoftDevice.

    It would be weird to know this has not being ported to Zephyr BT subsystem (+Nordic SD Controller) in some form.

    Can you tell me if there's an equivalent?

    Thanks

  • Hi,

    Ah, I see. I did not remember what the BLE_GAP_OPT_SLAVE_LATENCY_DISABLE does, so I made a wrong assumption before answering (to be honest I do not recall ever seeing it used before).

    I do not believe there is any way to get the same behavior in the nRF Connect SDK (regardless of using Zephyr or SoftDevice BLE controller). I have started a discussion with our BLE stack development team though, and update here if they see a way to do it.

  • Hello again Einar,

    it would be really important to understand this in more details and check if there's any plan to have this feature baked-in on a future release or not.

    Please keep me posted on this thread if you have any update.

    Thanks in advance,

    D

  • Hi,

    I have discussed with the R&D team responsible for our BLE stack and have created a feature request for it. I cannot say if or when this will be supported in nRF Connect SDK, though.

Related