<?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>Custom characteristic isnt added to the custom service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77352/custom-characteristic-isnt-added-to-the-custom-service</link><description>I am using this tutorial to write a custom service and I got to a point to add custom characteristics and got a few questions: 
 - I don&amp;#39;t seem to find any characteristic with UUID 1401 under Unknown Service that was just added with a UUID 1400. 
 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Jul 2021 10:16:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77352/custom-characteristic-isnt-added-to-the-custom-service" /><item><title>RE: Custom characteristic isnt added to the custom service</title><link>https://devzone.nordicsemi.com/thread/322634?ContentTypeID=1</link><pubDate>Fri, 30 Jul 2021 10:16:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19299310-686a-47a9-b5f6-9943ce37832c</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="morpho"]For the BLE Sniffer, is the idea to run a python application while the BLE app is running that sets ups the service? [/quote]
&lt;p&gt;The BLE sniffer is an application that runs on a separate Nordic device and sniffs all nearby BLE packets, and you can use Wireshark to see them on your computer.&lt;/p&gt;
&lt;p&gt;See&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_sniffer_ble/UG/sniffer_ble/intro.html"&gt;nRF Sniffer for Bluetooth LE&lt;/a&gt;&amp;nbsp;for more information&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;attr_md.read_perm  = p_cus_init-&amp;gt;custom_value_char_attr_md.read_perm;&lt;/pre&gt;
&lt;p&gt;The purpose of this line is the set the read permissions of the&amp;nbsp;&lt;span&gt;characteristic value declaration&amp;nbsp;added to&amp;nbsp;the Attribute Table to the same value as the read permission set here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt; &lt;code&gt;&lt;span&gt;BLE_GAP_CONN_SEC_MODE_SET_OPEN&lt;/span&gt;(&amp;amp;cus_init.&lt;span&gt;custom_value_char_attr_md&lt;/span&gt;.&lt;span&gt;read_perm&lt;/span&gt;);&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="morpho"]I didn&amp;#39;t see any error when I ran this app. Could you also please explain the way nordic suggested to&amp;nbsp;increase the RAM Size i.e setting to 0xDDE0 whereas&amp;nbsp;currently&amp;nbsp;RAM Size in my settings is to&lt;span&gt;&amp;nbsp;RAM_SIZE is set to&amp;nbsp;0x3dda0?&lt;/span&gt;[/quote]
&lt;p&gt;If you need to increase the RAM you should get an error from the SoftDevice when running the application. Try debugging the application in SES, then you should see this message in the SES terminal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristic isnt added to the custom service</title><link>https://devzone.nordicsemi.com/thread/321194?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 18:30:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52b0d4fa-d017-4fef-9927-1b5392b20b19</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi! I will be on vacation until Monday so I will take a look at this case then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristic isnt added to the custom service</title><link>https://devzone.nordicsemi.com/thread/320343?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 02:15:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fde677a5-f33c-4d60-97dd-59e27fc5107a</guid><dc:creator>morpho</dc:creator><description>&lt;p&gt;Hi Heidi,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thanks for the response. For the BLE Sniffer, is the idea to run a python application while the BLE app is running that sets ups the service? I tried running the example.py inside&amp;nbsp;&lt;span class="s1"&gt;BleSniffer/extcap and it outputs &amp;quot;&lt;/span&gt;&lt;span class="s1"&gt;No sniffers found!&amp;quot;&lt;/span&gt;&lt;/p&gt;
[quote userid="82276" url="~/f/nordic-q-a/77352/custom-characteristic-isnt-added-to-the-custom-service/319986#319986"]The BLE_GAP_CONN_SEC_MODE_SET_OPEN function takes a bl_gap_conn_sec_mode_t struct and sets&amp;nbsp;sm = 1 and lv = 1, i.e security mode 1 level 1, which is an open link.&amp;nbsp;[/quote]
&lt;p&gt;what purposes does the following line serve then?&lt;/p&gt;
&lt;pre&gt;attr_md.read_perm  = p_cus_init-&amp;gt;custom_value_char_attr_md.read_perm;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
[quote userid="82276" url="~/f/nordic-q-a/77352/custom-characteristic-isnt-added-to-the-custom-service/319986#319986"]When you add a vendor-specific UUID to the BLE stack, the SoftDevice requires more RAM, so you need to tell the Linker to allocate more RAM to the SoftDevice.. When you try to run the application without increasing the RAM allocations,&amp;nbsp;you should see an output like this:[/quote]
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;I didn&amp;#39;t see any error when I ran this app. Could you also please explain the way nordic suggested to&amp;nbsp;increase the RAM Size i.e setting to 0xDDE0 whereas&amp;nbsp;currently&amp;nbsp;RAM Size in my settings is to&lt;span&gt;&amp;nbsp;RAM_SIZE is set to&amp;nbsp;0x3dda0?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristic isnt added to the custom service</title><link>https://devzone.nordicsemi.com/thread/319986?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 11:38:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bda9e23-5087-4203-a229-ef91a63b0be3</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- I don&amp;#39;t seem to find any characteristic with UUID 1401 under Unknown Service that was just added with a UUID 1400.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- I am&amp;nbsp;modifying&amp;nbsp;&lt;strong&gt;ble_app_uart&lt;/strong&gt;&amp;nbsp;to add a new service and a characteristic. Even though I have&amp;nbsp;&lt;strong&gt;ble_nus_init&lt;/strong&gt;() commented out from&amp;nbsp;&lt;strong&gt;services_init&lt;/strong&gt;(), I still see UART TX/RX characteristic. Why would that be?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For these two questions, I&amp;#39;d want to use a &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le"&gt;BLE sniffer&lt;/a&gt; to sniff the packets the device is advertising. That might tell us more about what&amp;#39;s happening.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- where are&amp;nbsp;&lt;strong&gt;read_perm&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong&gt;write_perm&lt;/strong&gt;&amp;nbsp;being initialized? I initially had issues compiling like that and the error was incorrect parameters. The properties and attribute metadata are supposed to align, yes?&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In custom_value_char_add in ble_cus.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cus_init.custom_value_char_attr_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cus_init.custom_value_char_attr_md.write_perm);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The BLE_GAP_CONN_SEC_MODE_SET_OPEN function takes a bl_gap_conn_sec_mode_t struct and sets&amp;nbsp;sm = 1 and lv = 1, i.e security mode 1 level 1, which is an open link.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The permissions set in the attribute metadata should correspond with the properties set in the characteristic metadata struct char_md.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- What&amp;#39;s up with changing the RAM size and start addresses to accommodate for the vendor-specific UUID to the BLE stack? Initially, I see the RAM_SIZE is set to&amp;nbsp;0x3dda0 which equals ~256KB (?) and in the tutorial, it&amp;#39;s being set to 56800. Can you please clarify this modification?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When you add a vendor-specific UUID to the BLE stack, the SoftDevice requires more RAM, so you need to tell the Linker to allocate more RAM to the SoftDevice.. When you try to run the application without increasing the RAM allocations,&amp;nbsp;you should see an output like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from &amp;lt;OLD_RAM_START&amp;gt; to &amp;lt;NEW_RAM_START&amp;gt;.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Maximum RAM size for application is &amp;lt;RAM_SIZE&amp;gt;.&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;where &amp;lt;NEW_RAM_START&amp;gt; and &amp;lt;RAM_SIZE&amp;gt; are the new values for RAM_START and RAM_SIZE.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Heidi&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>