<?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>What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97574/what-does-softdevice-send-when-reply-params-write-gatt_status-ble_gatt_status_atterr_cps_cccd_config_error</link><description>My server gets a write request to a characteristic that has not been enabled. 
 I respond with 
 
 
 However, the value of BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR is 0x1FD. 
 The PTS test suite is saying that the value received is 0x100 and it should</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Mar 2023 09:31:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97574/what-does-softdevice-send-when-reply-params-write-gatt_status-ble_gatt_status_atterr_cps_cccd_config_error" /><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/415096?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 09:31:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6949a9f9-c2cf-4313-b76e-abcd7b9b9919</guid><dc:creator>Sigurd</dc:creator><description>[quote user="brianreinhold"]What would happen if I just set the status to 0xFD instead of using &lt;span&gt;BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR&lt;/span&gt;?&amp;nbsp; Would this mess up SoftDevice or would the result still be that 0xFD is sent?[/quote]
&lt;p&gt;I did quick test on this, and I did not see any difference, 0xFD was still sent. But as mentioned by Hung in this post,&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47646/androidos-seems-to-treat-gatt-status-as-an-8-bit-number-rather-than-16"&gt;AndroidOS seems to treat Gatt Status as an 8 bit number, rather than 16&lt;/a&gt;&amp;nbsp; Our&amp;nbsp;gatt_status (BLE_GATT_STATUS_CODES) in our stack is not directly matched to the ATT error codes defined in Bluetooth spec, so please use&amp;nbsp;&lt;span&gt;BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR when calling sd_ble_gatts_rw_authorize_reply(), and it will be correctly set to 0xFD by the Softdevice.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/415008?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 19:24:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5616b80e-61b6-4182-837d-ead038da401f</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Great! Then there is something funky in the PTS test (It is new and under development. Seems hard to get 0x100 as well since the error code only occupies one byte.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What would happen if I just set the status to 0xFD instead of using &lt;span&gt;BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR&lt;/span&gt;?&amp;nbsp; Would this mess up SoftDevice or would the result still be that 0xFD is sent?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/415007?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 19:19:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1836ec45-19c6-4a29-bb98-e88a9f482c75</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="brianreinhold"]&lt;p&gt;&lt;span style="color:rgba(255, 0, 0, 1);"&gt;#define BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR&amp;nbsp; &amp;nbsp; &amp;nbsp; 0x01FD&amp;nbsp; /**&amp;lt; ATT Common Profile and Service Error: Client Characteristic Configuration Descriptor improperly configured. */&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That this is the correct code to use in the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;sd_ble_gatts_rw_authorize_reply(p_ble_evt-&amp;gt;evt.gatts_evt.conn_handle, &amp;amp;reply);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;method when the CCCD has not been correctly configured. &lt;/p&gt;[/quote]
&lt;p&gt;Yes, this is correct.&lt;/p&gt;
[quote user="brianreinhold"]So if I set the status to&amp;nbsp;&lt;span&gt;BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR is the client expected to receive 0xFD?&lt;/span&gt;[/quote]
&lt;p&gt;Yes, 0xFD is what is sent over-the-air when using&amp;nbsp;&lt;span&gt;BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tested this with the sniffer:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1678735174732v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/414909?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 12:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5aa3ea3a-dd68-480d-ade2-724991fec503</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Before I do that, I want to make sure I am using the correct code:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;#define BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR&amp;nbsp; &amp;nbsp; &amp;nbsp; 0x01FD&amp;nbsp; /**&amp;lt; ATT Common Profile and Service Error: Client Characteristic Configuration Descriptor improperly configured. */&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That this is the correct code to use in the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;sd_ble_gatts_rw_authorize_reply(p_ble_evt-&amp;gt;evt.gatts_evt.conn_handle, &amp;amp;reply);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;method when the CCCD has not been correctly configured. The CSS says the code should be 0xFD and not 0x1FD. But maybe SoftDevice filters out the 0x100? Why PTS is getting 0x100 could be a PTS error since these are new tests for a new GHSS standard. That&amp;#39;s a different story.&lt;/p&gt;
&lt;p&gt;So if I set the status to&amp;nbsp;&lt;span&gt;BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR is the client expected to receive 0xFD?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/414905?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 12:16:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e3dfe6c-2f04-432f-b8b5-bc004b98f402</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;I think you should address this question to the&amp;nbsp;&lt;span&gt;Bluetooth SIG PTS team directly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Looking at this page,&amp;nbsp;&lt;a href="https://www.bluetooth.com/develop-with-bluetooth/qualification-listing/qualification-test-tools/profile-tuning-suite/"&gt;https://www.bluetooth.com/develop-with-bluetooth/qualification-listing/qualification-test-tools/profile-tuning-suite/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;it states that it&amp;#39;s possible to submit a PTS ticket here:&amp;nbsp;&lt;a href="https://www.bluetooth.org/pts/issues/add_issue.cfm"&gt;https://www.bluetooth.org/pts/issues/add_issue.cfm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/414895?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 11:59:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38a87322-9e9a-485e-8d72-acce570a97d0</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;This is a PTS test. A command on a control point has been sent to start sending live (real time) data over a characteristic which has not been enabled for notifications or indications. All security necessities have been established. This test is to make sure the server responds with the error code 0xFD as in the text I highlighted in red above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/414891?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 11:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f45d029-740e-418b-9e42-7c3b05a6b58a</guid><dc:creator>Sigurd</dc:creator><description>[quote user=""]&lt;p&gt;My server gets a write request to a characteristic that has not been enabled.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;What do you mean by not enabled? You mean that the client have not enabled the notification for this&amp;nbsp;&lt;span&gt;characteristic?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/414887?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 11:48:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d80bfd6c-6a83-48c8-bbf9-aa043c29265e</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Its going to take me a while to do that since my supply of ports is exhausted with PTS and the DK. In the mean time, what is expected to be sent?&lt;/p&gt;
&lt;p&gt;From the CSS 11 I have this:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;CLIENT CHARACTERISTIC CONFIGURATION&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;DESCRIPTOR IMPROPERLY CONFIGURED (0xFD)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;The Client Characteristic Configuration Descriptor Improperly Configured error&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;code is used when a Client Characteristic Configuration descriptor is not&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;configured according to the requirements of the profile or service&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Am I sending the correct error code? What confuses me is that the code is 0x1FD for&amp;nbsp;&lt;span&gt;BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR which is okay if SoftDevice internally dumps the 0x100 part and sends just the 0xFD. Not sure what would happen if I sent 0xFD straight and did not use the #defines.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does Softdevice send when reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR?</title><link>https://devzone.nordicsemi.com/thread/414861?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 10:30:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55325164-e132-49b2-ac03-010aa227c7e4</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you upload a sniffer trace of this?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le"&gt;https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>