<?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>Failed to set security (-12) whn the connection is happening on UART example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79636/failed-to-set-security--12-whn-the-connection-is-happening-on-uart-example</link><description>Hi everybody, 
 I am with two custom oards that include nrf52840 chip, one acting as central and one as peripheal. 
 This example is custom to get multilink, for that i save the handlers of connections on array to make the managments. 
 I succes connecting</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Sep 2021 10:13:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79636/failed-to-set-security--12-whn-the-connection-is-happening-on-uart-example" /><item><title>RE: Failed to set security (-12) whn the connection is happening on UART example</title><link>https://devzone.nordicsemi.com/thread/329786?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 10:13:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00082aa2-0229-4e0e-adbc-591ffc117047</guid><dc:creator>sotillo2409</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1631787250964v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to set security (-12) whn the connection is happening on UART example</title><link>https://devzone.nordicsemi.com/thread/329785?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 10:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2843c0d-f620-4598-a8d0-d5df5643c14c</guid><dc:creator>sotillo2409</dc:creator><description>&lt;p&gt;Hi another time, the issue is closed, i get the error due to&amp;nbsp;CONFIG_BT_SCAN_NAME_CNT=1 when i have a multilink system, setting it to&amp;nbsp;CONFIG_BT_SCAN_NAME_CNT=19 is solved and the error never appears&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to set security (-12) whn the connection is happening on UART example</title><link>https://devzone.nordicsemi.com/thread/329730?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 07:40:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbff94af-a9b8-42e3-b6f0-b762242feadb</guid><dc:creator>sotillo2409</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have two&amp;nbsp;&lt;span&gt;nRF52840DK&amp;#39;s. I have 2 custom boards and 2 nrf53dks&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes i make my custom board files as this video explain:&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=KSivO9Cf1TE"&gt;https://www.youtube.com/watch?v=KSivO9Cf1TE&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The only difference between nrf52840dk and my custom board are assigment of leds, buttons and uart.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is my Kconfig:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;# nRF52840 DK NRF52840 board configuration

# Copyright (c) 2016 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config BOARD_ENABLE_DCDC
	bool &amp;quot;Enable DCDC mode&amp;quot;
	select SOC_DCDC_NRF52X
	default y
	depends on BOARD_NRF52840DK_NRF52840

config BT_EXT_ADV
    bool &amp;quot;Extended Advertising and Scanning support&amp;quot;
    depends on BT_HCI &amp;amp;&amp;amp; BT
    help
      Select this to enable Extended Advertising API support.
      This enables support for advertising with multiple advertising sets,
      extended advertising data, and advertising on LE Coded PHY.
      It enables support for receiving extended advertising data as a
      scanner, including support for advertising data over the LE coded PHY.
      It enables establishing connections over LE Coded PHY

config SHELL_BACKEND_DUMMY
    bool &amp;quot;Enable dummy backend.&amp;quot;
    depends on SHELL_BACKENDS &amp;amp;&amp;amp; SHELL
    help
      Enable dummy backend which can be used to execute commands with no
      need for physical transport interface.

config BT_USER_PHY_UPDATE
    bool &amp;quot;User control of PHY Update Procedure&amp;quot;
    depends on BT_PHY_UPDATE &amp;amp;&amp;amp; BT_CONN &amp;amp;&amp;amp; BT_HCI_HOST &amp;amp;&amp;amp; BT_HCI &amp;amp;&amp;amp; BT
    help
      Enable application access to initiate the PHY Update Procedure.
      The application can also register a callback to be notified about PHY
      changes on the connection. The current PHY info is available in the
      connection info.

config BT_SCAN_BLOCKLIST
    bool &amp;quot;Scanning device blocklist&amp;quot;
    depends on BT_SCAN &amp;amp;&amp;amp; BT
    help
      Scanning device blocklist. Scanning module ignores
      any devices which are on this list.

config BT_SCAN_BLOCKLIST_LEN
    int &amp;quot;Blocklist maximum device count&amp;quot;
    default 19
    depends on BT_SCAN_BLOCKLIST &amp;amp;&amp;amp; BT_SCAN &amp;amp;&amp;amp; BT
    help
      Maximum blocklist devices count.

config BT_MAX_CONN
    int &amp;quot;Maximum number of simultaneous connections&amp;quot;
    range 1 64
    default 19
    depends on BT_CONN &amp;amp;&amp;amp; BT_HCI &amp;amp;&amp;amp; BT
    help
      Maximum number of simultaneous Bluetooth connections
      supported.

