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.

    Can you send part of your code where you have implemented service discovery?

    From my understanding, if you call sd_ble_gattc_primary_services_discover(.., .., NULL) then the softdevice will send ATT_READ_BY_GROUP_TYPE_REQ (similar to phone). Can you check if p_srvc_uuid to NULL when you call sd_ble_gattc_primary_services_discover()?

    Best regards,
    Kenneth

Children
Related