<?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>Gatt Read/write and insufficient key size error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50829/gatt-read-write-and-insufficient-key-size-error</link><description>Hi 
 When a GATT Table is created using the softdevice api, how do specify that a service or characteristic shall have a minimum key size of X so that if the current encrytion was done with a key &amp;lt;X size, then it will read with the BLE_L2CAP_CH_STATUS_CODE_INSUFF_ENC_KEY_SIZE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Aug 2019 12:26:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50829/gatt-read-write-and-insufficient-key-size-error" /><item><title>RE: Gatt Read/write and insufficient key size error</title><link>https://devzone.nordicsemi.com/thread/203306?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 12:26:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e1733cc-9d2b-4a4c-bb82-17dc31b0d457</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes, It&amp;#39;s correct. You neeed authorisation be enabled on the characteristic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think it will be implemented in near future on the softdevice. Not 100% sure about the Zephyr stack though.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gatt Read/write and insufficient key size error</title><link>https://devzone.nordicsemi.com/thread/203248?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 09:23:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd9629dd-ed43-4830-ba1e-c020339e5bde</guid><dc:creator>Mahendra Tailor</dc:creator><description>&lt;p&gt;Is it planned to add this feature in a future softdevice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gatt Read/write and insufficient key size error</title><link>https://devzone.nordicsemi.com/thread/203246?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 09:19:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:830bd105-0c70-4d58-b2d3-7ce81a34f792</guid><dc:creator>Mahendra Tailor</dc:creator><description>&lt;p&gt;Hi&lt;br /&gt;Thank you for getting back.&lt;br /&gt;The workaround you suggest requires that authorisation be enabled for read/write.&lt;/p&gt;
&lt;p&gt;Is that correct?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Mahendra&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Gatt Read/write and insufficient key size error</title><link>https://devzone.nordicsemi.com/thread/203244?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 08:11:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c8172bf-c630-470e-a0a8-e89dc6b68de8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mahendra,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Currently our stack doesn&amp;#39;t have an option to set the key size requirement for each attribute. You can set the security level but not the key size, by the stack.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you need to do is to handle that&amp;nbsp;by the application.&lt;/p&gt;
&lt;p&gt;You can return&amp;nbsp;BLE_GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE ( &lt;strong&gt;not&amp;nbsp;&lt;/strong&gt;&lt;span&gt;&lt;strong&gt;BLE_L2CAP_CH_STATUS_CODE_INSUFF_ENC_KEY_SIZE as it&amp;#39;s for L2CAP channel&lt;/strong&gt; )&amp;nbsp; when there is an authorized read request or write request.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>