Error Occurred During Step-by-Step Channel Sounding Distance Measurement

Hi Nordic,

I am currently writing about the process of performing channel sounding sequentially on three connected devices. However, after the first channel sounding is completed and the CS procedure is closed, when I attempt to start the second channel sounding (using bt_le_cs_procedure_enable), the following error occurs:

[00:00:28.513,899] <wrn> bt_hci_core: opcode 0x2094 status 0x07 
[00:00:28.513,910] <err> app_main: Failed to enable CS procedures (err -5)


According to the Bluetooth specification, this error corresponds to "Memory Capacity Exceeded". I would like to ask how to resolve this issue.

Thanks!

  • Hi

    bt_le_cs_procedure_enable() so I don't think you can have multiple procedures enabled at the same time. Error message -5 from this function points to an input output error which might indicate that it's already enabled for example, and thus returns this error you're seeing. Try calling a disable to disable the current connected ID before enabling it for a second connected device.
    It would also be helpful if you uploaded a code snippet showing how you're handling the connections and CS measurements on your end. And what SDK version you're using for development.
     
    Best regards,
    Simon
  • Sorry, let me briefly explain the operation process:

    I have three connected devices, bt_conn *connection[3], and I perform the channel sounding procedure on them sequentially. Before executing the channel sounding procedure on the next connection, I first use bt_le_cs_procedure_enable(connection[0], &cs_disable_params[0]); to disable it.

    Therefore, the next connection's channel sounding procedure is started while the previous one is disabled.

    However, when enabling the next channel sounding procedure using bt_le_cs_procedure_enable, this error occurs.

    The SDK version in use is: NCS v2.9.0.

  • By the way, if I use bt_le_cs_procedure_enable (enable and disable) on the same connected device, the 0x07 issue does not occur. The problem only arises when cycling through the connected devices.

  • Hi

    Okay, does indeed seem like it's related to the allocated memory on the application. First off, can you try moving to NCS v3.0.0 where we added a lot of support for Bluetooth channel sounding?

    Then, if you still see issues with the bt_le_cs_procedure_enable() try increasing the memory allocated with CONFIG_MAIN_STACK_SIZE or increase CONFIG_BT_MAX_CONN for example.

    Best regards,

    Simon

    EDIT: I had a conversation with one of the developers today, and we suspect that the error you're seeing is caused by CONFIG_BT_CTLR_SDC_CS_COUNT=1 in your config file. Can you try setting this to 3 and see if that fixes your issue?

  • Dear Simonr,

    It worked!

    Thank you so much for your help!

Related