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

Discovery all attribute UUIDs

Hi,

I want to discovery all attribute UUIDs as Master Control panel application does. I use API function 'sd_ble_gattc_primary_services_discover' to discovery. Exactly, sd_ble_gattc_primary_services_discover(connection_handle, Start_handle, NULL) because i want to discovery all UUID as well as my custom UUID. but I can't discovery custom UUID.. are there any other function that i need to add to discovery custom UUID?

I use heart_rate_collector example now.

  • Hi HJ,

    You need to do your "service discovery" procedure meaning you need to implement some kind of algorithm which will allow you to get all LE (G)ATT values on server side (GAP Peripheral role I suppose in your case). BT SIG just specifies simple commands which are issued and you need to parse the answers and decide what handle range or specific handle you will explore next. There are some basic examples how to do it efficiently (you can get inspiration in any GAP Central device e.g. phone or tablet by sniffing first part of BLE connection).

    However Nordic nRF51/52 SDKs provide GAP Central examples which have this implemented, you can also read through this post.

    Cheers Jan

  • You should be able to discover all services if you do it step by step. Each discovery will have 2 PDUs, a request and a response. In the next cycle you continue from the last handle from the previous response. So you should be able to discover as many services as you'd like. Are you sure you are handling the response from the peer correctly?

Related