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

NUS or custom service

I am using nrf52 and there is a sensor connected to it. I want to read the values from the sensor and sometimes this is changing fast like 1-10 ms. The idea is to connect nrf with bluetooth but now I am bit confused on what should I use, NUS or a custom service?

As I got it the correct way to broadcast the data for BLE is through services and I should create my own service with its characteristics instead of using NUS and RX and TX characteristic?

I also sometimes want to send data to nrf and in that case should I use NUS for communication or?

Is there one of the examples that could help with this? 

Parents
  • Hi,

    It is really up to you what you want to use. NUS demonstrate a simple way to make a custom service that shuffle data. If that is what you need, then you can simply use NUS. If you find that you need more and no standard service fits your needs, then making a custom service may be a good idea. Regarding that, you can refer to the existing service implementations as an example on how to make a custom service. There are no fundamental difference between them other than the UUID. NUS itself use a 128 bit UUID, so it demonstrates a custom service.

    Einar

Reply
  • Hi,

    It is really up to you what you want to use. NUS demonstrate a simple way to make a custom service that shuffle data. If that is what you need, then you can simply use NUS. If you find that you need more and no standard service fits your needs, then making a custom service may be a good idea. Regarding that, you can refer to the existing service implementations as an example on how to make a custom service. There are no fundamental difference between them other than the UUID. NUS itself use a 128 bit UUID, so it demonstrates a custom service.

    Einar

Children
No Data
Related