sig member service UUID vs vendor specific UUID

Hi All, 

My team recently reserved a custom service UUID with the Bluetooth SIG, and we'd like to replace the custom 128-bit UUID we had been using in our products. Can I get rid of all the calls in the firmware to store a vendor specific UUID with the softdevice (i.e sd_ble_uuid_vs_add()), or should I still be storing this shorter UUID?

Thanks!

patjshan

Parents
  • Hi,

    You should not add a custom UUID type for the service which you have reserved a custom 16 bit UUID for from the Bluetooth SIG, but rather use BLE_UUID_TYPE_BLE as is done for the SIG defined services.

    Please note however that you most likely have characteristic UUIDs which are not registered with the Bluetooth SIG and therefore you may still need the custom UUID type for those. Typically the same custom base UUID has been used both for the service and for its characteristics, in which case the custom base UUID must still be registered.

    There is an example of how to do this with a SoftDevice and the nRF5 SDK, since the UUIDs used for the BLE DFU solution are 16 bit UUIDs registered with the Bluetooth SIG. The characteristic UUIDs are however 128 bit, which means we still use sd_ble_uuid_vs_add() for the characteristics.

    The implementation of the DFU service is found at <sdk folder>/components/libraries/bootloader/ble_dfu/, with the service itself set up in nrf_dfu_ble.c in the function ble_dfu_init(). You will find there, that for the Service UUID, which we registered with the Bluetooth SIG, we use the macro BLE_UUID_BLE_ASSIGN() for setting up a ble_uuid_t structure to use the base UUID for 16 bit UUIDs with our registered 16 bit UUID of 0xFE59 defined as BLE_DFU_SERVICE_UUID in nrf_dfu_ble.h.

    Please note that in ble_dfu_init(), after setting up the service, a vendor specific base UUID is still added, for use by the characteristics.

    Regards,
    Terje

Reply
  • Hi,

    You should not add a custom UUID type for the service which you have reserved a custom 16 bit UUID for from the Bluetooth SIG, but rather use BLE_UUID_TYPE_BLE as is done for the SIG defined services.

    Please note however that you most likely have characteristic UUIDs which are not registered with the Bluetooth SIG and therefore you may still need the custom UUID type for those. Typically the same custom base UUID has been used both for the service and for its characteristics, in which case the custom base UUID must still be registered.

    There is an example of how to do this with a SoftDevice and the nRF5 SDK, since the UUIDs used for the BLE DFU solution are 16 bit UUIDs registered with the Bluetooth SIG. The characteristic UUIDs are however 128 bit, which means we still use sd_ble_uuid_vs_add() for the characteristics.

    The implementation of the DFU service is found at <sdk folder>/components/libraries/bootloader/ble_dfu/, with the service itself set up in nrf_dfu_ble.c in the function ble_dfu_init(). You will find there, that for the Service UUID, which we registered with the Bluetooth SIG, we use the macro BLE_UUID_BLE_ASSIGN() for setting up a ble_uuid_t structure to use the base UUID for 16 bit UUIDs with our registered 16 bit UUID of 0xFE59 defined as BLE_DFU_SERVICE_UUID in nrf_dfu_ble.h.

    Please note that in ble_dfu_init(), after setting up the service, a vendor specific base UUID is still added, for use by the characteristics.

    Regards,
    Terje

Children
Related