Unable to discover service

Hi,

I'm using SDK5 17.1.0 and SD132 v7.3.0. At the moment I'm developing a central device which scans for a peripheral. I did this a few times before with other devices and never had a problem with it. But now, the central is unable to discover the services of the peripheral. In my db discovery event handler I always get the event IDs for BLE_DB_DISCOVERY_SRV_NOT_FOUND and BLE_DB_DISCOVERY_AVAILABLE. I double checked the custom UUID of the service and it's correct. If I use nrf connect on my mobile phone the discovery is completed without any error. 

My service definition looks like this: 

#define DNC_C_BASE_UUID             {0x48, 0x62, 0x6d, 0x47, 0x20, 0x65, 0x63, 0x6e, 0x61, 0x44, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00} 
#define BLE_UUID_DNC_C_SERVICE      0x1000  // UUID of DNC Client Service

and the service I'm looking for looks like this in nrf connect: UUID: 00001000-2020-4461-6e63-6520476d6248

I found this post, but I'm using the peer manager and I also handled this event. By the way, if I change the UUID and advertising search pattern to another device with a different service, I can find it without problems. At the moment I have no idea what I'm missing. Is there a way in the SDK to see all available services of my device instead of searching for a specific UUID?

Best regards,

Christian

Parents Reply
  • Hi Christian,

    That was good news!

    It is a bit hard to tell what exactly is wrong on the Peripheral side, but it looks like a bug in the implementation of the GATT server. According to Core Spec, Vol 3, Part G "4.4 Primary Service Discovery":

    There are two sub-procedures that can be used for primary service discovery: Discover All Primary Services and Discover Primary Service by Service UUID.

    It looks like the server doesn't support the second sub-procedure (Discover Primary Service by Service UUID) that uses ATT_FIND_BY_TYPE_VALUE_REQ packet.

    You might consider report this as a bug and attach sniffer traces you captured to the Bluetooth Host vendor you use.

    Hope that helps,
    Kenneth

Children
No Data
Related