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

Why use different services for and not just NUS?

Hi,

I have worked on a lot of projects on nRF51/52 devices. But still i do not understand why exactly should we use custom/multiple services for each kind of data (like temperature, humidity accel values etc).

Is there any benefit in doing that?

And is it a bad idea to use NUS for all of your data transfers by using your custom byte oriented protocol?

Thank you.

  • Hello,

    And is it a bad idea to use NUS for all of your data transfers by using your custom byte oriented protocol?

    This depends. If you control both sides of the link, and you are certain that the central device always wants to receive the same frame of data, and that the peripheral will never connect to any other devices than your own, there is no issue with only using the NUS service or a similar custom one.
    However, separate services and characteristics are very useful when you would like some of the data to be sent only occasionally, or at a different frequency, or that your peripheral device perhaps will connect to different devices that might want different things.

    This is why Profiles, services, characteristics, and the BT Sig standard UUIDs are made - so that whenever another device connects to a heart rate monitor, it can expect to be able to read a heart beat characteristic, for example.

    Best regards,
    Karl

Related