nRF5340 Dynamic Connection Event Length

Hi,

I need to use two or more different event lengths for different modes. The event length should be set based on the mode before establishing a connection. I found that sdc_hci_cmd_vs_event_length_set() can be used for this purpose.

To implement this, I added the header:

Then, I tried to use the function with the following code:

However, I am unable to compile the project due to the following error:
"Undefined reference to sdc_hci_cmd_vs_event_length_set."

Could you help me understand why this error occurs? Are there additional header files or configurations required?

Can you please provide an example implementation to make integration easier?

Parents
  • Hi,

    Is your application based on any of our samples?

    Which NCS version do you use?

    Can you provide complete error log?

    Best regards,
    Dejan

  • Hi,

    Which NCS version do you use?

    NCS version 2.6.1.

    Is your application based on any of our samples?

    No, Our custom board code. 

    Please check the complete log.

  • Hi,

    Can you check if you have included CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT in your configuration for the bluetooth controller running on the network core as described in this ticket?

    Best regards,
    Dejan

Reply Children
  • Hi,

    Yes I am using this in the net core file (custom_nrf5340_cpunet_defconfig file.)

    CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=5000.
    I have tried removing this config, but still getting the same error. 
  • Hi,

    Any updates?

    If you can provide an example code or implementation, that would be great.

  • Hi,

    Can you provide more information about your application? Is it based on any of our Bluetooth samples?

    Edit:  You can look at the scanning while connecting sample. It shows how to set event_length_us parameter.

    Best regards,
    Dejan

  • Hi,

    I have developed a custom BLE application code by using this custom_ncs_ble_service_sample tutorial. Its working fine.

    We are developing a mesh network. Our requirement is the one device can connect to three other devices. Using one connection as a peripheral and up to two connections as a central for mesh connections.

    We are using nRF5340 and the nRF Connect SDK Version 2.6.1.

    I have attached our code in this private ticket. If needed you can refer this.  

    Private ticket of other issue

  • Hi,

    Thank you for additional information.

    AKV said:
    I have attached our code in this private ticket. If needed you can refer this.  

    There are many files (including several zip files) in your previous ticket. Which file contains your code?

    dejans said:
    Edit:  You can look at the scanning while connecting sample. It shows how to set event_length_us parameter.

    Can you look at the sample which I linked in my previous edited reply?

    Best regards,
    Dejan