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

how to change the lenth of UUID

Hi: i use ble_app_uart project and want to change the UUID lenth(128 bit) to be 32 bit;but i change "nus_base_uuid" to be 4 byte and change "uuid128[16]" to be "uuid128[4]";but uuid is not be changed when i use lightblue read it;how should i do that uuid lenth can be changed to be 32 bit;

what i changed in the project as below,two parts:

   uint32_t ble_nus_init(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init)
{
    uint32_t        err_code;
    ble_uuid_t      ble_uuid;
    ble_uuid128_t   nus_base_uuid = {0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0,
                                     0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E};


   typedef struct
{ 
    unsigned char uuid128[16];
} ble_uuid128_t;
Related