<?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>BLE remote connect to HID central NCS sample always disconnect.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83206/ble-remote-connect-to-hid-central-ncs-sample-always-disconnect</link><description>Hi: 
 I have a BLE HID remote control that needs to be connected to the HID central(nRF52832).My SDK is NCS v1.8.0. 
 When I try to connect with the HID remote I get the log. 
 
 
 Connected: 8C:85:80:AA:16:56 (public) Failed to set security: -12 The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Jan 2022 10:56:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83206/ble-remote-connect-to-hid-central-ncs-sample-always-disconnect" /><item><title>RE: BLE remote connect to HID central NCS sample always disconnect.</title><link>https://devzone.nordicsemi.com/thread/345864?ContentTypeID=1</link><pubDate>Tue, 04 Jan 2022 10:56:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7a16439-9368-4815-a879-49d7c2dc7655</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure what could be wrong here. We would need to have sniffer trace to get to know what failed.&amp;nbsp;&lt;br /&gt;I found this case has similar error as yours:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/79636/failed-to-set-security--12-whn-the-connection-is-happening-on-uart-example"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/79636/failed-to-set-security--12-whn-the-connection-is-happening-on-uart-example&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Could you try the suggestion there to increase&amp;nbsp;&lt;span&gt;CONFIG_BT_SCAN_NAME_CNT ?&amp;nbsp;&lt;br /&gt;Also please make sure you erased the chip before testing, so that we can be sure it was not be cause the maximum number of paired device was reached so it couldn&amp;#39;t make new bonding (as suggested in the case)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE remote connect to HID central NCS sample always disconnect.</title><link>https://devzone.nordicsemi.com/thread/345790?ContentTypeID=1</link><pubDate>Tue, 04 Jan 2022 02:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:653a04ae-0bdb-4128-849e-3a7d6b4e0d87</guid><dc:creator>v630140</dc:creator><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;I already&amp;nbsp;&lt;span&gt;allow the keyboard and display when testing,&amp;nbsp;but the connection will be disconnected after a few seconds.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Log:&lt;/span&gt;&lt;/p&gt;
&lt;div class="core19-log-entry core19-log-level-info"&gt;
&lt;div class="core19-log-cell core19-log-time"&gt;&lt;span style="font-size:75%;"&gt;10:30:35.256&amp;nbsp;&lt;/span&gt;&lt;span style="font-size:75%;"&gt;Connecting to device&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="core19-log-entry core19-log-level-info"&gt;
&lt;div class="core19-log-cell core19-log-time"&gt;&lt;span style="font-size:75%;"&gt;10:30:35.297&amp;nbsp;&lt;/span&gt;&lt;span style="font-size:75%;"&gt;Connected to device 8C:85:80:AA:16:56: interval: 7.5ms, timeout: 4000ms, latency: 0&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="core19-log-entry core19-log-level-info"&gt;
&lt;div class="core19-log-cell core19-log-time"&gt;&lt;span style="font-size:75%;"&gt;10:30:35.322&amp;nbsp;&lt;/span&gt;&lt;span style="font-size:75%;"&gt;ATT MTU updated for device 8C:85:80:AA:16:56, new value is 247&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="core19-log-entry core19-log-level-info"&gt;
&lt;div class="core19-log-cell core19-log-time"&gt;&lt;span style="font-size:75%;"&gt;10:30:35.647&amp;nbsp;&lt;/span&gt;&lt;span style="font-size:75%;"&gt;Attribute value read, handle: 0x07, value (0x): 41-6E-6B-65-72-2D-41-52-00&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="core19-log-entry core19-log-level-info"&gt;
&lt;div class="core19-log-cell core19-log-time"&gt;&lt;span style="font-size:75%;"&gt;10:30:47.318&amp;nbsp;&lt;/span&gt;&lt;span style="font-size:75%;"&gt;&lt;span style="color:#0000ff;"&gt;Disconnected from device&lt;/span&gt; 8C:85:80:AA:16:56, reason: &lt;span style="color:#0000ff;"&gt;BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1641263111168v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE remote connect to HID central NCS sample always disconnect.</title><link>https://devzone.nordicsemi.com/thread/345637?ContentTypeID=1</link><pubDate>Mon, 03 Jan 2022 11:31:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfbd1f7a-b26e-49f4-b9a0-410c0c46a1e0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can configure the nRF Connect for BLE security setting (before you connect to the device) as follows:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/856x832/__key/communityserver-discussions-components-files/4/pastedimage1641209509060v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;Then in the next window you select &amp;quot;Keyboard and display&amp;quot;:&amp;nbsp;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1641209494464v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE remote connect to HID central NCS sample always disconnect.</title><link>https://devzone.nordicsemi.com/thread/345612?ContentTypeID=1</link><pubDate>Mon, 03 Jan 2022 10:04:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5843e9e-5488-4fdb-91f1-d14a6652f388</guid><dc:creator>v630140</dc:creator><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;sorry, I cannot provide the source code because the BLE remote(HID keyboard) control is provided by a third party.&lt;/p&gt;
&lt;p&gt;And the&amp;nbsp;&lt;span&gt;HID central&lt;/span&gt;&amp;nbsp;in NCS example I used hasn&amp;rsquo;t been modified in any way.&lt;/p&gt;
&lt;p&gt;I tried to connect to the BLE remote control with &lt;span&gt;nRF Connect for Desktop BLE&amp;nbsp;but I don&amp;rsquo;t know how to allow the keyboard and display when testing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you provide me with the operation steps? Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The picture below is the screen of my connection with the BLE remote control&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1641203913367v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Log from nRF Connect for Desktop BLE.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2022_2D00_01_2D00_03T09_5F00_45_5F00_43.902Z_2D00_log.txt"&gt;devzone.nordicsemi.com/.../2022_2D00_01_2D00_03T09_5F00_45_5F00_43.902Z_2D00_log.txt&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your help.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE remote connect to HID central NCS sample always disconnect.</title><link>https://devzone.nordicsemi.com/thread/345484?ContentTypeID=1</link><pubDate>Thu, 30 Dec 2021 13:52:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:757abc3a-49f1-4e4c-b7f2-908513a49b33</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Error -12 means&amp;nbsp;BT_HCI_ERR_CMD_DISALLOWED.&amp;nbsp;&lt;br /&gt;Could you provide the&amp;nbsp;code so that we can test here ?&amp;nbsp;&lt;br /&gt;Could&amp;nbsp;test your HID remote with nRF Connect for Desktop BLE, and allow the keyboard and display when testing ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suspect that there could be a chance that the configuration require the peer device to have keyboard and display.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You may want to capture a&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt; sniffer trace &lt;/a&gt;so we can get to know what happened over the air.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>