Why need 2 types of services ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
urchc_1533771
Level 5
Level 5
5 likes given First like received First like given

In datasheet of BLE I read that exist 2 types of services:

   

Service type
 Primary – Represents the primary functionality of the device.
 Secondary – Represents an additional functionality of the device.

   

What exactly it mean ? Why need Secondary type ? Why not to use only Primary ?

0 Likes
1 Solution
Anonymous
Not applicable

A verbatim from the BLE Spec: "A primary service is a service that provides the primary functionality of a device. A secondary service
is a service that provides auxiliary functionality of a device and is referenced from at least one primary service on the device. A secondary service is a service that is only intended to be referenced from a primary service or another secondary service or other higher layer specification. A secondary service is only relevant in the context of the entity that references it."

   

Coming to writing/reading the characteristics in these services, there are no differences between the two. You can read/write to characteristics in secondary service just as characteristics in the primary service.

View solution in original post

0 Likes
3 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Lets say you had a device that had two readings the Primary reading and a second reading.  Like a light detector with an intensity and color of the light.

0 Likes
urchc_1533771
Level 5
Level 5
5 likes given First like received First like given

How it`s sense to read/write characteristic ?

0 Likes
Anonymous
Not applicable

A verbatim from the BLE Spec: "A primary service is a service that provides the primary functionality of a device. A secondary service
is a service that provides auxiliary functionality of a device and is referenced from at least one primary service on the device. A secondary service is a service that is only intended to be referenced from a primary service or another secondary service or other higher layer specification. A secondary service is only relevant in the context of the entity that references it."

   

Coming to writing/reading the characteristics in these services, there are no differences between the two. You can read/write to characteristics in secondary service just as characteristics in the primary service.

0 Likes