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

NRF52840 long range test

Hey guys, I've been trying to do a range test with 2x PCA10056 dev kits. I believe I've set everything up correctly and cannot achieve more than 300-400 meters before the connection drops out (300m after it had rained a lot and 400m on a clear blue sky day). I've also tried tested in different locations in case background noise was an issue but I cannot get close the 1300m that Nordic achieved.

Changes I've made to the hrs client/servers demos:

- Enable the coded PHY. Which appears to be working because the dongle I have cant see the advert from the peripheral but the central connects and notifications are sent and received.

- Increase transmit power to 8dbm (in scanning, advertising and connection). 

Peripheral:

ret_code_t err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);

ret_code_t err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, m_tx_output_power);

Central:

err_code = nrf_ble_scan_start(&m_scan);

err_code = bsp_indication_set(BSP_INDICATE_SCANNING);

err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_SCAN_INIT, 0, m_tx_output_power);



On both peripheral and central:

static int m_tx_output_power = 8;

ble_gap_phys_t phys_settings =
{
.tx_phys = BLE_GAP_PHY_CODED,
.rx_phys = BLE_GAP_PHY_CODED,
};

...

case BLE_GAP_EVT_CONNECTED:
    m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
    err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
    err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle);
    err_code = sd_ble_gap_phy_update(p_gap_evt->conn_handle, &phys_settings);
    err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN, m_conn_handle, m_tx_output_power);
    break;

- reduce NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 23.

I've also tried attaching a external antenna to the coax connector with quoted gain of 6dbi and it made no difference to the range nor rssi reported when advertising. It appears as thought it is still using the onboard antenna.

What am I doing wrong??? Is there anything else I need to change in order to get more range? I'm looking to achieve a connection range of 500m while raining.

I'm using the nRF5SDK160098a08e2 SDK and S140 softdeivce included in the SDK. Attached is my source:

ble_src.zip

Parents Reply Children
  • Hi Simonr,

    Thanks for getting back to me.

    That link doesn't link to any example projects. There's some videos and reports of long range but nothing with code changes (Unless I missed it). 

    I've tried the demo here: nRF5SDK160098a08e2\examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput\

    but when I start the example and type for following:

    - config phy coded

    - run

    I get a warning "Wrong board setup". So I'm not sure where to go from here. Any suggestions on how to use the demo? There is no readme or instructions in the example directory.

    Also there seems to be a bug in the advertising setup here:

    nRF5SDK160098a08e2\components\ble\ble_advertising\ble_advertising.c:ble_advertising_init

    It forces the Phy to BLE_GAP_PHY_1MBPS regardless of config however ble_advertising_start seems to handle the coded phy correctly if it had been setup in ble_advertising_init

    Any pointers would be great!

Related