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

SDK 16 nRF52840 DK PHY_CODED Central and Peripheral

Still having trouble getting a simple Blinky example running on two nRF52840 DK boards configured for a long range PHY_CODED connection. 

I've looked through this post -> https://devzone.nordicsemi.com/f/nordic-q-a/40476/unable-to-convert-to-long-range-after-looking-at-umpteen-examples--/157300#157300

I can get both boards advertising/scanning by observing the Debug log as well as the corresponding LEDs, but the boards still will not connect. 

Also wondering if there was a similar approach with the most current Softdevice and SDK?

Thanks!

Sam

  • Update: It seems to be working when I implement the following approach. 

    1.) Advertising as normal in PHY_1MBPS Channels

    2.) Upon initiating the connection, I have the peripheral firmware calling the sd_ble_gap_phy_update() function within the BLE_GAP_EVT_CONNECTED event.

    A) Here I insert the following code to implement the above function

    ble_gap_phys_t const phys =
        {
            .rx_phys = BLE_GAP_PHY_CODED,
            .tx_phys = BLE_GAP_PHY_CODED,
        };
    err_code = sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys);
    APP_ERROR_CHECK(err_code);
    NRF_LOG_INFO("PHY updated to CODED");

    3.) Without changing anything in the Central Blinky example, I can successfully connect two nRF52840 DKs and I can observe the successful connection via the LEDs and the Debug Log that reads out "PHY updated to CODED" as expected from the above code.

    So it appears I this was successful, am I correct here? Is the connection operating on the 125kbps mode with long range capabilities? Looking for someone to verify before I go out and test the range. 

    Thanks!

    Sam

  • Thank you for your help here Amanda. Still having issues getting two boards to connect. 

    I'm using the example applications you provided above... everything compiles and flashes correctly. I can observe the LEDs and the Debug log to confirm that both boards are scanning and advertising as they should. But the boards still will not connect. I've tried each application on multiple boards so I'm just not sure what could be the issue. I've been running them on fresh SDK16 and I did not modify the application at all. Mystery! 

  • UPDATE

    I attached an antenna to one board via uFL connector and they immediately connected. Go fish. 

Related