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

Related