sd_ble_uuid_vs_add error code 4

Hello All,

I have looked around for answers to my specific issue, however I did not seem to find one that aided me enough to fix my issue.

I have created a BLE profile with BDS and utilized the Nordic plugin to generate the code. Everything seemed to work out well, but I have an issue when initializing my custom service.

The code breaks down when attempting to add a custome base UUID. This is the snippet of code from my service .c file. I traced the code and this is where it breaks.

ble_uuid128_t bds_base_uuid = {{0xD0, 0x70, 0x1F, 0x19, 0x94, 0xB8, 0xF2, 0x86, 0xF5, 0x4A, 0xF5, 0xFF, 0x00, 0x00, 0x84, 0x56}};
uint8_t uuid_type;
err_code = sd_ble_uuid_vs_add(&bds_base_uuid, &uuid_type); <----- Right here.
if (err_code != NRF_SUCCESS)
{
return err_code;
}

My first thought is that I needed to modify the main.c file in this location:

// YOUR_JOB: Use UUIDs for service(s) used in your application.
static ble_uuid_t m_adv_uuids[] = /**< Universally unique service identifiers. */
{
{BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE}
};

But I cannot seem to figure out the correct way.

Here is a trace of my locals from the execution right after the error code is generated. 

If anyone can point me in the right direction or tell me what easy thing is missing I'd very much appreciate it!

Thanks!

Adam

Related