Hi,
I am interested in testing the capability of Bluetooth 5's long range.
I have two nRF52840 dongles (pca10059 v1.0.0). So far I have had one dongle using nRF Connect v2.5.0 - Bluetooth Low Energy app on Windows 10 to scan and have attempted to program the second dongle with the ble_app_blinky_pca10059_s140 example (from nRF_SDK_15.1.0), slightly modified to advertise using coded PHY (this has not been successful).
I just want to test what rssi values I get at different distances using this long range feature, if anyone can suggest an easy way to do this using the two dongles I have that would be great.
Some other questions I have.
1. Does the nRF Connect - Bluetooth Low Energy app scan for coded PHY advertisements by default if I am using an nRF52840 dongle? Assuming I got one dongle to correctly advertise using coded PHY, would it show up on the Connect - BLE app when scanning with the other dongle?
2. I have been unsuccessful in changing the ble_app_blinky example to advertise using coded PHY. The code snippets below reflect the only changes I have made to the example in my attempts.
// Set advertising parameters. memset(&adv_params, 0, sizeof(adv_params)); adv_params.primary_phy = BLE_GAP_PHY_CODED; adv_params.secondary_phy = BLE_GAP_PHY_CODED; adv_params.duration = APP_ADV_DURATION; adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED; //from not extended and scannable adv_params.p_peer_addr = NULL; adv_params.filter_policy = BLE_GAP_ADV_FP_ANY; adv_params.interval = APP_ADV_INTERVAL; err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &adv_params); APP_ERROR_CHECK(err_code);
/**@brief Struct that contains pointers to the encoded advertising data. */ static ble_gap_adv_data_t m_adv_data = { .adv_data = { .p_data = m_enc_advdata, .len = BLE_GAP_ADV_SET_DATA_SIZE_MAX }, .scan_rsp_data = { .p_data = NULL, .len = 0 //was as abve } };
In this case the green LED that is supposed to turn on when advertising does not turn on.
I have also tried leaving the code unchanged from when I initially downloaded it and only adding secondary_phy = BLE_GAP_PHY_CODED
// Set advertising parameters. memset(&adv_params, 0, sizeof(adv_params)); adv_params.primary_phy = BLE_GAP_PHY_1MBPS; adv_params.secondary_phy = BLE_GAP_PHY_CODED; adv_params.duration = APP_ADV_DURATION; adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED; //from not extended and scannable adv_params.p_peer_addr = NULL; adv_params.filter_policy = BLE_GAP_ADV_FP_ANY; adv_params.interval = APP_ADV_INTERVAL; err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &adv_params); APP_ERROR_CHECK(err_code);
/**@brief Struct that contains pointers to the encoded advertising data. */ static ble_gap_adv_data_t m_adv_data = { .adv_data = { .p_data = m_enc_advdata, .len = BLE_GAP_ADV_SET_DATA_SIZE_MAX }, .scan_rsp_data = { .p_data = m_enc_scan_response_data, .len = BLE_GAP_ADV_SET_DATA_SIZE_MAX } };
In this case the dongle is advertising (LED is green and I can see it in scan) but I don't think it is using the long range (coded PHY)
Any help/suggestions is appreciated.
Thanks, Reece