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

How to get full Service UUID from given BASE UUID

Hi all

I am trying to pair nrf52840 (as a central) with ESP32 (as peripheral).

 Now I want to get the service uuid so that i can pass to advertising service in ESP32 code.How do I get the full-service UUID, I see that in the ble_lbs_c service  UUID is declared as 0x1523 characteristic  UUID as 0x1525 and LBS_UUID_BASE {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00}

I tried to pass the service uuid as #define SERVICE_UUID   "23151212EFDE1523785FEABCD1" on ESP32 program but that didnt work. What is the exact order of the UUID? If you need  details on esp32 code here is the example esp32 program

I am using ble_app_blinky_c example on nrf52840.

Thank you in advance

  • Hi Edvin

    My mistake, I meant to say ...it does get inside name_filter_enabled but  adv_name_compare(p_adv_report, p_scan_ctx)is always false.

    It was a copy/paste  error.

  • Ok. Then you need to debug it when you know it is the correct device, and find out why it returns false.

    One hint when debugging is to apply a second filter before adv_name_compare is called, if you know something else about this specific device. If you know that the address starts with e.g. 0xb5, then you can do a check:

    Fullscreen
    1
    2
    3
    4
    if(p_adv_report-> ... .addr[0] == 0xb5)
    {
    adv_name_compare();
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Why does it not return true?

1 2 3 4