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

sd_ble_uuid_vs_add () returns err_code = 16 (#define NRF_ERROR_INVALID_ADDR (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address)

Hi, I am using nRF52832 with S132 softdevice and SDK version 11. I am getting bad memory address error code.

err_code = sd_ble_uuid_vs_add (&base_uuid, &ble_service->uuid_type);
if (err_code != NRF_SUCCESS){
SEGGER_RTT_printf(0, "err_code: %d \n", err_code);
return err_code;
}

Can anybody help me to figure out what could be the reason for such errors? Thank!

Parents
  • Well, the BLE_UUID_TYPE_VENDOR_BEGIN is defined as a 2 in ble_types.h, BLE_NRF_LOCAL_VENDOR_UUID_INDEX is defined as a 0 in my code. I believe BLE_NRF_LOCAL_VENDOR_UUID_INDEX is in case you want to add more than 1 vendor specific UUID to your services. It's not necessary, but it was in the Nordic example I took this code from years ago now, and I've had no need to change it.

    What is ble_vitameter_service->uuid_type set to?

Reply
  • Well, the BLE_UUID_TYPE_VENDOR_BEGIN is defined as a 2 in ble_types.h, BLE_NRF_LOCAL_VENDOR_UUID_INDEX is defined as a 0 in my code. I believe BLE_NRF_LOCAL_VENDOR_UUID_INDEX is in case you want to add more than 1 vendor specific UUID to your services. It's not necessary, but it was in the Nordic example I took this code from years ago now, and I've had no need to change it.

    What is ble_vitameter_service->uuid_type set to?

Children
No Data
Related