<?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>Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7257/clear-only-certain-entries-in-persistent-data</link><description>I am trying to allow 2 peripherals to bond to a central, and would like to be able to use 2 push buttons to delete the bond information for either device. Is it possible to clear the persistent data selectively like this?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 May 2015 10:30:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7257/clear-only-certain-entries-in-persistent-data" /><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25658?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 10:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:913a4a74-8ce1-473a-9eb1-d58f511ab20f</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Unfortunately there is no equivalent function in SDK 7.2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25656?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 06:46:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f24f49a-dd2b-494a-bbbf-8d7269562305</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Then please accept his answer so it is visible to others that this thread has a solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25659?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 15:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:568e8a82-0ccd-451c-b667-2e3fd39c5482</guid><dc:creator>danbujak</dc:creator><description>&lt;p&gt;Is there an equivalent function for SDK 7.2  or would we need to port it ourselves?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25655?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 13:31:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5460efda-e802-4817-a782-25d699a00f00</guid><dc:creator>danbujak</dc:creator><description>&lt;p&gt;This is what Petter suggested below too and this sounds like a reasonable solution to me. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25657?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 10:35:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5098f08e-ec30-420a-9c44-b1d91902f613</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Could this be a solution?&lt;/p&gt;
&lt;p&gt;Button 1 is pressed to allow bonding to device x.&lt;/p&gt;
&lt;p&gt;Wait for the bonding procedure to complete. DM_EVT_SECURITY_SETUP_COMPLETE&lt;/p&gt;
&lt;p&gt;Use dm_handle_get() with the connection handle to get the dm handle of device x.&lt;/p&gt;
&lt;p&gt;Tie the dm handle of device x to button 1 and store it persistently.&lt;/p&gt;
&lt;p&gt;On boot, check if button 1 has any handle tied to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25652?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 07:37:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9fdf967-36e8-4a8d-bbf7-876dd61ca5c5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I have an idea but i am not sure if this will be neat solution for you.
As there are only two buttons, you can map button number to a device_handle, so when you want to delete the bond, you know which button is being pressed and hence you will also have a device handle. It will be then easy to delete the bond info.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25651?ContentTypeID=1</link><pubDate>Wed, 27 May 2015 21:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4827ba56-db5d-46f1-a6ad-d537b8061ce4</guid><dc:creator>danbujak</dc:creator><description>&lt;p&gt;From the further searching I&amp;#39;ve done it seems like when I bond the device using button 1 I would need to save the address of that device as device 1. Then when I want to delete device 1 I just retrieve the address from that fixed location and delete it?&lt;/p&gt;
&lt;p&gt;The issue I&amp;#39;m having is that it seems like all the context storing functions use a device handle, but if I want to delete a device without it being connected then I don&amp;#39;t have access to the handle if I understand correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25653?ContentTypeID=1</link><pubDate>Wed, 27 May 2015 13:54:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:712f1fa1-1094-4bf7-a38f-bd53c52fb75d</guid><dc:creator>danbujak</dc:creator><description>&lt;p&gt;The idea is for example I would boot the system with button 1 held. This would clear the bonding info in slot 1, and accept a new bond from a device. Button 2 would do the same thing for the other device. So basically whichever button was used to bond the device would be used to then delete that device.&lt;/p&gt;
&lt;p&gt;Since the button is being held during bootup we could prevent them from connecting in this mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clear only certain entries in persistent data</title><link>https://devzone.nordicsemi.com/thread/25654?ContentTypeID=1</link><pubDate>Wed, 27 May 2015 10:38:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:595688bf-7f5a-43c7-be2a-d32facf4636a</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;How would you distinguish between the two devices? Button 1 deletes the first bonded? Or button 1 deletes device with ID 1? I&amp;#39;m assuming your are not in a connection with these centrals when you want to delete their bond?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>