config BT_SCAN_FILTER_ENABLE
    bool &amp;quot;Enabling filters for the Scan library.&amp;quot;
    default n
    depends on BT_SCAN &amp;amp;&amp;amp; BT
    help
      Enabling filters for the Scan library.

config BT_SCAN_NAME_CNT
    int &amp;quot;Number of name filters&amp;quot;
    default 2
    depends on BT_SCAN_FILTER_ENABLE &amp;amp;&amp;amp; BT_SCAN &amp;amp;&amp;amp; BT
    help
      Number of name filters

config BT_CTLR_TX_PWR_DYNAMIC_CONTROL
    bool &amp;quot;Tx Power Dynamic Control&amp;quot;
    depends on BT_HCI_VS_EXT &amp;amp;&amp;amp; BT_CTLR &amp;amp;&amp;amp; BT_HCI &amp;amp;&amp;amp; BT
    help
      Enable dynamic control of Tx power per role/connection.
      Provides HCI VS commands to set and get the current Tx
      power on an individual role/connection basis.

config BT_CTLR_ADVANCED_FEATURES
    bool &amp;quot;Show advanced features&amp;quot;
    depends on BT_LL_SW_SPLIT &amp;amp;&amp;amp; BT_CTLR &amp;amp;&amp;amp; BT_HCI &amp;amp;&amp;amp; BT
    help
      Makes advanced features visible to controller developers.

config BT_CTLR_CONN_RSSI
    bool &amp;quot;Connection RSSI&amp;quot;
    default y if BT_HCI_RAW
    depends on BT_CTLR_CONN_RSSI_SUPPORT &amp;amp;&amp;amp; BT_CONN &amp;amp;&amp;amp; BT_CTLR &amp;amp;&amp;amp; BT_HCI &amp;amp;&amp;amp; BT
    help
      Enable connection RSSI measurement.

config BT_CTLR_TX_PWR
    bool &amp;quot;Tx Power&amp;quot;
    default BT_CTLR_TX_PWR_0
    depends on BT_CTLR &amp;amp;&amp;amp; BT_HCI &amp;amp;&amp;amp; BT
    help
      Select the supported BLE Radio transmit power level in dBm.
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will concrete the situation: I was working normally with a custom board as central and nrf53 as peripheral and i can connect without problems, in the past i could connect two custom_board too. But arrived to a&amp;nbsp; point that i unknown I only succes on connect with one nrf53. In the rest of cases(another nrf53 and the other custom_board) the error of secrity is triggered.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The curiosity thing is that both nrf53 i upload the same code and the same child image and only in one i succes on the connexion. Another curiosity is that uploading the same code on both devices, on the programmer seems this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Device that i am able to connect&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1631777677120v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Device that i am not able to connect&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1631777873702v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thn you for the fast response,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to set security (-12) whn the connection is happening on UART example</title><link>https://devzone.nordicsemi.com/thread/329723?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 07:19:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93b725ca-7fdf-4243-8ac6-3b5bb6bb5bf6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tested the same on standard nRF52840DK&amp;#39;s?&lt;/p&gt;
&lt;p&gt;What Kconfig modifications did you make to the original example?&lt;/p&gt;
&lt;p&gt;Do you have custom board files for the hardware you are using?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to set security (-12) whn the connection is happening on UART example</title><link>https://devzone.nordicsemi.com/thread/329551?ContentTypeID=1</link><pubDate>Wed, 15 Sep 2021 08:29:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3a19ed3-d36a-4f5b-bc4e-b5c7863cc1d7</guid><dc:creator>sotillo2409</dc:creator><description>&lt;p&gt;I update with new information, for check and try to debug i get the original UART example central and peripheral and put it on the devices. The same error is triggered too. When this error is triggered theorically the conection is maded, but there aren&amp;#39;t communication between devices. I suppose that is a Kconfig modification that i make and i am not be able to identify. There are some way to set a fixed security param statically on defconfig to avoid this problem on future??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to set security (-12) whn the connection is happening on UART example</title><link>https://devzone.nordicsemi.com/thread/329528?ContentTypeID=1</link><pubDate>Wed, 15 Sep 2021 05:14:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ff75a28-4c54-4921-818f-c232ff12b801</guid><dc:creator>sotillo2409</dc:creator><description>&lt;p&gt;All is happening on SDK 1.6.1 and nRF connect 3.7.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>