<?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>Get entered passcode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57037/get-entered-passcode</link><description>Hello! 
 I have a custom board with nRF52810 and s132. BLE connection is secured with passcode. it works. 
 I would like to get exact passcode entered by User if the passcode is wrong. Is it possible and how? 
 Thanks in advance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Sep 2020 06:26:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57037/get-entered-passcode" /><item><title>RE: Get entered passcode</title><link>https://devzone.nordicsemi.com/thread/267945?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 06:26:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a4bac2d-351b-4c7f-ac13-deb4a43e403d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Yes. Sending key press notifications is optional, so if you do not get the event, then it is probably not sent by the phone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get entered passcode</title><link>https://devzone.nordicsemi.com/thread/267935?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 05:20:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f25010a5-7eda-4a0e-8f9a-3d8756f1a202</guid><dc:creator>William.wei</dc:creator><description>&lt;p&gt;i guess this event is from mobile phone, so no message is received by nrf device, right ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get entered passcode</title><link>https://devzone.nordicsemi.com/thread/267933?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 04:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6f450f0-ba25-4e88-8305-ea364923b828</guid><dc:creator>William.wei</dc:creator><description>&lt;p&gt;hi Einar,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Can you instruct me how to catch this&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_KEY_PRESSED&amp;nbsp;, i simply add this event in ble_evt_handler, it doesn&amp;#39;t work. also can&amp;#39;t find out any doc about this in devzone.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;William.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get entered passcode</title><link>https://devzone.nordicsemi.com/thread/231353?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 10:32:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5f06f5f-c971-46d5-ad4c-f03b44987fa6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no possibility to get this information from the SoftDevice. The only thing you get is a&amp;nbsp;BLE_GAP_EVT_KEY_PRESSED every time a key is pressed on the peer when using LESC, but there is no way to know which number was entered&amp;nbsp;or the full passkey.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get entered passcode</title><link>https://devzone.nordicsemi.com/thread/231205?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 14:46:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8961015-8d13-4785-96ea-2bb18555e970</guid><dc:creator>Elias L&amp;#246;we</dc:creator><description>&lt;p&gt;Let me clarify it:&lt;/p&gt;
&lt;p&gt;1. I have nRF52840 board with NUS service and BLE connection requires passcode&lt;/p&gt;
&lt;p&gt;2. I connect to the device using lets say iPhone and nRF Connect or Bluefruit app.&lt;/p&gt;
&lt;p&gt;3. iOS asks for passcode, I enter some, lets say `123456`&lt;/p&gt;
&lt;p&gt;4. Right passcode on the device is `654321`&lt;/p&gt;
&lt;p&gt;5. So I get the &lt;span style="color:#000000;"&gt;PM_EVT_CONN_SEC_FAILED event on device side with mesage &lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 132

&amp;lt;warning&amp;gt; peer_manager_handler: Disconnecting conn_handle 0.
&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;6. It is absolutely correct workflow but I would like to know in the firmware, that user entered `123456`, not just that it was wrong.&lt;/p&gt;
&lt;p&gt;Is it possible?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get entered passcode</title><link>https://devzone.nordicsemi.com/thread/231202?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 14:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcce257b-725f-4192-9060-4a8a6ec6f867</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Surely, you must know how the code is entered?&lt;/p&gt;
&lt;p&gt;You must have provided the code which reads whatever input device is used?&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t know - when it&amp;#39;s &lt;em&gt;your&lt;/em&gt; device - how can anyone else possibly know?!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get entered passcode</title><link>https://devzone.nordicsemi.com/thread/231199?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 14:39:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb35aa83-e1fa-4aaa-ac4c-27b1f005f0a2</guid><dc:creator>Elias L&amp;#246;we</dc:creator><description>&lt;p&gt;Yes, it is my device. I can not find which event of PM I have to handle and how I can get entered code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get entered passcode</title><link>https://devzone.nordicsemi.com/thread/231197?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 14:38:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fe9e57c-4456-498e-8c67-42162e397b09</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Is the code being entered on your device?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If yes - then you have control, and can &amp;quot;get&amp;quot; whatever you want.&lt;/li&gt;
&lt;li&gt;If no - then you will have to ask the device developer; but it seems highly unlikely.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>