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

Strange current in Long Range Beacon

Hi, I measure current in beacon in Long Range mode. Behind 3 current peaks witch represent TX on channel CH37 CH38 CH39 there is a strange current peak, witch I don't understand. When I switch to 1MBps this current peaks dosn't occur.

Here is my configuration for adv init:

 

/* long range*/
		m_adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
    m_adv_params.primary_phy   	 = BLE_GAP_PHY_CODED;
    m_adv_params.secondary_phy 	 = BLE_GAP_PHY_CODED;
/* 1MBPS  */
//    m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;

  • I thinkg no.

    Here is my full adv init:

    static void advertising_init(void)
    {
        manuf_specific_data.company_identifier = APP_COMPANY_IDENTIFIER;
    		
        manuf_specific_data.data.p_data = (uint8_t *)beaconData;
        manuf_specific_data.data.size   = APP_BEACON_INFO_LENGTH;
    
        // Build and set advertising data.
        memset(&advdata, 0, sizeof(advdata));
    
        advdata.name_type             = BLE_ADVDATA_NO_NAME;
        advdata.flags                 = flags;
        advdata.p_manuf_specific_data = &manuf_specific_data;
    
        // Initialize advertising parameters (used when starting advertising).
        memset(&m_adv_params, 0, sizeof(m_adv_params));
    		
    /* long range*/
    		m_adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
        m_adv_params.primary_phy   	 = BLE_GAP_PHY_CODED;
        m_adv_params.secondary_phy 	 = BLE_GAP_PHY_CODED;
    /* 1MBPS  */
    //    m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
    
    		m_adv_params.p_peer_addr     = NULL;    // Undirected advertisement.
        m_adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
        m_adv_params.interval        = NON_CONNECTABLE_ADV_INTERVAL;
        m_adv_params.duration        = 0;       // Never time out.
        m_adv_params.scan_req_notification = 0;
    
    
        err_code = ble_advdata_encode(&advdata, m_adv_data.adv_data.p_data, &m_adv_data.adv_data.len);
        APP_ERROR_CHECK(err_code);
    
        err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &m_adv_params);
        APP_ERROR_CHECK(err_code);
    }

  • Hi Mateusz

    No, you are not listening for scan requests/responses when advertising nonconnectable and nonscannable. But the extended advertising might be what causes this extra "spike". Could you try advertising in long-range mode "normally" and not extended?

    Best regards,

    Simon

  • hmm..how I can do that? I guess i have to only change:

    m_adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;

    to:

    m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;

    but when I change it, I get error after function:

    err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &m_adv_params);
    APP_ERROR_CHECK(err_code);

    error_code = 0x07 ( NRF_ERROR_INVALID_PARAM ).

    What else I should to change to get non exteneded advertise?
    Advertising in Long Range mode, works only in BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED. I try all other type and it's not working.

  • Hi Mateusz

    You're correct, you have yo use extended advertising for long range. Slip up on my end. I tested this myself on an nRF52840DK. However, we did not get this fourth peak when advertising. Have you tried this on more than one chip? Are you using an nRF52840 DK or a custom chip? Are you using one of our examples or is this your own project? Are you sure you're not doing anything else in addition to advertising?

    If you want, you could upload your project here (preferably with some instructions on your setup) and we can test it here on our end. If you don't want to share your project with the community, just say so and I will set this case to private so that only you and Nordic engineers will be able to see the case.

    Best regards,

    Simon

Related