<?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>NRF51-DK disconnects after second notification</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6082/nrf51-dk-disconnects-after-second-notification</link><description>So I&amp;#39;m currently trying my hand at some very simple things that one can do with the NRF51-DK. 
 One of those things involves sending notifications to a client on certain inputs. 
 I now have the following problem: 
 I can connect, register for notifications</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Mar 2015 14:00:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6082/nrf51-dk-disconnects-after-second-notification" /><item><title>RE: NRF51-DK disconnects after second notification</title><link>https://devzone.nordicsemi.com/thread/21293?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 14:00:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fcb8f1b-6e2b-4a93-be3f-aa1cbaf8b006</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Blackclaws: No, you can add more attribute (service/characteristic) or change the value but you can&amp;#39;t modify the attribute properties or remove them. If you want to modify or remove, you would need to disable the softdevice and enable it again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51-DK disconnects after second notification</title><link>https://devzone.nordicsemi.com/thread/21292?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 11:37:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34e2d33a-1ff9-4ce0-b122-d3e0dc6c14c3</guid><dc:creator>Blackclaws</dc:creator><description>&lt;p&gt;Is it actually possible to change the pointer after adding the characteristic? Or change an added characteristics attributes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51-DK disconnects after second notification</title><link>https://devzone.nordicsemi.com/thread/21291?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 10:24:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a972fe84-d5e6-4621-b2c2-730bdca990c8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Blackclaws: And one more thing about VLOC_USER is that you would need to make sure the pointer you used should be static or global, and won&amp;#39;t be discarded when the function is finished.
I don&amp;#39;t think there is a simple way to detect if you use &amp;quot;not-good&amp;quot; pointer when calling softdevice API. The softdevice API does check for the range of the input pointer, but just to make sure it&amp;#39;s not pointed to the memory area reserved by the softdevice or outside of the maximum range 32kB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51-DK disconnects after second notification</title><link>https://devzone.nordicsemi.com/thread/21290?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2015 19:29:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f3d6a90-3a6a-4dd4-a176-0a72c90fd3b9</guid><dc:creator>Blackclaws</dc:creator><description>&lt;p&gt;OK I think I found the problem. I used BLE_GATTS_VLOC_USER and instead of passing a pointer to the data buffer I accidentally passed a pointer to a pointer to a data structure. This probably meant that as I was writing to my notification it overwrote parts it should not have overwritten, namely parts of the bluetooth stack or other nasty things.&lt;/p&gt;
&lt;p&gt;This makes me wonder. Is there any easy way to track illegal memory access operations on the NRF51 platform?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51-DK disconnects after second notification</title><link>https://devzone.nordicsemi.com/thread/21289?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2015 19:16:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de3342d7-125d-4e3f-8355-fa376065aee8</guid><dc:creator>Blackclaws</dc:creator><description>&lt;p&gt;The error handler isn&amp;#39;t triggered. It is still the default one which loops infinitely when called and this would effectively terminate the application as far as I see it which doesn&amp;#39;t happen.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51-DK disconnects after second notification</title><link>https://devzone.nordicsemi.com/thread/21288?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2015 18:03:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5c57890-4de0-4b92-b860-db308d0f21a9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Have you tried to place a breakpoint in the app_error_handler() to see if an error occurred from somewhere else in your program while sending the notifications.&lt;/p&gt;
&lt;p&gt;app_error_handler() is declared as [weak] in app_error.c so you can place the breaktpoint there unless you have re-declared it somewhere else. Also remember add &amp;quot;DEBUG&amp;quot; to the pre-processor defintions if you like to read out the error code,etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>