Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Peripheral Heart Rate Monitor with Coded PHY on nRF5_SDK_17.1.0

Hi,

Do you have an example of the \ble_peripheral\ble_app_hrs with Coded PHY for the nRF5_SDK_17.1.0? I have tried to use the BLE_GAP_PHY_CODED definition in different places of the ble_peripheral\ble_app_hrs, but the LED1 does not flash. What other modifications should be made in the code?

Thanks,

Joel

Parents
  • Hii,

    I want to advertise with CODED_PHY. What I have done before:

    In the advertising_init() function I do the next:

       init.config.ble_adv_primary_phy   = BLE_GAP_PHY_CODED;

       init.config.ble_adv_secondary_phy = BLE_GAP_PHY_CODED;

    In the ble_advertising_init() function I set CODED PHY (fefore it was 1MBPS):

        //p_advertising->adv_params.primary_phy     = BLE_GAP_PHY_1MBPS;
        p_advertising->adv_params.primary_phy     = BLE_GAP_PHY_CODED;

    In the ble_advertising_start() function I have change the else status to CODED_PHY (before it was to 1MBPS):

        if (phy_is_valid(&p_advertising->adv_modes_config.ble_adv_primary_phy))
        {
            p_advertising->adv_params.primary_phy = p_advertising->adv_modes_config.ble_adv_primary_phy;
        }
        else
        {
            //p_advertising->adv_params.primary_phy = BLE_GAP_PHY_1MBPS;
            p_advertising->adv_params.primary_phy = BLE_GAP_PHY_CODED;     
        }

    As something new I have included in the advertising_init() function the next:

        init.config.ble_adv_extended_enabled = true; 

    However, the result is the same: once rebuild the ble_app_hrs examples (with the mentioned modifications), downloaded to the nRF52840-DK and resetted the board, the LED1 doesn't flash. Is like having the board death. Scanning using the nRFConnect app the board doen not appear.

  • Hi Hung,

    I know the usual method. I was trying to evaluate the robustness of Nordic solutions to see if they could fulfill the specs of a project.  The ble_app_hrs was ideal, and I thought an example that could work well on Coded PHY would be enough to adapt it. From the link you gently shared, I see it will be necessary to go quite deeper to customize the code of the ble_app_hrs example.

    Thank you.

    Joel

  • Hi Joel, 

    I'm sorry that I haven't got time to look at your code to check if there is anything wrong. We are in holidays period in Norway. But I suspect that it's just a small invalid parameter that cause the issue. I would suggest to check the error code when you call the advertising function. Please refer to the example to see if there is anything different. 

  • Thank you. I think this ticket can be closed.

    Regards,

    Joel

Reply Children
No Data
Related