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

When I use additional VS UUID, should I...

When I use additional VS UUID, should I use sd_ble_uuid_vs_add(), se_ble_gatts_service_add() in order? example, sd_ble_uuid_vs_add(); <- VS1 UUID

se_ble_gatts_service_add(); <- Service1 related to VS1

se_ble_gatts_service_add(); <- Service2 related to VS1

sd_ble_uuid_vs_add(); <- VS2 UUID

se_ble_gatts_service_add(); <- Service3 related to VS2

se_ble_gatts_service_add(); <- Service4 related to VS2

otherwise, Can I add VS UUIDs first and then add services? example,

sd_ble_uuid_vs_add(); <- VS1 UUID

sd_ble_uuid_vs_add(); <- VS2 UUID

se_ble_gatts_service_add(); <- Service1 related to VS1

se_ble_gatts_service_add(); <- Service2 related to VS1

se_ble_gatts_service_add(); <- Service3 related to VS2

se_ble_gatts_service_add(); <- Service4 related to VS2

it assume that configuration below is done. p_ble_enable_params->common_enable_params.vs_uuid_count = 2; in softdevice_enable_get_default_config()

Parents
  • FormerMember
    0 FormerMember

    Yes, you can add the UUIDs first and then add the services.

    The output parameter of sd_ble_uuid_vs_add(), p_uuid_type, is the reference to the added UUID. For how to refer to an added UUID when adding a service to it, see the example ble_app_uart --> function ble_nus_init().

    Update 30.01.2017: It is no problem to first add two UUIDs and then add the first UUID to a service: image description

Reply
  • FormerMember
    0 FormerMember

    Yes, you can add the UUIDs first and then add the services.

    The output parameter of sd_ble_uuid_vs_add(), p_uuid_type, is the reference to the added UUID. For how to refer to an added UUID when adding a service to it, see the example ble_app_uart --> function ble_nus_init().

    Update 30.01.2017: It is no problem to first add two UUIDs and then add the first UUID to a service: image description

Children
Related