Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bug in ble_dtm for packet lengths > 0x3F (SDK 17.0.2)

Hi,

We are in the middle of product certification, right now with BT SIG testing. Unfortunately we got stuck right away since the test house cant configure the device to use 255 bytes payload.

We are using SDK 17.0.2.

In ble_dtm.c:1305:

            m_packet_length = (parameter && LE_UPPER_BITS_MASK) << LE_UPPER_BITS_POS;
^

The bonus & of course causes a bad m_packet_length. Might be a good thing to change in the next version of the SDK. :) 

BR Henrik

Parents
  • Hi,

    Thank you for reporting this bug. It is highly appreciated!

    Yes. This indeed looks like a bug. I do not have in-depth knowledge of DTM nor the protocol used, but from variable naming, structure of the code, and overall appearance, this looks like a classical example of erroneously using "boolean and" instead of "bitwise and". I have filed an internal bug report.

    Regards,
    Terje

Reply
  • Hi,

    Thank you for reporting this bug. It is highly appreciated!

    Yes. This indeed looks like a bug. I do not have in-depth knowledge of DTM nor the protocol used, but from variable naming, structure of the code, and overall appearance, this looks like a classical example of erroneously using "boolean and" instead of "bitwise and". I have filed an internal bug report.

    Regards,
    Terje

Children
Related