<?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>set static pass key  for nrf51822 in example code--hrs with dfu ，nrf51822 reboot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13340/set-static-pass-key-for-nrf51822-in-example-code--hrs-with-dfu-nrf51822-reboot</link><description>we add static pass key in example code hrs with dfu，but when connecting with phone，input passkey on phone，the nrf51822 will reboot device_manager_cnfg.h 
 main.c</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 May 2016 08:59:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13340/set-static-pass-key-for-nrf51822-in-example-code--hrs-with-dfu-nrf51822-reboot" /><item><title>RE: set static pass key  for nrf51822 in example code--hrs with dfu ，nrf51822 reboot</title><link>https://devzone.nordicsemi.com/thread/50861?ContentTypeID=1</link><pubDate>Mon, 02 May 2016 08:59:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a8f5bff-eff1-4fd4-8939-daf38f90c53c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi RiverYWang,&lt;/p&gt;
&lt;p&gt;in your main.c file you have
device_manager_evt_handler and when you have entered a wrong pass key or if the authentication has failed for some other reasons then you do not handle the error. Instead you say that event_result can never fail and if it fails then your default handling is system_reboot in in app_error.c (app_error_handler-&amp;gt;NVIC_SystemReset)&lt;/p&gt;
&lt;p&gt;So you have to do two things.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;you have to handle error AUTH status errors (Search for BLE_GAP_SEC_STATUS)
OR remove     APP_ERROR_CHECK(event_result); from your main.c device_manager_evt_handler&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The default of APP_ERROR_CHECK failures for you seems to be system reset. Please override the error handler in app_error.c so that you handle the errors as you wish rather than system restarts.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Please have a look at &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;this&lt;/a&gt; post, to understand better on how error handling works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: set static pass key  for nrf51822 in example code--hrs with dfu ，nrf51822 reboot</title><link>https://devzone.nordicsemi.com/thread/50859?ContentTypeID=1</link><pubDate>Mon, 02 May 2016 06:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08efa551-0856-489e-ac7b-17721799e644</guid><dc:creator>RiverYWang</dc:creator><description>&lt;p&gt;we still have this problem, we try to use whitelist to solve it. maybe you can provide about whitelist information for us? thanks a lot!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: set static pass key  for nrf51822 in example code--hrs with dfu ，nrf51822 reboot</title><link>https://devzone.nordicsemi.com/thread/50860?ContentTypeID=1</link><pubDate>Mon, 02 May 2016 06:03:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:826312f1-7194-4360-9a90-af1116e457fe</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi RiverYWang, Thanks for understanding. I am feeling much better now. Did you manage to find the problem in the mean time? If not please let me know and I can look into the file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: set static pass key  for nrf51822 in example code--hrs with dfu ，nrf51822 reboot</title><link>https://devzone.nordicsemi.com/thread/50858?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2016 01:18:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bac49caa-e765-4c13-84f5-cee99323970c</guid><dc:creator>RiverYWang</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry to heard that ,Take care of yourself! Wish you recover soon!the sdk version is 10.0.0,THX&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: set static pass key  for nrf51822 in example code--hrs with dfu ，nrf51822 reboot</title><link>https://devzone.nordicsemi.com/thread/50857?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2016 10:31:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8b7f226-a312-421b-b31c-c8453b055dd8</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;sorry for late reply, i was sick, which sdk did you try this on? I shall try it on my desk and see why it happens, I just need to know sdk version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: set static pass key  for nrf51822 in example code--hrs with dfu ，nrf51822 reboot</title><link>https://devzone.nordicsemi.com/thread/50856?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2016 01:14:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57ff84f7-c3f2-4775-8ac9-9fa6b15cc397</guid><dc:creator>RiverYWang</dc:creator><description>&lt;p&gt;sorry，I upload my file，THX&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: set static pass key  for nrf51822 in example code--hrs with dfu ，nrf51822 reboot</title><link>https://devzone.nordicsemi.com/thread/50855?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2016 12:48:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15d12bdd-7e4f-4db1-ad14-189bc3b70d50</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I have no idea how to read or help you when you post something like this. :(
Please reformat and attach your code either as a file or your project as a zip so that we can look into it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>