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

Changing base UUID of Nordic UART service causes it to stop working

I have successfully set up UART/Serial Port Emulation over BLE example. I have modified it so that it works with two nRF51 DKs, one acting as a central and other acting as a peripheral.

The base UUID for this service by default is

{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}

but I would like to use my own base UUID. For starters, I tried changing just one word (4th, 0x22):

{0x9E, 0xCA, 0xDC, 0x22, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}

I made sure that new UUID is the same on both projects, central and peripheral. However, after this change, the DK's won't even pair anymore.

What am I missing?

Parents
  • The base UUID is actually defined twice in ble_app_uart_c_S120.

    Once in ble_uart_c_init():

    ble_uuid128_t   nus_base_uuid = {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}};
    

    Once in main.c:

    uint8_t   nus_service_uuid[16] = {0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0,
                                         0x93, 0xF3, 0xA3, 0xB5, 0x01, 0x00, 0x40, 0x6E};
    

    I'm guessing you didn't make the modification in both places?

    I'm not sure why it is made like this, I'll have a talk with the developer.

Reply
  • The base UUID is actually defined twice in ble_app_uart_c_S120.

    Once in ble_uart_c_init():

    ble_uuid128_t   nus_base_uuid = {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}};
    

    Once in main.c:

    uint8_t   nus_service_uuid[16] = {0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0,
                                         0x93, 0xF3, 0xA3, 0xB5, 0x01, 0x00, 0x40, 0x6E};
    

    I'm guessing you didn't make the modification in both places?

    I'm not sure why it is made like this, I'll have a talk with the developer.

Children
Related