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

Customize UUID from ble_app_uart to copy ID from old product

Hey,

we want to change our product-bluetooth-chip for new products.

In the example the 16 Bit UUID overrides the byte 12 and 13 in the 128 bit ID. Where I could change it? I want to override the last 8 bit in the 128 Bit-UUID.

My goal is to replace the existing product without changing the app for the connection.

Parents
  • Hi,

    As you have seen we normally define a base UUID and only change 16 bits of this as that requires less memory. However it is possible to do what you want by adding multiple base UUIDs. If you look at the UART service ble_nus.c you can see that we have a define for the base UUID

    #define NUS_BASE_UUID 

    This is added to using the following function:

        err_code = sd_ble_uuid_vs_add(&nus_base_uuid, &p_nus->uuid_type);
        VERIFY_SUCCESS(err_code);
    
        ble_uuid.type = p_nus->uuid_type;
        ble_uuid.uuid = BLE_UUID_NUS_SERVICE;

    Notice that you need to store the UUID->TYPE for later as you need to reference this when adding services / characteristics.

    In addition to this you also need to assign memory for the vendor specific UUIDs, change NRF_SDH_BLE_VS_UUID_COUNT in sdk_config.h. Then update the ram settings for your application afterwards.

  • Hey,

    I have a constant UUID 128 bit. I only want to change another offset. Not 13 - 14. I need to change the first byte.

    Can you explain with more detail?

    The uuid_type is the same?

Reply Children
Related