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

Issue with simultaneous 16-bit UUID Heart Rate Service example and blank 128-bit vendor specified custom service

Hi. I am currently using an nRF52840 DK board and SDK 17.0.2.

I require 16-bit heart rate service UUID to work with a 128-bit vendor specified custom service.

When I create the custom service and tested alone, it is working fine.

However, when I tested with the heart rate service there is an issue.

The issue is show in the pic below:

The error code after the call of ble_advertising_init has no value.

Then goes to NRF_BREAKPOINT_COND

I require assistance in this issue.

Thank you and appreciate the help. 

Parents
  • Hi,

    What do you mean by error code having no value? Is it just that you are debugging optimized code? You need to disable optimization when inspecting code - if using a SES example project, just select the Debug build target.

    I see from your debugger screenshot that you are at VERIFY_SUCCESS for the return value from uuid_list_encode(). I assume that is because that is where the error is detected, meaning that err_code has a value other than 0 (NRF_SUCCESS)? Please confirm what the error code is and from where. That should give a good indication on what the issue is.

    Assuming it is uuid_list_encode() then the error is likely from sd_ble_uuid_encode(), and should be either NRF_ERROR_INVALID_ADDR if an invalid pointer is used or NRF_ERROR_INVALID_PARAM if an invalid UUID type is used. I suspect the latter?. Depending on which base UUID you add first, the type will differ (first added becomes BLE_UUID_TYPE_VENDOR_BEGIN = 0x02, second 0x03, etc.). It would only fit if you have more than one custom UUID though, which is not indicated by your post.

Reply
  • Hi,

    What do you mean by error code having no value? Is it just that you are debugging optimized code? You need to disable optimization when inspecting code - if using a SES example project, just select the Debug build target.

    I see from your debugger screenshot that you are at VERIFY_SUCCESS for the return value from uuid_list_encode(). I assume that is because that is where the error is detected, meaning that err_code has a value other than 0 (NRF_SUCCESS)? Please confirm what the error code is and from where. That should give a good indication on what the issue is.

    Assuming it is uuid_list_encode() then the error is likely from sd_ble_uuid_encode(), and should be either NRF_ERROR_INVALID_ADDR if an invalid pointer is used or NRF_ERROR_INVALID_PARAM if an invalid UUID type is used. I suspect the latter?. Depending on which base UUID you add first, the type will differ (first added becomes BLE_UUID_TYPE_VENDOR_BEGIN = 0x02, second 0x03, etc.). It would only fit if you have more than one custom UUID though, which is not indicated by your post.

Children
Related