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

UART service (NUS) or Custom Service

I need to send 5 sensor values received over SPI to an app over BLE about 5 times a second. I also need to send a few configuration parameters from the app back to the nrf52.

Can anybody tell me the advantages/disadvantages of solving the task by creating an own custom service with a characteristic for every sensor value and a characteristic for configuration or to use the NUS?

Parents
  • Hi,

    If you were making something that as supposed to be generic, then it might make more sense to use separate characteristics for each sensor value. For a custom system, it does not matter much. If you want the client to be able to read specific sensor values it might be cleaner to use a custom service, but if you just pass all sensor data regularly, then using NUS will be just as efficient. It is mostly a matter of what you prefer, even though using NUS might be a bit less elegant (which does not really matter).

Reply
  • Hi,

    If you were making something that as supposed to be generic, then it might make more sense to use separate characteristics for each sensor value. For a custom system, it does not matter much. If you want the client to be able to read specific sensor values it might be cleaner to use a custom service, but if you just pass all sensor data regularly, then using NUS will be just as efficient. It is mostly a matter of what you prefer, even though using NUS might be a bit less elegant (which does not really matter).

Children
Related