<?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 can i change the write Read permission of UUID 2A00?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14610/how-can-i-change-the-write-read-permission-of-uuid-2a00</link><description>By default the UUID 2A00 (Device Name) has the access Permission Write and Read i would like to change it to Read only.
How can i do this?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Jun 2016 14:12:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14610/how-can-i-change-the-write-read-permission-of-uuid-2a00" /><item><title>RE: How can i change the write Read permission of UUID 2A00?</title><link>https://devzone.nordicsemi.com/thread/55755?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 14:12:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a741e356-acb1-4e3b-b21a-5f0dda5405fd</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The write permission for the device name is set with the &lt;code&gt;sd_ble_gap_device_name_set()&lt;/code&gt; function, when setting the device name. Excerpt from the ble_app_hrs example in SDK 11:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_gap_conn_sec_mode_t sec_mode;

BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;sec_mode);

err_code = sd_ble_gap_device_name_set(&amp;amp;sec_mode,
                                      (const uint8_t *)DEVICE_NAME,
                                      strlen(DEVICE_NAME));
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Write permissions are set to the variable &lt;code&gt;sec_mode&lt;/code&gt; using the &lt;code&gt;BLE_GAP_CONN_SEC_MODE_SET_OPEN()&lt;/code&gt; macro. See the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v0.9.0%2Fgroup___b_l_e___g_a_p___c_o_n_n___s_e_c___m_o_d_e___s_e_t___m_a_c_r_o_s.html&amp;amp;resultof=%22%42%4c%45%5f%47%41%50%5f%43%4f%4e%4e%5f%53%45%43%5f%4d%4f%44%45%22%20"&gt;documentation for &lt;code&gt;sd_ble_gap_device_name_set()&lt;/code&gt;&lt;/a&gt; and the list of &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v0.9.0%2Fgroup___b_l_e___g_a_p___c_o_n_n___s_e_c___m_o_d_e___s_e_t___m_a_c_r_o_s.html&amp;amp;resultof=%22%42%4c%45%5f%47%41%50%5f%43%4f%4e%4e%5f%53%45%43%5f%4d%4f%44%45%22%20"&gt;GAP attribute security requirement setters&lt;/a&gt; for the function parameters and available security modes.&lt;/p&gt;
&lt;p&gt;To get no write access you should use the &lt;code&gt;BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS()&lt;/code&gt; macro.&lt;/p&gt;
&lt;p&gt;Regards, Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>