<?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>[NUS - Peripheral &amp;amp; Central] error of Set security : -12</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114122/nus---peripheral-central-error-of-set-security--12</link><description>I am programming BLE with the nRF52840-DK. [Toolchain Manager: v1.3.0, IDE: Visual Studio Code (VSCode), SDK: ncs v2.6.0, window11 pro] 
 
 My issue is that even when using the same &amp;#39;NUS_central&amp;#39; code, the results of set_security and pairing vary depending</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Aug 2024 07:50:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114122/nus---peripheral-central-error-of-set-security--12" /><item><title>RE: [NUS - Peripheral &amp; Central] error of Set security : -12</title><link>https://devzone.nordicsemi.com/thread/499903?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 07:50:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c239522-fcc1-4bb6-8e9a-4c8384feb894</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Seongmin,&amp;nbsp;&lt;br /&gt;For example when your phone is paired with your Bluetooth headset.&amp;nbsp;And when you turn off and on&amp;nbsp; your Bluetooth headset (or when it run out of battery) you don&amp;#39;t have to re-bond/pair with the phone again, correct ?&lt;br /&gt;To be able to do that the device has to store the bond information on non-volatile memory so that when it reset/power on-off it doesn&amp;#39;t lose bond information.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In your case, you get error -12 could be because on one side of the connection the bond information has for some reason been erased when the other device still keep the bond information and it won&amp;#39;t allow a new bond until the current bond information has been erased.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NUS - Peripheral &amp; Central] error of Set security : -12</title><link>https://devzone.nordicsemi.com/thread/499869?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 04:08:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d877eb1-269c-4372-a730-8a1b46d4e61c</guid><dc:creator>seongmincho</dc:creator><description>&lt;p&gt;Yes, it&amp;#39;s been resolved. Thank you.&lt;/p&gt;
&lt;p&gt;Could you tell me more specifically about &amp;#39;bond/pair information is stored in non-volatile memory&amp;#39;?&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NUS - Peripheral &amp; Central] error of Set security : -12</title><link>https://devzone.nordicsemi.com/thread/499766?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 12:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0131039b-5951-4f2d-99e3-2bccbb0b53e0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Have you solved the problem ? If you not&amp;nbsp; please don&amp;#39;t click Verified Answer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please clarify if you do a full erase you fix the issue.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Yes bond/pair information is stored in non-volatile memory. This way when you restart the device it would be able to connect and reencrypt the link with paired device.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NUS - Peripheral &amp; Central] error of Set security : -12</title><link>https://devzone.nordicsemi.com/thread/499541?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 11:47:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5c9c076-069c-4ee2-9ed9-6a9f92c6eadf</guid><dc:creator>seongmincho</dc:creator><description>&lt;p&gt;Thanks for the great tip!&lt;/p&gt;
&lt;p&gt;Is there a fundamental way to solve this issue? I think I might have read somewhere that paired devices are stored in non-volatile memory&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NUS - Peripheral &amp; Central] error of Set security : -12</title><link>https://devzone.nordicsemi.com/thread/499504?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 10:02:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:949e770d-5e9b-48be-b1d2-6c2a1cb0e856</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;To completely erase the chip you would need to click the double arrow:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_08_2D00_23-120133.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NUS - Peripheral &amp; Central] error of Set security : -12</title><link>https://devzone.nordicsemi.com/thread/499477?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 07:20:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d95b129-b357-4680-b729-bf0aa6f702db</guid><dc:creator>seongmincho</dc:creator><description>[quote userid="2121" url="~/f/nordic-q-a/114122/nus---peripheral-central-error-of-set-security--12/499376"]So you are testing between 2 nRF52840 DK ?&amp;nbsp;[/quote]
&lt;p&gt;yes. i have three nRF52840 dk&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/114122/nus---peripheral-central-error-of-set-security--12/499376"]Please make sure you erase the chip completely before testing. If they have already bonded before you test you may get the error.&amp;nbsp;[/quote]
&lt;p&gt;My development environment is as follows: [Toolchain Manager: v1.3.0, IDE: Visual Studio Code (VSCode), SDK: ncs v2.6.0, Windows 11 Pro].&lt;/p&gt;
&lt;p&gt;So, when I flash, doesn&amp;#39;t it automatically get completely erased?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NUS - Peripheral &amp; Central] error of Set security : -12</title><link>https://devzone.nordicsemi.com/thread/499376?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2024 12:50:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bf8a735-8c8c-4293-9006-aac99d7207e5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Seongmin,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So you are testing between 2 nRF52840 DK ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please make sure you erase the chip completely before testing. If they have already bonded before you test you may get the error.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please try to capture a sniffer trace each time you test so we can find the difference.&amp;nbsp;&lt;br /&gt;We have a course on how to use the sniffer:&amp;nbsp;&lt;br /&gt;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/"&gt;https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>