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

nRF52833 LR(Long range testing) Set UP for (Coded PHY)

Hi,

We want test nRF52833 support on long range. I referred https://github.com/NordicPlayground/nRF52-ble-long-range-demo.

So as first step we use nRF52840 dongle for advertising and able to advertise. It is verified on Onpluse 6 device as shown in below.

Now for scanning we use nRF52840 DK as mentioned in above link. 

We are facing issue in scanning(central mode). We are not getting any advertise packet on DK. But when i used Oneplus device to advertise as long range we started getting scan responses but with MAC address.

Could you please guide on above?

  • Hi,

    I want to add 2 more things.

    1. We want to implement Long range scanning on nRF52833 chip. But simplicity we want to test in nRF52840 as lots info available on nRF52840. later we migrate on nRF52833. 

    2. How can I set up Data rate to 125 Kbit/s(LE Coded S=8)? 

  • Hi

    Quite a few mobile phones (including the OnePlus 6) states that they support Coded PHY, but are not able to scan and connect to devices advertising in the Coded PHY. Generally, only the latest high-end models.

    It should not be a problem migrating a nRF52840 project to the nRF52833 at a later point.

    In order to set up long range advertising, you need to do the following in your advertising initialization:

    • adv_params.primary_phy and adv_params.secondary_phy must be set to BLE_GAP_PHY_CODED
    • The advertising flag need to be set to adv_data.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    • The advertising type needs to be set either to BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED or BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED 
    • You also need to make sure that scan response data is set to NULL, as this is not supported in the Coded PHY.

    This should already be taken care of in the long range demo that you have linked to though. 

    Best regards,

    Simon

  • Hi Simon,

    We tested Long Range advertising mode.

    I am facing issues in Long range scanning. 

    Configuration is set as below

    init_scan.connect_if_match = false; // true non connectable mode
    init_scan.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;
    m_scan.scan_params.extended =1;
    m_scan.scan_params.active = 0x01;
    m_scan.scan_params.scan_phys = BLE_GAP_PHY_CODED;
    m_scan.scan_params.filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL;
    m_scan.scan_params.interval = interval; // scanning interval
    m_scan.scan_params.window = window; // scanning window

    if(nrf_ble_scan_init(&m_scan, &init_scan, scan_evt_handler) != NRF_SUCCESS )
    {
    APP_ERROR_CHECK(err_code);
    err_code = NRF_FAIL;
    }

    else if(nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_NAME_FILTER, true) != NRF_SUCCESS)
    {
    APP_ERROR_CHECK(err_code);
    err_code = NRF_FAIL;
    }

    Interval and scanning window is set to 10 ms for testing purpose.

    We are getting failures at Scan start function.

    nrf_ble_scan_start(&m_scan);

    Could please suggest what may be the cause of failures?

  • Okay, sorry about the misunderstanding. 

    In order to scan using Coded PHY, you also need to set the NRF_BLE_SCAN_BUFFER to BLE_GAP_SCAN_BUFFER_EXTENDED_MIN (which is 255). What kind of failures are you seeing when you start scanning? 

    Please check out this modified ble_app_uart central example that has been modified to scan for Coded PHY advertisements if you need a template.

    2311.Long_range_15.2.zip

    Best regards,

    Simon

  • Hi Simon,

    Thanks for guidance. I am able to implement both advertising on nRF52840 and scanning on nRF52833.

    There one more query regarding bit rate transmission. We want to test it on both (S=8) 125Kbps and (s=2) 500Kbps setting.

    How can we set this setting?

Related