<?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>the characteristic could not be write</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/549/the-characteristic-could-not-be-write</link><description>dear Nordic:
i created a new characteristic assigned UUID 0x18e1.in order to be writable,i set its properties with following in
static uint32_t pressure_high_byte_char_add(ble_bas_t * p_bas, const ble_bas_init_t * p_bas_init)
char_md.char_properties</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Sep 2013 13:26:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/549/the-characteristic-could-not-be-write" /><item><title>RE: the characteristic could not be write</title><link>https://devzone.nordicsemi.com/thread/2813?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2013 13:26:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd372124-a206-4c16-8373-caa6eb4db497</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;This error most likely comes because you haven&amp;#39;t set the security level of your characterstic properly.&lt;/p&gt;
&lt;p&gt;The security level for the different properies are set separately from the properties themselves. If you&amp;#39;ve based yourself on the battery service, you can see this in the original ble_bas.c, lines 151-152:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
    attr_md.read_perm  = p_bas_init-&amp;gt;battery_level_char_attr_md.read_perm;
    attr_md.write_perm = p_bas_init-&amp;gt;battery_level_char_attr_md.write_perm;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These parameters are then set in the calling code, for example like this in ble_app_hrs, lines 434-435:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;bas_init.battery_level_char_attr_md.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&amp;amp;bas_init.battery_level_char_attr_md.write_perm);

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see, this sets NO_ACCESS for the write property, so to enable writes, you have to change this to for example OPEN.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>