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

One peripheral many centrals

I am looking for a best solution to this scenario as in title:

  1. I read in some posts (eg. this post) that can use multiple ble service instances

  2. also in this post mentioned multiple GATT server instances can be used.

My concern mainly focus on that different centrals will have different data stream and status values, so these instances can not share same copy of values or status.

Also i checked the ble services implementation in SDK14, does not see much related to multi-instances ready. The multi-peripheral example does not give much detail on how multiple instances of services should be handled.

So the questions are:

  1. what are the best way to go, multiple service instances or multiple GATT servers?

  2. are there any examples for guide purpose?

Thank you.

Parents
  • Sry for the late reply as i am working on other threads before turning back to this one.

    Basically i have, say, 5 central devices that connect to the same peripheral device. each device has exactly same functions, but data exchanged with the peripheral device are different. One choice i have is to defined 5 services for each of them, or another one is have 1 service for them all. Having 5 services defined does not seem to be elegant or scalable solution. However having 1 for all will need to have multiple instance of characteristic/attribute values.

    I saw your answer in this post said can have multiple instance of services defined. I would like to try this solution but in that case, i am not sure how multiple attribute instances are handled.

Reply
  • Sry for the late reply as i am working on other threads before turning back to this one.

    Basically i have, say, 5 central devices that connect to the same peripheral device. each device has exactly same functions, but data exchanged with the peripheral device are different. One choice i have is to defined 5 services for each of them, or another one is have 1 service for them all. Having 5 services defined does not seem to be elegant or scalable solution. However having 1 for all will need to have multiple instance of characteristic/attribute values.

    I saw your answer in this post said can have multiple instance of services defined. I would like to try this solution but in that case, i am not sure how multiple attribute instances are handled.

Children
No Data
Related