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

How do I get Start and EndHandle of a BLE Service

I'm using the MasterEmulator C# DLL.

I have a problem regarding discoverServices. If I understand this correctly discoverServices does not only return a list of all services but it also includes Characteristics. How can I find out if an object of AttributeEntry is an actual service or a characteristic? A coworker said that a service should have a Start and EndHandle to find out how many characteristics it contains.

Now how do I get the Start and EndHandle of a Service? According to the Documentation the AttributeEntry class only has data, uuid and handle members.

Or is there any other way to to determine whether an Entry in the list returned by DiscoverServices is a Service or a Characteristic?

Thanks in Advance.

Parents
  • The way this is defined in the Core Specification is that a Service is composed of all attributes between one Service Declaration attribute and the next such attribute. A Service Declaration attribute has the UUID 0x2800 as shown here.

    However, if you plan to actually do anything with the data you receive, you'll have to look into the concept of pipes, and create a pipe setup for your device. The DiscoverServices API is provided just as a convenience, and as a simple way to do a service discovery, you won't be able to use the attributes for any actual data exchange. The concepts of pipes is described in the MasterEmulator help file, for example on the Pipe Setup page.

Reply
  • The way this is defined in the Core Specification is that a Service is composed of all attributes between one Service Declaration attribute and the next such attribute. A Service Declaration attribute has the UUID 0x2800 as shown here.

    However, if you plan to actually do anything with the data you receive, you'll have to look into the concept of pipes, and create a pipe setup for your device. The DiscoverServices API is provided just as a convenience, and as a simple way to do a service discovery, you won't be able to use the attributes for any actual data exchange. The concepts of pipes is described in the MasterEmulator help file, for example on the Pipe Setup page.

Children
No Data
Related