<?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>How to set a static passkey on nRF52832(PCA10040) ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15030/how-to-set-a-static-passkey-on-nrf52832-pca10040</link><description>I found a project named &amp;quot;nRF51-ble-app-uart-static-passkey&amp;quot; on Github,
but I want to set a static passkey on nRF52832(PCA10040).
How can I do that? 
 Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Jun 2019 07:05:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15030/how-to-set-a-static-passkey-on-nrf52832-pca10040" /><item><title>RE: How to set a static passkey on nRF52832(PCA10040) ?</title><link>https://devzone.nordicsemi.com/thread/190965?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 07:05:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61e9b038-bfcc-435c-8f5b-c90ab95b3d31</guid><dc:creator>breaker</dc:creator><description>&lt;p&gt;Hi GK, you can take a look at&amp;nbsp;ble_app_gls example. it generate and pop out a random passkey everytime a mobile try to bond with device. no extra steps need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a static passkey on nRF52832(PCA10040) ?</title><link>https://devzone.nordicsemi.com/thread/163422?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 12:13:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3f79b17-ca4b-438f-999c-53ca6188e7a8</guid><dc:creator>GK</dc:creator><description>&lt;p&gt;Hi How can i implement for random passkey please help me&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a static passkey on nRF52832(PCA10040) ?</title><link>https://devzone.nordicsemi.com/thread/57348?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2016 09:52:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:353ed113-0f05-4cdb-82dc-40990f60c3b0</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Have you set that you want to bond, and that you require MITM protection?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SEC_PARAM_BOND                 1                                           /**&amp;lt; Perform bonding. */
#define SEC_PARAM_MITM                 1                                           /**&amp;lt; Man In The Middle protection required. */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Have you set the IO capabilites to display only?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SEC_PARAM_IO_CAPABILITIES      BLE_GAP_IO_CAPS_DISPLAY_ONLY                /**&amp;lt; Display I/O capabilities. */
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a static passkey on nRF52832(PCA10040) ?</title><link>https://devzone.nordicsemi.com/thread/57347?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 08:04:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b8a1b7d-9024-490d-b573-829a9c533b0d</guid><dc:creator>ZhenYi</dc:creator><description>&lt;p&gt;Thanks for your answer, but it doesn&amp;#39;t work in my application....&lt;/p&gt;
&lt;p&gt;I added those code after ble_statck_init() in main, but my mobile phone still can pair nRF52832 without passkey.&lt;/p&gt;
&lt;p&gt;What&amp;#39;s wrong did I do?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a static passkey on nRF52832(PCA10040) ?</title><link>https://devzone.nordicsemi.com/thread/57346?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2016 14:24:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a56b3950-edbe-472b-b377-3769f4ef0474</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You can try the ble_app_gls example in SDK 11.&lt;/p&gt;
&lt;p&gt;Just add&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint8_t passkey[] = &amp;quot;123456&amp;quot;;
ble_opt_t ble_opt;
ble_opt.gap_opt.passkey.p_passkey = &amp;amp;passkey[0];
err_code = sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &amp;amp;ble_opt);
APP_ERROR_CHECK(err_code); 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;somewhere after you have enabled the SoftDevice (ble_stack_init()). And it should work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>