<?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>nRF52840 resets when entering wrong passkey</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68820/nrf52840-resets-when-entering-wrong-passkey</link><description>Hi, 
 I have my application based on nRF52840 device. 
 When writting a wrong passkey, my device is reseted. 
 Which can be the reason? I have already implemented event PM_EVT_CONN_SEC_FAILED: 
 static void pm_evt_handler(pm_evt_t const * p_evt) { ret_code_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Nov 2020 13:52:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68820/nrf52840-resets-when-entering-wrong-passkey" /><item><title>RE: nRF52840 resets when entering wrong passkey</title><link>https://devzone.nordicsemi.com/thread/282275?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2020 13:52:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7287421-ab33-446a-b7cf-c34027ed4bef</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0702._5F00_Verify_2D00_answer_2D00_nordic_5F00_2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 resets when entering wrong passkey</title><link>https://devzone.nordicsemi.com/thread/282270?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2020 13:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3a7aee7-866e-438f-afcc-a4a92d27f2f5</guid><dc:creator>Dani</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I have just found the reason: In my application, once disconnected and every 10s, it starts advertising. When wrong passkey was introduced, the application was not waiting for the&amp;nbsp;BLE_GAP_EVT_DISCONNECTED event, and advertising was sure started before receiving this event. Now, I wait for this event to start advertising.&lt;/p&gt;
&lt;p&gt;Thank you so much.&lt;/p&gt;
&lt;p&gt;Dani.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 resets when entering wrong passkey</title><link>https://devzone.nordicsemi.com/thread/282255?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2020 12:38:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22494495-9d0b-476c-8441-89397f4c5652</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Dani,&lt;/p&gt;
&lt;p&gt;When do you call ble_advertising_init() and get invalid state in return? This function is usually called just once on startup, so I don&amp;#39;t see how it is related to the reset you mentioned in your first post.&lt;/p&gt;
&lt;p&gt;Do you have any debug logs that shows when the device is reset?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 resets when entering wrong passkey</title><link>https://devzone.nordicsemi.com/thread/282144?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2020 15:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d643630a-60c7-4cef-ab05-f54cda4f7521</guid><dc:creator>Dani</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In what regards the reset reason I&amp;#39;m observing: ble_advertising_init gives&amp;nbsp;NRF_ERROR_INVALID_STATE.&lt;/p&gt;
&lt;p&gt;Dani.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 resets when entering wrong passkey</title><link>https://devzone.nordicsemi.com/thread/282068?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2020 13:03:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f174b186-05ca-4d3e-8bef-98ee7086df6b</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8764._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>