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

NRF52 adding CTS service( not CTS_C ) to application

I am using nrf52 DK board with  SDK15.3.0 developing my application on top of ble_blinky_peripheral example .

How do add CTS service in my application ??

 I have refered CTS_C ( client ) example which is provided with the SDK but , I want it to be configured for server since the CTS_C example needs to get paired first with the mobile app ( nrf_connect) and then it transfers CTS data . I want something like the CTS service (1805 ) should be available once I connect to the nrf device via nrf_connect app , and it must have necessary characteristics for writing CTS data .    

Parents
  • Hi

    I'm sorry, but it sounds like you want to do exactly what the CTS client service does. That you want the nRF peripheral to get the time from a mobile phoneto keep track ot time. The purpose of the Current Time application example is to use the CTS to read the current time, and then print the time (date, time, etc.) onto a display. 

    If I'm not understanding you correctly, please try to explain what you'd like to do that the Current Time application does not do.

    Best regards,

    Simon

  • I have found out solution for this . Actually your concern makes sense if we have nrf running no timing feature and it has to fetch timing parameters from a remote device / system ( server ) and initially , CTS_C example requires pairing post which , it sends current time data which is not suitable for my application .

    But , in my case , since the client ( NRF ) has it's timing feature running and All I wanted was to update the current time from a remote device using standard service ( CTS : 1805 ) without any pairing  . 

    For the solution , I have created a new service with the same CTS UUIDs ( with write permission ) which  will fetch my mobile phone ( server ) timing data and send it to NRF device .

    Now I can able to  update my NRF timings from mobile app using Standard CTS service .

  • hey man, 

    I am trying to do the same for my project. can you guide me on how you are fetching timing data from the android?

    Thanks 

  • Hi ,

    I am not a andriod guy so cannot help you much in this . 

    But still ,all you can do in your andriod code is , manually fetch your device time ( yyyy : mm : dd   and hh:mm:ss  total 7 bytes ) and send these 7 bytes  ,as an array ,  to the BLE CTS characteristics .

    That's It !

Reply Children
No Data
Related