<?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>Ram Memory of Attribute Size question</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49962/ram-memory-of-attribute-size-question</link><description>Hi, 
 I have some question below: note: the project_uuid belong uuid-16bit by my define uuid of product myself. 
 1. My project uses project_uuid and DFU_btn_less services. I figure out If my definition is wrong. I set &amp;quot;#define NRF_SDH_BLE_VS_UUID_COUNT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jul 2019 01:52:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49962/ram-memory-of-attribute-size-question" /><item><title>RE: Ram Memory of Attribute Size question</title><link>https://devzone.nordicsemi.com/thread/200169?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2019 01:52:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80731cb8-e659-42e8-b42b-ff0c27e9d580</guid><dc:creator>CFF.K</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Simonr:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Anythings is done. Thank you for your help.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ram Memory of Attribute Size question</title><link>https://devzone.nordicsemi.com/thread/199931?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 07:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02483980-329e-4d24-b156-1487bf07a707</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Ken&lt;/p&gt;
&lt;p&gt;Q3: Yes, this was my mistake, the userspace solution was something used in older SoftDevices that had more limited storage, please use NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE in order to increase the size of the GATT table.&lt;/p&gt;
&lt;p&gt;Q5: To include the&amp;nbsp;Service Changed characteristic in the Attribute Table set&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_SERVICE_CHANGED&amp;nbsp;in your sdk_config.h file. The ble_app_hrs example does this for example.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q6: Increasing the size of your GATT table should solve the&amp;nbsp;NRF_ERROR_NO_MEM = sd_ble_gatts_characteristic_add error.&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;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ram Memory of Attribute Size question</title><link>https://devzone.nordicsemi.com/thread/199903?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 02:00:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6beaf38-404e-4c34-8643-1bd29e2f4bba</guid><dc:creator>CFF.K</dc:creator><description>&lt;p&gt;Hi Simonr: Thank you for your answer.&lt;/p&gt;
&lt;p&gt;excuse me, I forgot to say I used SDK 15.2.0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Follow your answer, we continue to discuss, thanks.&lt;/p&gt;
&lt;p&gt;Q1-Q2: This&amp;#39;s done.&lt;/p&gt;
&lt;p&gt;Q3: Follow your answer 5 days ago, you told me &amp;quot;&lt;span&gt;You can move your characteristics to userspace and if you are using a recent SoftDevice you can increase the size of the GATT table.&lt;/span&gt;&amp;quot;,&amp;nbsp;&lt;span&gt;I don&amp;#39;t know what is userspace, and how to use userspace,&amp;nbsp;Is like to set&amp;nbsp;NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE&amp;nbsp;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q4: This&amp;#39;s done.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q5: What&amp;nbsp;kind the&amp;nbsp;product need to&amp;nbsp;add this service? (example: HID_mouse, heart rate sensor)&amp;nbsp; Because I consider if this service adds to our product. what do you recommend?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Q6: I modify&amp;nbsp;NRF_SDH_BLE_GAP_DATA_LENGTH and&amp;nbsp;NRF_SDH_BLE_GATT_MAX_MTU_SIZE, &lt;span&gt;I set NRF_SDH_BLE_GAP_DATA_LENGTH&amp;nbsp;is 27 change to 251, and&amp;nbsp;I set NRF_SDH_BLE_GATT_MAX_MTU_SIZE is&amp;nbsp;23&amp;nbsp;change to&amp;nbsp;247. Actually, I refer to the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fble_sdk_app_att_mtu.html"&gt;ATT_MTU Throughput Example&lt;/a&gt;&amp;nbsp;already. But my project happen&amp;nbsp;&amp;nbsp;&amp;quot;NRF_ERROR_NO_MEM = sd_ble_gatts_characteristic_add&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note: you told&amp;nbsp;me that &amp;quot;I can move your characteristics to userspace&amp;quot;&amp;nbsp;or &amp;quot;re-set NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE&amp;quot;. what different in two methods? and which one can fix the Q6 problem?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your patience.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ram Memory of Attribute Size question</title><link>https://devzone.nordicsemi.com/thread/199825?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 13:44:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1612dba5-52a6-44e0-9796-9878ccb40f97</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Ken&lt;/p&gt;
&lt;p&gt;Sorry, but I&amp;#39;m still having some trouble understanding some of your questions, I hope these answers will be helpful.&lt;/p&gt;
&lt;p&gt;Q1-2:&amp;nbsp;Yes, you&amp;#39;ll need to increase your NRF_SDH_BLE_VS_UUID_COUNT if you&amp;#39;re using the sd_ble_uuid_vs_add() function.&lt;/p&gt;
&lt;p&gt;Q3:&amp;nbsp;Sorry, for recent SoftDevices it&amp;#39;s usually easier to just increase the size of your GATT table.&lt;/p&gt;
&lt;p&gt;Q4: I misunderstood your initial question, you&amp;#39;re correct. Increasing the size of&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE will make more space for services in RAM and likely fix your problem.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q5:&amp;nbsp;Hopefully this will help you understand, as we don&amp;#39;t have any official documentation except what can be found on the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fgroup__nrf__sdh__ble__config.html&amp;amp;anchor=gaa48b9eb7ac737fce8a9db02e7a62ea35"&gt;Infocenter&lt;/a&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The NRF_SDH_BLE_SERVICE_CHANGED is used in nrf_sdh_ble.c, in the sd_ble_cfg_set(), inside the bl_cfg struct.&lt;/p&gt;
&lt;p&gt;As long as nrf_sdh_ble_default_cfg_set() returns NRF_SUCCESS, you should be fine.&lt;/p&gt;
&lt;p&gt;Remember to set the RAM settings according to when you have NRF_SDH_BLE_SERVICE_CHANGED = 1. This way, you will ensure that the SoftDevice has enough memory to work with the NRF_SDH_BLE_SERVICE_CHANGED when needed. It is not a problem that the SoftDevice has too much RAM.&lt;/p&gt;
&lt;p&gt;Note that it is not possible to delete services with the SoftDevice. Only add them. But of course, if you disable and enable the SoftDevice again, all the services have to be initialized again. If you skip one service after enabling it so that it isn&amp;#39;t enabled, it will be &amp;quot;deleted&amp;quot; (not included).&lt;/p&gt;
&lt;p&gt;Q6: Do you have to increase the ATT_MTU size?&amp;nbsp;The &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fble_sdk_app_att_mtu.html"&gt;ATT_MTU Throughput Example&lt;/a&gt;&amp;nbsp;shows you how to increase the ATT_MTU size.&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><item><title>RE: Ram Memory of Attribute Size question</title><link>https://devzone.nordicsemi.com/thread/199647?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 05:54:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b85c6ca7-ee41-4aaa-89de-1f820e32f7e0</guid><dc:creator>CFF.K</dc:creator><description>&lt;p&gt;Thank you, Simnr:&lt;/p&gt;
&lt;p&gt;Q1, Q2: I combined question1 with question2. How to calculate I need&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_VS_UUID_COUNT&amp;nbsp;? I think to use&amp;nbsp;sd_ble_uuid_vs_add(), if the function return&amp;nbsp;p_uuid_type=2(BLE_UUID_TYPE_VENDOR_BEGIN) represent I need increase&amp;nbsp;NRF_SDH_BLE_VS_UUID_COUNT. Is this idea right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q3: I don&amp;#39;t know what is userspace, and how to use userspace, could you provide examples or introduce document?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q4: I don&amp;#39;t&amp;nbsp;understand you say &amp;quot;decreasing the size of the&amp;nbsp;GATTS Attribute table in the SoftDevice&amp;quot;, because I set&amp;nbsp;NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE&amp;nbsp;is 1408 change to 2048, I think I do increase rather than&amp;nbsp;decrease. So could you explain this concept?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q5: Thank your answer, but&amp;nbsp;I don&amp;#39;t know this service for application, why need&amp;nbsp;this service in ble devices? Could you provide the document of&amp;nbsp;NRF_SDH_BLE_SERVICE_CHANGED or recommend for me?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Q6: Q3 and Q4 are solved for GATTS size of Ram problem. how is a different method between Q3 and Q4? In my problem, I need to add ATT_MTU induce&amp;nbsp;&amp;nbsp;&amp;quot;NRF_ERROR_NO_MEM = sd_ble_gatts_characteristic_add&amp;quot;, which&amp;nbsp;are methods&amp;nbsp;great solution for this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ram Memory of Attribute Size question</title><link>https://devzone.nordicsemi.com/thread/199261?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2019 12:04:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5e486fd-7836-40cc-9c31-b13c3169bcd4</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Ken&lt;/p&gt;
&lt;p&gt;1. If you have 1 vendor-specific UUID this should be correct.&lt;/p&gt;
&lt;p&gt;2. Sorry, but I&amp;#39;m struggling to see what you mean here.&amp;nbsp;Can you try rephrasing your question?&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp;&lt;span&gt;You&amp;#39;re running out of memory in the SoftDevice itself. You can move your characteristics to userspace and if you are using a recent SoftDevice you can increase the size of the GATT table.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4. Well, by decreasing the size of the&amp;nbsp;GATTS Attribute table in the SoftDevice, there will be more room for other things, such as increased MTU.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;5. NRF_SDH_BLE_SERVICE_CHANGED must be enabled in order to include the &amp;quot;Service Changed&amp;quot; characteristic to the Attribute table, so yes, this takes up some space in the Attribute table within the SoftDevice.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Due to the summer holidays in Norway, our support team is understaffed this week, and delayed replies must be expected. Sorry for the inconvenience!&lt;br /&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;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>