<?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>Characteristic of the current time service could not be found in the APP.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53452/characteristic-of-the-current-time-service-could-not-be-found-in-the-app</link><description>I am doing a program based on Current Time Application example. But I have a few questions, so I hope you can help me. First, I am using Battery service together. By the way, why doesn&amp;#39;t the current time service add characteristic when the battery service</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Oct 2019 06:00:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53452/characteristic-of-the-current-time-service-could-not-be-found-in-the-app" /><item><title>RE: Characteristic of the current time service could not be found in the APP.</title><link>https://devzone.nordicsemi.com/thread/216048?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 06:00:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e87b342-8f5c-4fe5-90ae-e3aeee7734ce</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="moon.kim"]I wonder if battery service works as a server and current time service as a client is possible.[/quote]
&lt;p&gt;&lt;span&gt;As I explained in the previous reply, a service change indication from the GAT server can change the role.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Unfortunately, we do not have any CTS server profile as&amp;nbsp; CTS is a native service in most mobile OSes.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristic of the current time service could not be found in the APP.</title><link>https://devzone.nordicsemi.com/thread/216030?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 01:36:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1801640a-9136-4d81-a37c-912a158053c8</guid><dc:creator>moon.kim</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi. Thank you.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Amanda.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;m using the battery service as a server. It&amp;#39;s used to send battery levels from my device to my Android phone&lt;/span&gt;&lt;br /&gt;&lt;span&gt;And I&amp;#39;m going to read the current time on my Android phone and set the time on my device.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I wonder if battery service works as a server and current time service as a client is possible. I think it&amp;#39;s possible because it&amp;#39;s a different service.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;And I don&amp;#39;t think Nordic nRF Toolbox offers current time service server. Is that right? Is there a project I can refer to to to build an Android APP? iOS nRF Toolbox has confirmed that my device and current time service work.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristic of the current time service could not be found in the APP.</title><link>https://devzone.nordicsemi.com/thread/215946?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2019 13:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5295e6e4-d6c6-48d0-8828-159e64764943</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]I think it&amp;#39;s because battery service is server and current time service is client. Right?[/quote]
&lt;p&gt;There are two API&amp;#39;s, one called&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v11-0-0/group__ble__sdk__srv__bas__c"&gt;Battery Service Client&lt;/a&gt;, and one called&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v11-0-0/group__ble__sdk__srv__bas#details"&gt;Battery Service&lt;/a&gt;. Which one are you using?&lt;/p&gt;
&lt;p&gt;I think you have to use the functions in the&amp;nbsp;&lt;strong&gt;ble_bas_c.c&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;ble_bas_c.h&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;for the Battery Service Client if you want to have &lt;span&gt;current time service and&amp;nbsp;battery service on the client&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]So when I use these two services on GATT, can I operate as a server and a client at the same time?[/quote]
&lt;p&gt;No. But&amp;nbsp;&lt;span&gt;A Service change indication which is only sent by a GATT server can change to the role. (However, a GATT server and GATT client may very well be present on the same device.) Please see this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41885/changes-of-handling-gatt-service-changed-indications-in-sdk-15-2/163505#163505"&gt;thread&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]If I could use either one, would I be able to read the time from the client (e.g., the phone) while using CTS as a server?[/quote]
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please see the following figure.&amp;nbsp;Only the client can send the read data request to the server, and the server will send the data to the client.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The SDK &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_cts_c.html"&gt;Current Time Application&lt;/a&gt;&amp;nbsp;is an example that implements the client role of the Current Time Profile using the hardware delivered in the nRF5 Development Kit.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="340" src="https://raw.githubusercontent.com/sigurdnev/sigurdnev.github.io/master/data_transfer.png" width="645" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>