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

Advertisement with coded phy not possible 6.0.0-6 alpha

Hi,

We are migrating SoftDevice 5.0 -> 6.0.0-6 alpha on sdk 14.2 (s132->s140) in order to be able to evaluate long range. During the migration we stumbled across some problems with the advertisement when setting it to Coded phy, but also during runtime causing an invalid data size error in advertisement start. When we tested it on the provided examples with SD 6.0.0-6 alpha and sdk 14.2, we didn't notice any problems during advertisement. Are there any configurations that is needed to be set in order to allow the coded phy setting???   

Following code works in when using long_range example on nordicplayground GitHub but when using same settings I get a NRF_ERROR 12 (Data_size error). Using 1 or 2 MBPS however seem to be no problem. 

static ble_gap_adv_params_t adv_params = {0};
    
    adv_params.properties.connectable = 1;
    // Setting up the scan response packet is currently not supported when using CODED phy
    adv_params.properties.scannable = 0;    
    adv_params.properties.legacy_pdu = 0;
    adv_params.p_peer_addr   = NULL;
    adv_params.fp            = BLE_GAP_ADV_FP_ANY;
    adv_params.interval      = APP_ADV_INTERVAL;
    adv_params.duration      = APP_ADV_TIMEOUT_IN_SECONDS * 100;
#if defined(S140)
    adv_params.primary_phy   = BLE_GAP_PHY_CODED;
    adv_params.secondary_phy = BLE_GAP_PHY_CODED;
#else
    adv_params.primary_phy   = BLE_GAP_PHY_1MBPS;
    adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;
#endif

We know that the SD 6.0 production is out and could use it, but we started off migrating the project based on the 6.0.0-alpha version and therefore want to use it

Related