This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Does SoftDevice S130 V.2 have limitation in L2CAP_MTU size by 23 bytes?

Hello,

I want to clarify one thing related to the limitaion in SoftDevice S130 V.1 of L2CAP_MTU size by 23 bytes. Is any way to extended it?

Because I see that changes BLE_L2CAP_MTU_DEF higher than 23 follows that sd_ble_l2cap_tx() function returns NRF_ERROR_NO_MEM error.

Does it mean Softdevice version 1 for nRF51 (in my case nRF51822) does not support it at all?

And the main question: If I switch my project to the newest SoftDevice version 2 will it help to have L2CAP_MTU size more than 23 bytes? Does it support already?

Thanks!

  • FormerMember
    0 FormerMember

    Unfortunately, neither of the S130 softdevices support or will support longer L2CAP_MTU size than 23 bytes. For longer MTU size, you will need to switch to nRF52832 and S132 v.3.0.0 or newer.

    Update 20.03.2017: The sd_ble_l2cap_* API is a Nordic proprietary API. Using this API will only be for communication between two Nordic devices.

    Each link layer packet is 27 bytes, where 23 bytes is data. It means that having more than 23 bytes of data per packet will only be of limited valued (because 27 is max). If a packet is longer than 27 bytes, it will be split into multiple packets.

  • Kristin, thank you for the answer.

    But I have just found at Download page Nordic site in package S130-SD-v2 with the newest SoftDevice stack that release notes document s130_nrf51_2.0.1_release-notes.pdf.

    In the document there is mention about new functionality:

    L2CAPT

             sd_ble_l2cap_* APIs now support packets longer than 23 bytes (DRGN-6649). 
    

    So from that document looks like it has to support. I am little bit confused now. Could you please comment it?

  • Thanks again, Kristin! )))

    But what BLE_L2CAP_MTU_DEF definition is for? Does it influence on work of SoftDevice? If I set more than 23 bytes will it split it anyway? Does that segmentation of packages (in case of data more than 23 bytes) mean that all SoftDevice stacks work in that way and split packages? Or you are talking only about v2.0.1 ? Does SoftDevice v3 and v4 for nRF52832 works in same way? Or it can transmit more that 23 bytes without segmentation?

    Many thanks in advance!

  • FormerMember
    0 FormerMember in reply to FormerMember

    Yes, I think that if increasing BLE_L2CAP_MTU_DEF, the softdevice will split data into multiple packets if needed. This should apply for both S130 v. 2.0.0 and v.2.0.1, since it is written in the release notes for v.2.0.0.

    In S132 v.3.0.0, Data Packet Length extension (DLE) was introduced. It means that packets longer than 23/27 bytes can be transmitted. Please have a look at this post for more information.

Related