This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Service discovery when peripheral has the same service multiple times

My peripheral uses a generic sensor service which I use for various sensors. Most of the sensors only have one integer as value and can be abstracted the same, hence I made a generic sensor service. Now there will be cases where the peripheral has two sensors, each having their instance of my sensor service. This seems to work fine on the nRF Connect app.

The issues I am having is discovering both these services in my central device. I registered the uuid using ble_db_discovery_evt_register(), but I only get one event.

Parents
  • Do I understand it correctly that your two primary services (representing two sensors) have different UUIDs (because that's what BT SIG demands)?

  • They don't, it's the same UUID. I thought it was allowed because of this in the Core Spec Vol 3 Part G 3.1 Service Definition: A device or higher level specification may have multiple service definitions and may have multiple service definitions with the same service UUID.. I thought this meant it was fine to implement the exact same service twice.

Reply
  • They don't, it's the same UUID. I thought it was allowed because of this in the Core Spec Vol 3 Part G 3.1 Service Definition: A device or higher level specification may have multiple service definitions and may have multiple service definitions with the same service UUID.. I thought this meant it was fine to implement the exact same service twice.

Children
No Data
Related