How to DECLARE - ATT_MTU, PHY, LE Data Length, LE Connection interval for nRF5340 DK?

The board is nRF5340 DK.

nRF Connect SDK1.8.0 / Windows

Example Peripheral UART.

 

I want to DECLARE them, not change them with different types of functions. There are examples for the second. I want to compile the project directly with these values. I know that then the individual devices will be understood each other, for the specific values. Everywhere in the examples are used functions that change in the process of work, I do not want that. I don't care how this happens in the different SoftDevices.

 

I want to change the default ones.

BT_LE_CONN_PARAM_DEFAULT

Default LE connection parameters: Connection Interval: 30-50 ms Latency: 0 Timeout: 4 s

Enable LE Data Packet Length Extension.

 

How and where to declare them?

  • Hi Stefan, 

    I'm sorry that I thought that you were using nRF52.
    If you are using nRF53, you have split  cores: app core and net core. The netcore is running the controller when the app core runs the host. 
    So the config has to be applied for specific core. 


    For the configuration of the netcore you would need to do the following: 
    In the child_image folder you would need to create a file: hci_rpmsg.conf. In this file (which will be the overlay on top of the prj.conf of the hci_rpmsg child image ) you need to add: 

    CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
    CONFIG_BT_BUF_ACL_RX_SIZE=251
    CONFIG_BT_AUTO_DATA_LEN_UPDATE=y

    In the prj.conf for the main project (app core) you can remove

    CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

    but keep the 

    CONFIG_BT_BUF_ACL_RX_SIZE=251

    After that you can reflash the netcore and app core and the data length should be updated automatically, in the sniffer trace you should see: 

  • It works.

    Thank you for your cooperation.

    It can be assumed that you have answered to my topic. Thus, the topic can be considered closed.

Related