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

Current Time Service not found on server

Hi,

In y project, I want to implement CTS. Until now it's been working, but I don't know why, I now have this problem: Current Time Service not found on server, which means the event calls the current time service is BLE_CTS_C_EVT_DISCOVERY_FAILED. why is the current time service not found by the server? 
To solve this, I saw that I have to forget the device on the Bluetooth parameters of my phone, but I can't. When I'm not connected, the device name doesn't appear and when I'm connected, I can't forget the device, I have this: 

Normally, I click on the button "i" and after I can't click on forget the device.

So I tried to add this line: 

memset(&m_ble_db_discovery,0,sizeof(m_ble_db_discovery));
in the case BLE_GAP_EVT_CONNECTED of the function ble_evt_handler(). It works at first but now I have the same problem.

Is it my code which has a problem or a bug of the device?

  • Hi Lydie, 

    You are saying that using the cts example it worked but when using your application it still didn't work ? You may want to check the difference between your application and the example. 

    Regarding your new question, if you want to keep the time when it's not connected you would need to have a timer on the application to keep the time. You can keep an application timer that occur every one second and then increase the current time by 1 second. I don't think we have an example for this. There is some discussion about it here.

Related