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

Related to BLE lon range

Dear nordic

I changed my BLE application to coded phy for long range (chip used nrf52840) . application works fine(debug). 

But i cant see any advertising  in smart phone BLE appliation's 

I need a help to see my device advertising packet . I think device advertising has no problem but its not seen in smart phones  

can you help me to find out why smart phone not detect the advertisings.

is it any other way to find device properly advertise or not?

need some helps

Parents Reply Children
  • Hi Alan,

    That the phone supports BT5 does not mean it supports DLE or coded phy, since these features are optional, so you don't need to have them to support BT5.

    You can check which features are supported if you take a sniffer trace and see the feature exchange between phone and nRF52840. You can use nRF sniffer for example.

    But be aware that we haven't seen any phone that supports coded PHY in the market yet.

    If you want to experiment with all the features for Bluetooth 5 I recommend you purchasing two nRF52840 Preview Development Kits.

    See this blog post about how you can test the long range (with LE Coded PHY) feature with 2 nRF52840 DK here https://devzone.nordicsemi.com/b/blog/posts/testing-long-range-coded-phy-with-nordic-solution-it-simply-works-922075585

    Best Regards,

    Marjeris

  • That the phone supports BT5 does not mean it supports DLE or coded phy, since these features are optional

    Indeed.

    And that doesn't just apply to phones: it applies to any device claiming "BT5" support - eg, the nRF52832 & nRF52810 both state "BT5" support, but do not have Coded PHY:

    https://devzone.nordicsemi.com/f/nordic-q-a/39532/is-it-only-nrf52840-s140-which-support-bt5-long-range-coded-phy

  • Thanks for your reply i need one more help i tested BLE central relay example for long range 

    i dont know it is right procedure to setting

    can you check that?

    I changed in ble_advertising .c like below(bolded below)

    uint32_t ble_advertising_init(ble_advertising_t * const p_advertising,
    ble_advertising_init_t const * const p_init)
    {
    uint32_t ret;
    if ((p_init == NULL) || (p_advertising == NULL))
    {
    return NRF_ERROR_NULL;
    }
    if (!config_is_valid(&p_init->config))
    {
    return NRF_ERROR_INVALID_PARAM;
    }

    p_advertising->adv_mode_current = BLE_ADV_MODE_IDLE;
    p_advertising->adv_modes_config = p_init->config;
    p_advertising->conn_cfg_tag = BLE_CONN_CFG_TAG_DEFAULT;
    p_advertising->evt_handler = p_init->evt_handler;
    p_advertising->error_handler = p_init->error_handler;
    p_advertising->current_slave_link_conn_handle = BLE_CONN_HANDLE_INVALID;
    p_advertising->p_adv_data = &p_advertising->adv_data;

    memset(&p_advertising->peer_address, 0, sizeof(p_advertising->peer_address));

    // Copy advertising data.
    if (!p_advertising->initialized)
    {
    p_advertising->adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET;
    }
    p_advertising->adv_data.adv_data.p_data = p_advertising->enc_advdata;
    p_advertising->adv_data.adv_data.len = BLE_GAP_ADV_SET_DATA_SIZE_MAX;

    ret = ble_advdata_encode(&p_init->advdata, p_advertising->enc_advdata, &p_advertising->adv_data.adv_data.len);
    VERIFY_SUCCESS(ret);

    if (&p_init->srdata != NULL)
    {
    p_advertising->adv_data.scan_rsp_data.p_data = p_advertising->enc_scan_rsp_data;
    p_advertising->adv_data.scan_rsp_data.len = BLE_GAP_ADV_SET_DATA_SIZE_MAX;

    ret = ble_advdata_encode(&p_init->srdata,
    p_advertising->adv_data.scan_rsp_data.p_data,
    &p_advertising->adv_data.scan_rsp_data.len);
    VERIFY_SUCCESS(ret);
    }
    else
    {
    p_advertising->adv_data.scan_rsp_data.p_data = NULL;
    p_advertising->adv_data.scan_rsp_data.len = 0;
    }

    // Configure a initial advertising configuration. The advertising data and and advertising
    // parameters will be changed later when we call @ref ble_advertising_start, but must be set
    // to legal values here to define an advertising handle.
    p_advertising->adv_params.primary_phy = BLE_GAP_PHY_CODED;
    p_advertising->adv_params.duration = p_advertising->adv_modes_config.ble_adv_fast_timeout;
    p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED;
    p_advertising->adv_params.p_peer_addr = NULL;
    p_advertising->adv_params.filter_policy = BLE_GAP_ADV_FP_ANY;
    p_advertising->adv_params.interval = p_advertising->adv_modes_config.ble_adv_fast_interval;

    ret = sd_ble_gap_adv_set_configure(&p_advertising->adv_handle, NULL, &p_advertising->adv_params);
    VERIFY_SUCCESS(ret);

    p_advertising->initialized = true;
    return ret;
    }

    above two line i changed 

     is it any wrong in my procedure i need some help

  • uint32_t ble_advertising_init(ble_advertising_t            * const p_advertising,
                                  ble_advertising_init_t const * const p_init)
    {
        uint32_t ret;
        if ((p_init == NULL) || (p_advertising == NULL))
        {
            return NRF_ERROR_NULL;
        }
        if (!config_is_valid(&p_init->config))
        {
            return NRF_ERROR_INVALID_PARAM;
        }
    
        p_advertising->adv_mode_current               = BLE_ADV_MODE_IDLE;
        p_advertising->adv_modes_config               = p_init->config;
        p_advertising->conn_cfg_tag                   = BLE_CONN_CFG_TAG_DEFAULT;
        p_advertising->evt_handler                    = p_init->evt_handler;
        p_advertising->error_handler                  = p_init->error_handler;
        p_advertising->current_slave_link_conn_handle = BLE_CONN_HANDLE_INVALID;
        p_advertising->p_adv_data                     = &p_advertising->adv_data;
    
        memset(&p_advertising->peer_address, 0, sizeof(p_advertising->peer_address));
    
        // Copy advertising data.
        if (!p_advertising->initialized)
        {
            p_advertising->adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET;
        }
        p_advertising->adv_data.adv_data.p_data = p_advertising->enc_advdata;
        p_advertising->adv_data.adv_data.len    = BLE_GAP_ADV_SET_DATA_SIZE_MAX;
    
        ret = ble_advdata_encode(&p_init->advdata, p_advertising->enc_advdata, &p_advertising->adv_data.adv_data.len);
        VERIFY_SUCCESS(ret);
    
        if (&p_init->srdata != NULL)
        {
            p_advertising->adv_data.scan_rsp_data.p_data = p_advertising->enc_scan_rsp_data;
            p_advertising->adv_data.scan_rsp_data.len    = BLE_GAP_ADV_SET_DATA_SIZE_MAX;
    
            ret = ble_advdata_encode(&p_init->srdata,
                                      p_advertising->adv_data.scan_rsp_data.p_data,
                                     &p_advertising->adv_data.scan_rsp_data.len);
            VERIFY_SUCCESS(ret);
        }
        else
        {
            p_advertising->adv_data.scan_rsp_data.p_data = NULL;
            p_advertising->adv_data.scan_rsp_data.len    = 0;
        }
    
        // Configure a initial advertising configuration. The advertising data and and advertising
        // parameters will be changed later when we call @ref ble_advertising_start, but must be set
        // to legal values here to define an advertising handle.
        p_advertising->adv_params.primary_phy     = BLE_GAP_PHY_CODED;
        p_advertising->adv_params.duration        = p_advertising->adv_modes_config.ble_adv_fast_timeout;
        p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED;
        p_advertising->adv_params.p_peer_addr     = NULL;
        p_advertising->adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
        p_advertising->adv_params.interval        = p_advertising->adv_modes_config.ble_adv_fast_interval;
    
        ret = sd_ble_gap_adv_set_configure(&p_advertising->adv_handle, NULL, &p_advertising->adv_params);
        VERIFY_SUCCESS(ret);
    
        p_advertising->initialized = true;
        return ret;
    }
    

    just change phy and type.

Related