<?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>Fixed Passkey Pairing on Peripheral without I/O</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126427/fixed-passkey-pairing-on-peripheral-without-i-o</link><description>We are developing a Bluetooth peripheral device. 
 The peripheral has no input/output capability, and a fixed passkey is pre-programmed. 
 
 We would like the pairing to succeed only when the central device enters the correct passkey during pairing. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Jan 2026 04:53:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126427/fixed-passkey-pairing-on-peripheral-without-i-o" /><item><title>RE: Fixed Passkey Pairing on Peripheral without I/O</title><link>https://devzone.nordicsemi.com/thread/558552?ContentTypeID=1</link><pubDate>Tue, 13 Jan 2026 04:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3377f7f9-d48b-4e2c-9042-195f36543222</guid><dc:creator>Masa Kawa</dc:creator><description>&lt;div&gt;
&lt;p&gt;&lt;span&gt;Thank you for your response.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We will refer to the information you provided regarding the concept of passkey and serial number.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As for the fixed passkey, we were able to implement it as follows, so we will close this inquiry:&lt;/p&gt;
&lt;p&gt;1.Set the passkey at startup using &lt;code&gt;sd_ble_opt_set&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;2.When the &lt;code&gt;BLE_GAP_EVT_SEC_PARAMS_REQUEST&lt;/code&gt; event occurs, respond with the following parameters using &lt;code&gt;sd_ble_gap_sec_params_reply&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_gap_sec_params_t sec_param;
sec_param.bond = 0;
sec_param.mitm = 1;
sec_param.lesc = 0;
sec_param.keypress = 0;
sec_param.io_caps = BLE_GAP_IO_CAPS_DISPLAY_ONLY;
sec_param.oob = 0;
sec_param.min_key_size = 7;
sec_param.max_key_size = 16;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed Passkey Pairing on Peripheral without I/O</title><link>https://devzone.nordicsemi.com/thread/558532?ContentTypeID=1</link><pubDate>Mon, 12 Jan 2026 16:12:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8d09146-d824-476c-bf73-e788f93b056a</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If what you want is a serial number, then it would be better to either use the device address or let the device advertise with its serial number using manufacturer specific data in the advertising packet. That way you would find the device (based on the serial number) before you connect to it. With using passkey for this, you will have to connect first, then figure out whether or not you are connected to the correct device.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed Passkey Pairing on Peripheral without I/O</title><link>https://devzone.nordicsemi.com/thread/558463?ContentTypeID=1</link><pubDate>Mon, 12 Jan 2026 03:06:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5a49625-37d1-4267-b546-3c145d761d90</guid><dc:creator>Masa Kawa</dc:creator><description>&lt;div&gt;I understand the security concerns.&lt;/div&gt;
&lt;div&gt;For the device we are developing, we are not considering using random keys for security; instead, we intend to use the passkey essentially as a device serial number (by attaching the fixed passkey to the device and having the user read it).&lt;/div&gt;
&lt;div&gt;&lt;br /&gt; Could you please provide a detailed explanation of how to configure &lt;code&gt;ble_gap_sec_params_t&lt;/code&gt; and what values should be set?&lt;/div&gt;
&lt;div&gt;Should we use &lt;code&gt;sd_ble_gap_sec_params_reply()&lt;/code&gt; during the &lt;code&gt;BLE_GAP_EVT_SEC_PARAMS_REQUEST&lt;/code&gt; event?&lt;/div&gt;
&lt;div&gt;If so, what would be the appropriate parameter values?&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed Passkey Pairing on Peripheral without I/O</title><link>https://devzone.nordicsemi.com/thread/558372?ContentTypeID=1</link><pubDate>Fri, 09 Jan 2026 10:39:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:421627e5-d5b0-4ad9-8a1a-381a2cecce00</guid><dc:creator>Emil Lenngren</dc:creator><description>&lt;p&gt;I don&amp;#39;t know why you want this; it is&amp;nbsp;explicitly discouraged by the specification, since you can brute force it in 20 attempts, see&amp;nbsp;&lt;a id="" href="https://insinuator.net/2021/10/change-your-ble-passkey-like-you-change-your-underwear/"&gt;https://insinuator.net/2021/10/change-your-ble-passkey-like-you-change-your-underwear/&lt;/a&gt;&amp;nbsp;for an explanation. The protocol is only designed for and secure if a new randomly generated key is used for each new attempt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed Passkey Pairing on Peripheral without I/O</title><link>https://devzone.nordicsemi.com/thread/558337?ContentTypeID=1</link><pubDate>Fri, 09 Jan 2026 01:34:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:889ce984-b75c-4088-bf8c-7a2a58b30115</guid><dc:creator>Masa Kawa</dc:creator><description>&lt;p&gt;&lt;span&gt;Thank you for your response. We will refer to your guidance for configuring the passkey.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span&gt;Regarding the IO Capability configuration, my understanding is that it is set via ble_gap_sec_params_t. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you please provide more details?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Should we configure it by calling sd_ble_gap_sec_params_reply() on the BLE_GAP_EVT_SEC_PARAMS_REQUEST event?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, what would be the appropriate values for ble_gap_sec_params_t in this case?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fixed Passkey Pairing on Peripheral without I/O</title><link>https://devzone.nordicsemi.com/thread/558309?ContentTypeID=1</link><pubDate>Thu, 08 Jan 2026 14:57:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43c09e4e-b17d-45ec-b526-f24d61b2885f</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;In nRF5 SDK you can configure a static passkey with &lt;code&gt;&lt;a href="https://docs.nordicsemi.com/bundle/s132_v7.3.0_api/page/group_b_l_e_c_o_m_m_o_n_f_u_n_c_t_i_o_n_s.html#ga511d431bc3d9ccf9bef09ad20cbf855a"&gt;sd_ble_opt_set&lt;/a&gt;(BLE_GAP_OPT_PASSKEY, &amp;amp;passkey_options)&lt;/code&gt;, where &lt;code&gt;&amp;amp;passkey_options&lt;/code&gt; is of type &lt;a href="https://docs.nordicsemi.com/bundle/s132_v7.3.0_api/page/unionble_opt_t.html"&gt;ble_opt_t&lt;/a&gt; and with the field&amp;nbsp;&lt;code&gt;gap_opt.passkey.p_passkey&lt;/code&gt;&amp;nbsp;pointing to a &lt;code&gt;uint8_t&lt;/code&gt; array of length 6 containing the wanted passkey. See also the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/s132_v7.3.0_api/page/structble_gap_opt_passkey_t.html"&gt;ble_gap_opt_passkey_t Struct Reference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Alternatively, instead of the above configuration, you can handle it by providing the static key with &lt;a href="https://docs.nordicsemi.com/bundle/s132_v7.3.0_api/page/group_b_l_e_g_a_p_f_u_n_c_t_i_o_n_s.html#ga01e04f368c8e7b3aaa31740dbd53bd12"&gt;sd_ble_gap_auth_key_reply()&lt;/a&gt; on BLE_GAP_EVT_AUTH_KEY_REQUEST events.&lt;/p&gt;
&lt;p&gt;Then if your device claims to be Display (&lt;a href="https://docs.nordicsemi.com/bundle/s132_v7.2.0_api/page/group_b_l_e_g_a_p_i_o_c_a_p_s.html#ga4e2f9010ba35ab6488ec181f75786435"&gt;BLE_GAP_IO_CAPS_DISPLAY_ONLY&lt;/a&gt;), and the central has Keyboard (either Keyboard Display or Keyboard Only), you will get a situation where the central must enter that static passkey for the key generation.&lt;/p&gt;
&lt;p&gt;There are some other IO Capability combinations also triggering passkey entry on the central. For more details on the mapping from IO Capabilities to key generation method (i.e. when Passkey Entry is selected), please consult&amp;nbsp;the Bluetooth Core Specification Version 6.0, Vol 3, Part H, section 2.3.5.1 &lt;em&gt;Selecting key generation method&lt;/em&gt;, table 2.8 (the table goes over two pages). The remainder of section 2.3.5 contains the descriptions of those methods.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>