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

Why service discovery command of BLE takes a lot of time?

Hi, I am trying to test my UART using some simple loopback test, and I have noticed that the service discovery command of BLE will occupy the CPU a quite long time. I am just wondering if there is any way to reduce it? Does the SoftDevice handle the service discovery command as one single radio event or it breaks it down to several sub-commands? BTW, is there a minimum time interval between two radio event?

Thanks, B.F.

  • Hi,

    Service Discovery is a process of discover Primary Services, its relationship and its characteristics UUIDs and values. This process is described at section 4.4, Part G Vol 3 in Bluetooth Core Specification V4.0

    It's not a single radio request but requires lots of requests from client to go through the server Attribute table. On each connection event you can only send less than 6 requests, depend on the master property. This explains why service discovery may take a long time if your connection interval is long.

    So the way to speed up service discovery is to reduce the connection interval when doing service discovery. Depend on the master , you can get the connection interval as low as 7.5ms.

Related