Characteristic Discovery with 128bit UUID

Hi,

We are evaluating the possibility to connect our nRF52840 to another BLE device but we are facing issues with UUID Nordic handling strategy.

Quickly: 

  • We have a central nRF and two pheripheral. The first is Nordic the second is system in production and we cannot change the SW.
  • We created a custom service on the Nordic pheripheral and it works properly (characteristic discovered sendind data etc.)
  • Later we tried to discovery the service on the second pheripheral.
    Second pheripheral has:
    • SERVICE UUID acbd3540-0211-4126-8c1f-45bcb7722f9e
    • CHAR_1 UUID acbd3540-0211-4126-8c1f-45bcb7722fA0
    • CHAR_2 UUID acbd3540-0211-4126-8c1f-45bcb7722fA1
    • CHAR_3 UUID acbd3540-0211-4126-8c1f-45bcb7722fA2

As you can see the other vendor is adopting the same Nordic strategy for UUID but on 00-01 octet instead of 12-13 octet as Nordic.

We added SERVICE UUID and CHAR_1 UUID to UUID List in the SD (sd_ble_uuid_vs_add(..) ) and we provide 0x3540 to ble_db_discovery_evt_register

It connects to the pheripheal but the discovery fail.
Here the log:

ble_db_disc: Starting discovery of service with UUID 0x3540 on connection handle 0x1

nrf_ble_gq: Adding item to the request queue

nrf_ble_gq: GATTC Primary Services Discovery Request

nrf_ble_gq: SD GATT procedure (2) succeeded on connection handle: 1

nrf_ble_gq: Processing the request queue...

ble_db_disc: Service UUID 0xB03E not found

Did someone solved a similar problem or someone from Nordic can support?

Alessandro

  • Hi Simon,

    sorry I notice now I mixed text with explanation related to a test log of another test.

    Here the pheripheral service  UUID and the characteristic service UUID

    #define PHERIPHERAL_SERVICE_UUID_BASE               \
        {                                       \
            0xB7, 0x5C, 0x49, 0xD2, 0x04, 0xA3, \
                0x40, 0x71,                     \
                0xA0, 0xB5,                     \
                0x35, 0x83,                     \
                0x3E, 0xB0, 0x83, 0x07          \
        }
    
    
    #define PHERIPHERAL_CHARACTERISTIC_UUID_BASE               \
        {                                       \
            0xB8, 0x5C, 0x49, 0xD2, 0x04, 0xA3, \
                0x40, 0x71,                     \
                0xA0, 0xB5,                     \
                0x35, 0x83,                     \
                0x3E, 0xB0, 0x83, 0x07          \
        }

    By the way I am not asking support to debug my code as I simply perfor some test.

    I was shooting blind as there I found no documentation at all about this.

    My real question is:

    Is it possible with nRF52 to perform characteristic discovery with 128UUID totally indipendent from the 128UIID of the service?

    Possible answers are: 

    No it's not possible for limitation in the SD and I will drop my attempt.

    Yes it's possible using this SD function call and I will write new code based on your suggestion.

    Regards

    Alessandro

  • Hi Alessandro

    Yes, it should be possible as long as you reference the correct UUID tag (sd_ble_uuid_vs_add())as I mentioned in my last reply. 

    Best regards,

    Simon

  • Hi Simon,

    happy to know it's possible.

    Justo to be clear.

    First of all I have to add the different UUID with sd_ble_uuid_vs_add() with something like this

    So, I will add all my UUID128 (service and characteristics).

        err_code = sd_ble_uuid_vs_add(&ads_base_uuid, &p_ble_ads_c->uuid_type);
    
        VERIFY_SUCCESS(err_code);

    Later I will have to register the UUID for the discovery event.

    But here my question: I have to do it?

    All the characteristic have the same 16bit UUID so I need to use the 128UUID.

    Here the code I am using up to now. This function accept only 16UUID not 128UUID

        ads_uuid.type = p_ble_ads_c->uuid_type;
        ads_uuid.uuid = ADS_SERVICE_UUID;
    
        return ble_db_discovery_evt_register(&ads_uuid);

    This is why I am asking your support.

    Alessandro

  • Hi

    We will be short on staff during the Holiday period, and delayed replies must be expected. We will be back to full staff on January 3rd. Happy holidays and happy new year!

    I'm not sure I understand your question here, but you need to declare what UUID type you're adding to the service/characteristic the first time around using "sd_ble_uuid_vs_add", but after they have been added, the SoftDevice will keep track of them for you.

    Best regards,

    Simon

  • Hi Simon,

    before my answer I wanted to say:

    I bought a nRF52840 Dongle and with nRF Connect Desktop it performs the service discovery correctly.

    So now I am sure it's possible. I have only to understand how.

    Coming to your our.

    In the example provided by Nordic the central software to start the discovery

    - Declare the UUID128 service address (with sd_ble_uuid_vs_add()

    - Declare the UUID16 base address of the characteristic to be discovered (with ble_db_discovery_evt_register() )

    I cannot do the same as I have UUID128 also for characteristics.

    So what I have to do?

    I tried simply to call the sd_ble_uuid_vs_add also for the characteristic UUID128 but it doesn't work.
    I cannot go ahead shooting bling. .
    I also tried to read documentation but unfortunately Nordic documentation always forward to example and no example cover my  situation (at least I not found it).

    Happy holidays and happy new year!

    Alessandro

Related