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

Current Time Service

Hi,

For our application we need time and date updates from a mobile phone. Bluetooth has a standard Current Time Service for this. However I can't find this service in the Nordic SDK or examples. I only find the GATT Client implementation of this service, but I need it as a GATT Server. 

What is the benefit anyway of implementing this as a GATT Client?

Parents
  • Hi

    The Current Time Application example (ble_app_cts_c) demonstrates how the CTS client is used to retrieve the current time from a CTS server (typically a mobile phone). A Current Time Service server will not be able to trigger a read from a client, as the server will only be serving the client, and not the other way around. That is why we only have the Current Time Service Client in our SDK. If the nRF was the server in this case, the client application would ask for the time, and the nRF would have to provide it. The client lets you trigger a read of the current time from the connected server (mobile phone or similiar).

    Best regards,

    Simon

  • Hi, I understand this. But the alternative could also be to have the CTS server on the nRF, and an App on the mobile phone writes the timestamps to this service, like with any other service. Of course the device itself has less control, but in most cases the App is proprietary anyway so it can write those values. I think that's much easier to implement because then on the App no GATT Services have to be made. Or is this not the right approach?

Reply
  • Hi, I understand this. But the alternative could also be to have the CTS server on the nRF, and an App on the mobile phone writes the timestamps to this service, like with any other service. Of course the device itself has less control, but in most cases the App is proprietary anyway so it can write those values. I think that's much easier to implement because then on the App no GATT Services have to be made. Or is this not the right approach?

Children
No Data
Related