<?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>Get insufficient authentication error to change Client characteristic Configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28202/get-insufficient-authentication-error-to-change-client-characteristic-configuration</link><description>Hi:
i write very simple BLE App, it used open link. No security/encrypt. 1 service with 2 characteristics.
tx(serviceTXID, rxBuffer, 0, sizeof(rxBuffer), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE ),
rx(serviceRXID, txBuffer, 0, sizeof(txBuffer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Dec 2017 16:45:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28202/get-insufficient-authentication-error-to-change-client-characteristic-configuration" /><item><title>RE: Get insufficient authentication error to change Client characteristic Configuration</title><link>https://devzone.nordicsemi.com/thread/111419?ContentTypeID=1</link><pubDate>Mon, 11 Dec 2017 16:45:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca2dffe4-a6bc-4bb9-8ed6-79a654832531</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;It&amp;#39;s good to hear you figured out the issue :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get insufficient authentication error to change Client characteristic Configuration</title><link>https://devzone.nordicsemi.com/thread/111418?ContentTypeID=1</link><pubDate>Fri, 08 Dec 2017 09:36:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:517f73da-af39-4804-bf32-e392e9e3d46b</guid><dc:creator>wen jin zhang</dc:creator><description>&lt;p&gt;Sorry, I found the place of the  &amp;quot;Client Characteristic Configuration&amp;quot; set security policy.
in custom_add_in_characteristic() function in custom_helper.cpp file
error_t custom_add_in_characteristic(uint16_t                  service_handle,
ble_uuid_t               *p_uuid,
uint8_t                   properties,
SecurityManager::SecurityMode_t       requiredSecurity,
uint8_t                  *p_data,
uint16_t                  min_length,
uint16_t                  max_length,
const uint8_t            *userDescriptionDescriptorValuePtr,
uint16_t                  userDescriptionDescriptorValueLen,
bool                      readAuthorization,
bool                      writeAuthorization,
ble_gatts_char_handles_t &lt;em&gt;p_char_handle)
{
/&lt;/em&gt; Characteristic metadata */
ble_gatts_attr_md_t   cccd_md;
ble_gatt_char_props_t char_props;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;memcpy(&amp;amp;char_props, &amp;amp;properties, 1);

if (char_props.notify || char_props.indicate) {
    /* Notification requires cccd */
    memclr_( &amp;amp;cccd_md, sizeof(ble_gatts_attr_md_t));
    cccd_md.vloc = BLE_GATTS_VLOC_STACK;
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.read_perm);
    **//BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&amp;amp;cccd_md.write_perm);**
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.write_perm);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;.....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>