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

nRF52840 not appearing when scanning in the NRFConnect application (Using the Long-Range example 1MPBS)

Hi,

I was trying out the long range example provided on the NordicPlayground GitHub repo, and worked great when communicating between two nRF52840 dev kits. I however noticed that it wasn't possible to scan for the peripheral device when using the application provided by nordic NRFConnect(Using 1MBPS phy), but when using the nRF52840 central device, it could find it and achieve a connection between these two devices? Are there any restrictions that cause the mobile phone not to find the peripheral device? Or are there any limitations in the SD 6.0.0-6 alpha that causes the device not to be scanned when the board advertises?   

Long-range example used

I noticed when assigning the scannable parameter with 1 that the dev kit returns invalid params??

    
    adv_params.properties.connectable = 1;
    adv_params.properties.scannable = 1;    
    adv_params.properties.legacy_pdu = 0;
    adv_params.p_peer_addr   = NULL;
    adv_params.fp            = BLE_GAP_ADV_FP_ANY;
    adv_params.interval      = APP_ADV_INTERVAL;
    adv_params.duration      = APP_ADV_TIMEOUT_IN_SECONDS * 100;
#if defined(S140)
    adv_params.primary_phy   = BLE_GAP_PHY_1MBPS;
    adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;
#else
    adv_params.primary_phy   = BLE_GAP_PHY_1MBPS;
    adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;
#endif

    NRF_LOG_INFO("Starting advertising.");

    ret_code_t err_code = sd_ble_gap_adv_start(BLE_GAP_ADV_SET_HANDLE_DEFAULT, &adv_params, APP_BLE_CONN_CFG_TAG);
    

  • Hi,

    In the example on github the peripheral advertises, as you say, on coded phy (aka long range) and the central is also scanning on coded phy. Devices must advertise and scan on the same phy to be able to discover each other. I'm not aware of any phones compatible with coded phy. 

  • Hello, first of all thanks for helping out.

    I have as shown in the included code above set the primary/secondary phy to 1MBPS, am I missing something? Also I noticed that the scannable isn't possible to be set since the application would return invalid params when running the sd_ble_gap_adv_start() function. Could maybe this be the cause of the device not appearing when scanning through the mobile phone?

    EDIT 16/4-18: I Successfully managed to scan for the device today after setting the legacy_pdu = 1 and scannable = 1, but don't understand the functionality of the legacy pdu?

Related