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

A problem in BLE service discovery

Hi,

I am developing a product based on  SDK v15.3.0 and SoftDevice v6.1.1. my product acts as a BLE central device.

On the peripheral side, is an iOS application which contains a service with "fb349b5f8000008000100000fdff0000" UUID. "fb349b5f800000800010000000000000" is an standard base uuid and when i trye to add this uuid with "sd_ble_uuid_vs_add" function, as uuid_type i get '1' which means that this uuid could not be added as custom 128-bit base uuid.

Then I try to register {uuid: 0xFFFD, UUID_Type: 1} with "ble_db_discovery_evt_register" function, to search for "fb349b5f8000008000100000fdff0000" service in iOS gatt table.

during service discovery, Softdevice sends a "FindByTypeValueRequest" with value 0xFDFF in order to find the service in the iOS gatt table, but it receives "FindByTypeValueRespnse" with "attribute not found" error code.

Now can anyone give me a solution, to search for a service with "fb349b5f8000008000100000fdff0000" uuid in the iOS gatt table?

As i said, registering "fb349b5f8000008000100000fdff0000"  as base uuid is not possible in the sofrdevice, and searching with 16-bit uuid "fdff" could n't find the service in the peripheral gatt table.

Thanks

  • Just let me make the problem clear,

    - There is a service with "fb349b5f8000008000100000fdff0000" UUID in the GATT server (which is created by iOS application in an iPhone device)

    - When I want register "fb349b5f800000800010000000000000" 128-bit uuid with sd_ble_uuid_vs_add function, as uuid.type i get 1(but with registering another 128-bit uuid i get 2 which means 128-bit uuid is registered successfully)

    With searching with 16-bit uuid "FFFD" i could not find service in the client services, and i can not search for 128-bit version "fb349b5f8000008000100000fdff0000" because i can't register "fb349b5f800000800010000000000000" uuid with sd_ble_uuid_vs_add  function.

    Now I want to know there is any way to discover "fb349b5f8000008000100000fdff0000" service and its characteristics in the client?

    P.S

    In   you can see that softdevice sends a FindByTypeRequest with 16-bit version of the uuid. how can I ask from softdevice to send this request with fb349b5f8000008000100000fdff0000 uuid?

  • The base uuid you are trying to write is the BT UUID: https://www.bluetooth.com/specifications/assigned-numbers/service-discovery/

    You should not register the BT UUID with the sd_ble_uuid_vs_add().

    Instead you can call sd_ble_gatts_characteristic_add() directly with UUID type set to BLE_UUID_TYPE_BLE.

    The BT base UUID should only be used with BT 16-bit UUID assigned by BT SIG.

  • Thank you for your response, but I think you did not get my point.

    As I said I use nrf52 as a central device, Therefore I didn't implement any service on nrf52 side and I do not want to add any characteristic.

    I want to discover service on the peripheral side using the nordic service discovery library, and the target service's UUID is "fb349b5f8000008000100000fdff0000". 

    i register {uuid: 0xFFFD, UUID_Type: 1} with "ble_db_discovery_evt_register" function, to search for "fb349b5f8000008000100000fdff0000" service in peripheral gatt table.

    during service discovery, Softdevice sends a "FindByTypeValueRequest" with value 0xFDFF in order to find the service in the peripheral, but it receives "FindByTypeValueRespnse" with "attribute not found" error code.

    Now i want to find a way that soft device send FindByTypeValueRequest with "fb349b5f8000008000100000fdff0000", not 0xFFFD,

  • But can you confirm that this is indeed the BT SIG base uuid? It looks very much like it.

    If it's the BT SIG base uuid, then the peripheral device should respond to the FindByTypeValueRequest when using 16-bit UUID. Though it may be that your byte ordering is wrong, so you may try both 0xFDFF and 0xFFFD.

  • Thank you so much,

    "But can you confirm that this is indeed the BT SIG base UUID", Yes it is BT SIG base UUID, and for this reason when I try to add this base UUID softdevice returns 1 as UUID.type.

    "If it's the BT SIG base UUID, then the peripheral device should respond to the FindByTypeValueRequest when using 16-bit UUID.", yes it should, but it does not,

    "Though it may be that your byte ordering is wrong, so you may try both 0xFDFF and 0xFFFD.", I've checked this, but it did not work.

    Could you please look at the attached trace. this trace contains service discovery of the iOS device with the nrfConnect desktop version. in packet 660 iOS returns 128-bit UUID version of my service. while packet 626 it returns 16-bit version of common services like Generic access profile. while my service is also standard service (it is FIDO service) which could use BT SIG base uuid. i think for this reason iOS returns "attribute not found" error code. 

    attached trace -> iphone_and_nrfconnect_desktop(rsa).pcapng

     

Related