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

Creation of a secondary service?

I'm trying to write a test service on a PCA10001 that transmits a single scalar value that is computed from a few different sensor readings. I would like this service to send a notification when the scalar is outside a set range. The set/combination of sensors can vary from device to device, but I'd like the code to be as generic as possible.

My design approach would be to advertise the combined scalar as a primary service and each individual sensor reading as a secondary service.

My question is if there are any examples in the application notes, support material that show how to implement a server that provides a similar combination of services.

Parents
  • Let say one needs to measure temperature for different devices. Every so often a new device is added to this family. They are using different types and different number of the sensors. Wouldn't it make sense to have primary service which reports the combine temperature and is common for all family and multiple different secondary unique services for each family member? If one will change every time primary services then how to design the application to be compatible with most family members? Thanks.

Reply
  • Let say one needs to measure temperature for different devices. Every so often a new device is added to this family. They are using different types and different number of the sensors. Wouldn't it make sense to have primary service which reports the combine temperature and is common for all family and multiple different secondary unique services for each family member? If one will change every time primary services then how to design the application to be compatible with most family members? Thanks.

Children
No Data
Related