<?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>different calls to add characteristics to a service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77629/different-calls-to-add-characteristics-to-a-service</link><description>Module model: nrf52832 
 SDK: 15.2 
 
 Hi, 
 I am trying to add custom characteristics to a custom service. 
 There are two ways that I am aware of: 
 a. sd_ble_gatts_characteristic_add(uint16_t service_handle, ble_gatts_char_md_t const *p_char_md, ble_gatts_attr_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Jul 2021 07:42:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77629/different-calls-to-add-characteristics-to-a-service" /><item><title>RE: different calls to add characteristics to a service</title><link>https://devzone.nordicsemi.com/thread/320825?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 07:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7d2bec1-ce3a-4291-98b0-e658e2fb6818</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;1. The sd_ble_gatts_characteristic_add() is the SoftDevices call to add a characteristic, usable just by flashing the SoftDevice and a simple app compiled against its headers. This call is rather generically written to cover every single use case and configuration option you might have.&lt;/p&gt;
&lt;p&gt;The characteristic_add() is a function provided by the SDK, which acts as a wrapper function for the SoftDevice function. It still does the same thing on the lowest level with some abstraction to make it easier to use. This does however increase the size and code space of the data holders for input parameters that are re-used in the library.&lt;/p&gt;
&lt;p&gt;You can use whatever function you like, as they essentially do the same thing.&lt;/p&gt;
&lt;p&gt;2. The read_access is a security requirement for reading a characteristic value, while read_perm is the permissions set for a set security mode.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>