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

Why can't I add custom UUID?

Hi,

I'm trying to test adding my own custom service, but have errors when I tried to add a 128bit UUID, the test code is simple, in the service_init() function, I just added the following codes:

ble_uuid128_t service_uuid = {{0x68, 0x26, 0xed, 0x42, 0x01, 0x68, 0xbe, 0xa1, 0x5e, 0x48, 0x7c, 0x8c, 0x36, 0xd5, 0x6d, 0x23}};
ble_uuid_t short_uuid = {0x0001, BLE_UUID_TYPE_VENDOR_BEGIN};

err_code = sd_ble_uuid_vs_add(&service_uuid, &short_uuid.type);
APP_ERROR_CHECK(err_code);

the sd_ble_uuid_vs_add() call is put after the call of the nrf_ble_qwr_init();

the error code is 4, which is NRF_ERROR_NO_MEM, in the API reference it says that means " there are no more free slots for VS UUIDs", how can I add more slots?

The code was based on the ble_app_template, it compiles with no error.

Thanks for help.

Parents Reply Children
No Data
Related