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_advertising.c, secondary phy for extended advertising packet, SDK 15+

Hello,

I think there is an error in ble_advertising.c (SDK 15+).
Line 608, the code is trying to set the secondary phy but checks if the primary phy is valid (ble_adv_primary_phy). 

    if (p_advertising->adv_modes_config.ble_adv_extended_enabled)
    {
        // Use 1MBIT as secondary phy if no phy was selected.
        if (phy_is_valid(&p_advertising->adv_modes_config.ble_adv_primary_phy)) // <== Check secondary phy here
        {
            p_advertising->adv_params.secondary_phy = p_advertising->adv_modes_config.ble_adv_secondary_phy;
        }
        else
        {
            p_advertising->adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;
        }
    }


Best,
Cyril

Parents Reply
  • Hi ,

    thank you for replying me.

    I at first using nRF52840 PDK with pca10056 v0.9.2 using SDK 15.3 to do CODED PHY advertising, I found out the debug was smoothed and never shown any error. The sniffer anyhow only show me 1 advertising packet while the debug terminal info give "fast mode advertising". I changed to nRF52840 DK board with the same code running , it works fine. I  also tried change the .primary_phy to secondary_phy in the bug line, it gives fatal error.

    1. Does the bug affected or simply the PDK is different with DK ?

    2. Besides, the SDK 15.3 support S140 v6.1.1 means if I run the example code to my PDK board, it will auto call the S140 v6.1.1 protocol?

    Thank you once again.

    Regards,

    Kathleen

Children
Related