<?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>How to respond to writing to Service Change CCC?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49003/how-to-respond-to-writing-to-service-change-ccc</link><description>We&amp;#39;re using the nRF52832 as a peripheral and server. A central and client (tablet) connects to the nRF52832. 
 Yesterday I noticed that sometimes the tablet will try to perform a write to handle 0x0D, which I figured out was the Client Characteristic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Jun 2019 09:45:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49003/how-to-respond-to-writing-to-service-change-ccc" /><item><title>RE: How to respond to writing to Service Change CCC?</title><link>https://devzone.nordicsemi.com/thread/194831?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2019 09:45:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a931ef1-c3b0-43fd-bd18-1f883f21cfd6</guid><dc:creator>obbe</dc:creator><description>&lt;p&gt;Thanks! I was more referring to wording, especially &amp;quot;notification&amp;quot; which is very general and &amp;quot;indication&amp;quot; which I found quite non-descript.&lt;/p&gt;
&lt;p&gt;Anyway, it occurred when I was randomly (on purpose) connecting/disconnecting with the same device (no restart, or anything).&lt;/p&gt;
&lt;p&gt;We are having some sporadic problems with the tablet app thinking that our device is not connected, while in fact the device says&amp;nbsp;it is connected, as does the OS (Windows). This happened to coincide with the issue manifesting, so I wanted to make sure it wasn&amp;#39;t something missing on the firmware side, but we&amp;#39;re assuming it something with the BLE library on Windows, or the driver itself. To be clear; the write request happens sometimes without the issue manifesting as well, but it seems to always happen when the issue occurs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to respond to writing to Service Change CCC?</title><link>https://devzone.nordicsemi.com/thread/194823?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2019 09:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f84f6184-122d-4c41-baf4-1761bd55844c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;The main difference between notifications and indications is that BLE packets that are sent with notifications are ACKed in the link layer, while the indications has to be ACKed in the application layer. ACKing in the application layer means that you are absolutely 100% sure that the packet is received, and that the application has received and confirmed the packet. Notifications are also ACKed, so that means that no packets are lost. In general, I would recommend to use notifications, as it is secure (regarding packet loss), and the throughput is also very much higher with notifications than when using indications, if that is a concern of yours.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It isn&amp;#39;t very easy to say why it only sometimes enabled indications on the service changed characteristic. Where do you see that it does that?&lt;/p&gt;
&lt;p&gt;If you are doing development on a DK, tablets and phones tend to store some information regarding devices. So if you flashed another example that didn&amp;#39;t have the service changed characteristic, the tablet may think it already know all the services and characteristics, and there is no service changed characteristic to tell it otherwise. Obviously, it is, but the tablet is not aware of it, because it has cached the already known services, and seeing that it is the same device (same address), it will not do a service discovery every time it connects unless it is aware of a service changed characteristic that is telling it that it has some new services.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The service changed characteristic is handled by the softdevice, so it is typically not something you need to take care of, other than including it in your project if you want to use it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to respond to writing to Service Change CCC?</title><link>https://devzone.nordicsemi.com/thread/194800?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2019 08:52:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed49fbf1-922a-4edd-9518-d9986308da3c</guid><dc:creator>obbe</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks for the reply and confirmation!&lt;/p&gt;
&lt;p&gt;I find the&amp;nbsp;nomenclature of indication and notification really backwards and ambigious! (Not your fault, of course)&lt;/p&gt;
&lt;p&gt;Still somewhat confusing that it only does this on some occasions, but maybe it&amp;nbsp;assumes that it some circumstances the services are unlikely to change...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are this request/behaviour processed at the SoftDevice level in some way?&lt;/p&gt;
&lt;p&gt;If I receive this request and do want to enable indications for service changes, would that just mean I call&amp;nbsp;&lt;span&gt;sd_ble_gatts_service_changed when my app makes changes to the services?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to respond to writing to Service Change CCC?</title><link>https://devzone.nordicsemi.com/thread/194793?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2019 08:36:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfa31290-0e6c-481b-ade2-4d0d1ab1cdf4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;1: The value 0x0200 is actually indications, and not notifications. It is similiar to notifications, but with some slightly different properties. Nothing you need to worry about in this characteristic.&amp;nbsp; The characteristic that the tablet enables indications is the service changed characteristic. This doesn&amp;#39;t surprise me, since this service is used to let the connected device know whenever new services or characteristics are added, so that the central can do a new service discovery. You don&amp;#39;t need to handle this actively.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2: As I said, I believe this is the OS on the tablet that wants to enable indications on the service changed characteristic so that it knows when it has to do a new service discovery, and when it is unnecessary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>