BLE Data Length Extension Usage and Example

Hello,

I'm just learning the nRF stack and development environment, hopefully this question is not too basic. Our product requires the usage of the extended data length packet in order to achieve the throughput performance we require.

I was wondering if a specific example exists that uses the extended data packet feature? I have been working with the basic "peripheral" example since it has some usage of vendor specific services and characteristics.

One other related question. In looking through the developer zone I found reference to someone using extended data length packets, and they included the following defines in their config file:

CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_L2CAP_TX_MTU=260
CONFIG_BT_RX_STACK_SIZE=2048
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_EVT_RX_SIZE=251
CONFIG_BT_BUF_CMD_TX_SIZE=251
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_FRAG_COUNT=10
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_CMD_TX_SIZE=251
CONFIG_BT_BUF_CMD_TX_COUNT=10
My question is: 1) Are all these CONFIGs required for the extended data packet usage? Also, 2) Do these override some of the settings in the Kconfig menu? I was also looking at the following Kconfig settings:
Data Length Update (BT_DATA_LEN_UPDATE)
Maximum supported ACL size for outgoing data (BT_BUF_ACL_TX_SIZE)
Maximum supported ACL size for incoming data (BT_BUF_ACL_RX_SIZE)
Maximum supported HCI Event buffer length (BT_BUF_EVT_RX_SIZE)
Maximum support HCI Command buffer length (BT_BUF_CMD_TX_SIZE)
Maximum supported L2CAP MTU for L2CAP TX buffers (BT_L2CAP_TX_MTU)
Thanks so much for your help,
Pam
Parents
  • Hi Andreas,

    I can't find the exact case that I referenced before, but I did locate a couple that should hopefully be enough to get me started:

    • Case ID: 283808
    • Case ID: 282428

    It is confusing exactly how many of the config definitions need to be updated for using the extended data packet length. It would be nice if they were all connected, or there was at least a list to reference to use this stack feature. By the way I am using the latest of the nRF Connect SDK (v1.9.1) and Visual Code tools.

    Regards,

    Pam

Reply
  • Hi Andreas,

    I can't find the exact case that I referenced before, but I did locate a couple that should hopefully be enough to get me started:

    • Case ID: 283808
    • Case ID: 282428

    It is confusing exactly how many of the config definitions need to be updated for using the extended data packet length. It would be nice if they were all connected, or there was at least a list to reference to use this stack feature. By the way I am using the latest of the nRF Connect SDK (v1.9.1) and Visual Code tools.

    Regards,

    Pam

Children
  • Hi Pam,

    AHaug said:
    2) I will look closer into this tomorrow and come back with a reply then.

    The short answer is: Yes, the proj.conf file overrides the configurations from the Kconfig. 

    The longer answer that might go a bit out of the scope is: Yes they do as long as they are defined in the Kconfig. Most of our samples has a proj.conf that enables/overwrites Kconfigs that are set elsewhere. If you inspect "CONFIG_BT_CENTRAL=y" in proj.conf for throughput, it takes you to the Kconfig located at "C:\peripheral_uart\zephyr\subsys\bluetooth\Kconfig" and this is what it enables and/or overwrites. If a configuration is not defined anywhere in the stacks/SDK/toolchain etc, you may not define a new custom configuration such as "CONFIG_NORDIC_EXAMPLE=y" here.

    But you may add your own custom Kconfig to the application located in your application folder where you may define such custom macros and values etc, in a similar manner such as what is done in the Kconfig for bluetooth at the path mentioned above. If you do so, then you may overwrite it in the proj.conf file for your application.

    Pamela Keiles said:
    but I did locate a couple that should hopefully be enough to get me started:

    After looking at these two I believe they should give a lot of help to getting started! They seem quite detailed in resources regarding the topic. The peripheral_uart_high_mtu.zip added to 283808 looks like a data extended variation of the normal peripheral_uart, so unless you've already done so I believe this and the throughput sample should be what you're looking for!

    As a supplement to Case ID: 282428, I can add that topic 7 and 8 from this NCS course is a great, more detailed introduction to threads and work queues to Simons "Try using work queues" if you're new to the topic or need some refreshing. 

    I hope this helps you, and let me know if you have more questions!

    Kind regards,
    Andreas

Related