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 can I use a vendor specific UUID?

When I try to make a custom service with the S110, how do I set the service and characteristics up to use a custom 128-bit UUID instead of a 16-bit one, based on the Bluetooth SIG base?

  • Using a vendor specific UUID is basically a two-step process:

    1. Add your custom base UUID to the stack by using sd_ble_uuid_vs_add(). Store the value returned to you in the p_type parameter of this function call.
    2. Set the type of all ble_uuid_t-s that should use this base to the value returned to you from sd_ble_uuid_vs_add(). When you set this field to your custom type instead of to BLE_UUID_TYPE_BLE, the value will be used on top of the custom base UUID you specified instead of on top of the Bluetooth SIG base.

    Behind the scenes, sd_ble_uuid_vs_add() will add the base UUID to the softdevice's internal list of base UUIDs, and return the table index for this UUID in the type field. When using the type in a ble_uuid_t later, the softdevice can look up the base used in this same table by using this index.

    I've also attached a small pseudo-code snippet that shows the essentials of this scheme.


  • How do I get hold of this link? or any others....They all seem to be "Web page not found"

  • Maybe for future SDK revisions, if you take a parameter that says or "_type" or such, it's usually a good idea to limit that to enumerables.

    At first glance, this reads to me "the type of UUID". In reality, it is a handle to the stored 128b UUID in the SD. I'm renaming mine to uuid_handle to match char_handle and conn_handle. Guess it's just a philosophical point.

  • @olha

    the current or default UUID is ABCDxxxx-EF12-3456-7890-ABCDEF123456 as a "base UUID" then we can change xxxx for characteristic.

    is it possible to make the base uuid like this ABCD3456-xxxx-3456-7890-ABCDEF123456 to change the xxxx position ?

    i want to chnage xxxx for my diffrent characterstic uuid