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

  • But does sd_ble_uuid_vs_add() function ouput uuid type of p_vs_uuid in p_uuid_type parameter? And p_uuid_type is one of three: BLE_UUID_TYPE_UNKNOWN, BLE_UUID_TYPE_BEL, BLE_UUID_TYPE_VENDOR_BEGIN. Then when adding service, it input the p_uuid_type in sd_ble_gatts_service_add()'s paramter in uart example. But if I add VS UUID twice and then add service, I think softdevice add service in latest added VS UUID, doesn't it?

Reply
  • But does sd_ble_uuid_vs_add() function ouput uuid type of p_vs_uuid in p_uuid_type parameter? And p_uuid_type is one of three: BLE_UUID_TYPE_UNKNOWN, BLE_UUID_TYPE_BEL, BLE_UUID_TYPE_VENDOR_BEGIN. Then when adding service, it input the p_uuid_type in sd_ble_gatts_service_add()'s paramter in uart example. But if I add VS UUID twice and then add service, I think softdevice add service in latest added VS UUID, doesn't it?

Children
No Data
Related