<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Current Time Service not found on server</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51849/current-time-service-not-found-on-server</link><description>Hi, 
 In y project, I want to implement CTS. Until now it&amp;#39;s been working, but I don&amp;#39;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.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Sep 2019 12:06:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51849/current-time-service-not-found-on-server" /><item><title>RE: Current Time Service not found on server</title><link>https://devzone.nordicsemi.com/thread/208925?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2019 12:06:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d3730dd-c46f-4825-9ea7-6db43e1e554c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Lydie,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are saying that using the cts example it worked but when using your application it still didn&amp;#39;t work ? You may want to check the difference between your application and the example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding your new question, if you want to keep the time when it&amp;#39;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&amp;#39;t think we have an example for this. There is some discussion about it &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/12693/ble-operation-and-run-low-power-rtc-calendar"&gt;here.&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Current Time Service not found on server</title><link>https://devzone.nordicsemi.com/thread/208778?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2019 03:28:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e63a9ee-d089-443a-a56c-0d063ddf1263</guid><dc:creator>lydie</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When I program with cts example, it works, thanks. But I don&amp;#39;t understand why sometimes the server is not found. But now I have another problem. My device sleeps after 30 seconds. But when it&amp;#39;s sleeping, the time is wrong, it is not updated. Do you know&amp;nbsp;how can time be updated when the device is sleeping?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Current Time Service not found on server</title><link>https://devzone.nordicsemi.com/thread/208712?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 13:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ff8460e-fbeb-41c2-9317-233aadda75f5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Lydie,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I assume you are testing with unmodified cts example ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to follow the documentation &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_cts_c.html?cp=5_1_4_2_2_7"&gt;here &lt;/a&gt;and test with nRF Connect on PC ? I did a quick test here and don&amp;#39;t see the same issue that you had.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You may want to print out some log inside&amp;nbsp;ble_cts_c_on_db_disc_evt() and check which even you receive on the second time you receive the event. In the code the log&amp;nbsp;&lt;span&gt;ble_cts_c: Current Time Service discovered at peer. is only printed when there is&amp;nbsp;BLE_DB_DISCOVERY_COMPLETE, we need to see what happened on the second time it get called.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please also take&lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer"&gt; a sniffer trace&lt;/a&gt; when you connect to the phone.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Current Time Service not found on server</title><link>https://devzone.nordicsemi.com/thread/208569?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 02:41:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6ab092f-17d2-422f-814e-16cbc62e234d</guid><dc:creator>lydie</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using an iPhone to test, but I tried with an Asus and it is the same problem. I use sdk15.3 and my chip is nrf52832, and when I turn off my phone nothing changes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried with another example te delete the board onside Bluetooth setting, but it&amp;#39;s the same problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First time&amp;nbsp;&lt;span&gt;on_cts_c_evt() is called, the server is found, but the second it is not. Do you know why this function is called twice? So it means my code has a problem, but I don&amp;#39;t see where.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Current Time Service not found on server</title><link>https://devzone.nordicsemi.com/thread/208504?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2019 14:46:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af1d56e6-e5a9-4fe7-9f7a-704d629f4c79</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Lydie,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you let me know:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Which phone you are using to test ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Which SDK you firmware based on ? Which nRF52 chip ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Have you tried to turn off an on the phone ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- You can also try to flash other example to the board, for example ble_app_hrs, and then try delete the board inside Bluetooth setting.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Current Time Service not found on server</title><link>https://devzone.nordicsemi.com/thread/208408?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2019 08:39:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e6ee755-806e-4ac9-967c-17db145189c7</guid><dc:creator>lydie</dc:creator><description>&lt;p&gt;When I&amp;nbsp;connect with Bluetooth, I have these lines in my debugger:&lt;/p&gt;
&lt;p&gt;app: Connected. &lt;br /&gt;&amp;lt;info&amp;gt; ble_cts_c: Current Time Service discovered at peer. &lt;br /&gt;&amp;lt;info&amp;gt; app: Current Time Service discovered on server. &lt;br /&gt;&amp;lt;info&amp;gt; app: Current Time Service not found on server.&lt;/p&gt;
&lt;p&gt;So it means&amp;nbsp;on_cts_c_evt() is called twice. I don&amp;#39;t understand why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>