This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

How to set Service UUID for central and peripheral

Hi. I'm using nRF51822AC, SDK12.2.0, S130 as central and peripheral.

Q1. What's "sd_ble_uuid_vs_add" function? is it for setting service UUID? Q2. If Q1 yes, how to change service uuid?

for example) I want to set service uuid as below.

For central : #define LBS_UUID_BASE {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15,
0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00}

For periphral : #define p_BASE_UUID {0x00, 0x00, 0x00, 0x30, 0x52, 0xD0, 0x00, 0x00, 0, 1, 2, 3, 4, 5, 6, 7}

and I made source code as below. ......

ble_uuid128_t lbs_base_uuid = {LBS_UUID_BASE};

err_code = sd_ble_uuid_vs_add(&lbs_base_uuid, &p_ble_lbs_c->uuid_type);
if (err_code != NRF_SUCCESS)
{
    return err_code;
}
VERIFY_SUCCESS(err_code);

......

ble_uuid128_t p_base_uuid = p_BASE_UUID;
err_code = sd_ble_uuid_vs_add(&p_base_uuid, &p_m_p->uuid_type);
if (err_code != NRF_SUCCESS)
{
    return err_code;
}
VERIFY_SUCCESS(err_code);

But it's service UUID in advertising data is LBS_UUID_BASE.

How can I set p_BASE_UUID in advertising data?

I need your help.

Parents Reply Children
No Data
Related