<?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>Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124665/connection-security-level-is-stuck-at-level-1-after-it-had-successfully-paired-with-confirmed-connection-security-level-4-with-an-iphone</link><description>Hi, 
 My development environment: 
 - VS Code 
 - nRF Connect SDK: v2.7.0 
 Description: 
 - My firmware had successfully paired (with passcode) with an iPhone. Security level reaches level 4 as expected. BLE advertising is setup with accept_list to make</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Oct 2025 07:39:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124665/connection-security-level-is-stuck-at-level-1-after-it-had-successfully-paired-with-confirmed-connection-security-level-4-with-an-iphone" /><item><title>RE: Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/thread/550652?ContentTypeID=1</link><pubDate>Mon, 06 Oct 2025 07:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86816df2-5420-4587-b5e8-333168734bff</guid><dc:creator>quan1328</dc:creator><description>&lt;p&gt;No, this is not bonding deleted at one side (either Central or peripheral); and as I had repeated a few times in the earlier replies, this connection security level is 4, i.e.&amp;nbsp;Authenticated LE Secure Connections (MITM, ECDH), it&amp;#39;s not Just-Work, i.e. level 2. So, the upper part of your reply is not applicable to our case.&lt;/p&gt;
&lt;p&gt;We would take a look at the debug tutorial, which might be helpful.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;&lt;!-- notionvc: 5a36498c-5005-4307-a677-88f87b08dea7 --&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/thread/550602?ContentTypeID=1</link><pubDate>Fri, 03 Oct 2025 13:56:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee606b47-3a8b-46a5-af93-e631b97bf569</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If bonding information is deleted on one side but not the other, or if the stack is not configured to allow re-pairing, the security upgrade can fail. The default behaviour is not to allow re-pairing with just works. If you want this to be allowed, you can set CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=y.&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As for the crash, you can refer to this DevAcademy course&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/&lt;/a&gt;&amp;nbsp;to debug.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/thread/550533?ContentTypeID=1</link><pubDate>Fri, 03 Oct 2025 03:12:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afa08cc9-850b-49cb-bebc-3745447171d0</guid><dc:creator>quan1328</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;`settings_load()`: yes, we did have to call it to get the pairing feature work.&lt;/p&gt;
&lt;p&gt;The Exercise 2 and the github resource: we build on this sample code.&lt;/p&gt;
&lt;p&gt;The problem is: somehow, sometime, the SDK failed to transition the connection security level from 1 to 4.&lt;/p&gt;
&lt;p&gt;To keep it simple for you, I outlined the code that you may need to track down the problem (if I had misused some libraries) and you may observe via the log that: when the BLE&amp;nbsp;stack falls into this error state, the connection&amp;nbsp;becomes invalidated; accessing any members of its struct&amp;nbsp;crashes our application. After paired, transitioning connection security level is&amp;nbsp;done by the BLE stack. Please correct me if I&amp;#39;m wrong.&lt;/p&gt;
&lt;p&gt;What could be the problem?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/thread/550513?ContentTypeID=1</link><pubDate>Thu, 02 Oct 2025 15:02:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3334cbbd-7288-4c47-a291-119a54a86441</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Do you c&lt;span&gt;all&amp;nbsp;&lt;/span&gt;&lt;code&gt;settings_load()&lt;/code&gt;&lt;span&gt;&amp;nbsp;after initializing Bluetooth? Check out this Devacademy course:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-5-bluetooth-le-security-fundamentals/topic/blefund-lesson-5-exercise-2/"&gt;https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-5-bluetooth-le-security-fundamentals/topic/blefund-lesson-5-exercise-2/&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you test this sample project&amp;nbsp;&lt;a href="https://github.com/NordicDeveloperAcademy/bt-fund/tree/v2.9.0-v2.7.0/l5/l5_e2_sol"&gt;https://github.com/NordicDeveloperAcademy/bt-fund/tree/v2.9.0-v2.7.0/l5/l5_e2_sol&lt;/a&gt;?&amp;nbsp;Do you see the same issue? If not, please refer to that project.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/thread/550276?ContentTypeID=1</link><pubDate>Wed, 01 Oct 2025 02:52:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bbcd4b3-1d4b-4f64-81e7-d2d7a714814b</guid><dc:creator>quan1328</dc:creator><description>&lt;p&gt;Amanda,&lt;/p&gt;
&lt;p&gt;I have minimized&amp;nbsp;the log printout into the attached screenshot. This log is printed when a single click on a button is triggered.&lt;/p&gt;
&lt;p&gt;When the single click is triggered, this function is called:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void print_ecg_ble_state()
{
    print_data(sys_data, SYS_DATA_TOTAL_LEN, &amp;quot;sys_data&amp;quot;);

    print_addr_le(bond_addr, &amp;quot;bonded addr&amp;quot;);
    if (is_bonded()) // LED is currently off
    {
        led_start_blinking(LED_BLINK_CHECK_ALIVE, 3000);
    }
    // else, LED is blinking with pattern @ref LED_BLINK_PATTERN_BOND_CLEARED

    if (current_conn)
    {
        LOG_INF(&amp;quot;conn available with security level: %d %d %d&amp;quot;,
                bt_conn_get_security(current_conn),
                is_streaming,
                conn_param);
        print_connection_params(current_conn); // it goes here!!!
    }
    else
    {
        LOG_INF(&amp;quot;conn not available&amp;quot;);
    }

    print_remaining_time(&amp;amp;hold_adv_timer, &amp;quot;hold_adv_timer&amp;quot;);
    LOG_INF(&amp;quot;pairing attempt: %d&amp;quot;, pairing_attempt_count);

    LOG_INF(&amp;quot;NAND info\n\taddr: 0x%08x, mode: %d, pktnum: %d&amp;quot;,
            NAND_Addr,
            NAND_mode,
            Pkt_num);
    if (NAND_mode == 1)
    {
        LOG_INF(&amp;quot;NOfflen: %d&amp;quot;, NOff_len);
    }
}

void print_connection_params(struct bt_conn *conn)
{
    struct bt_conn_info info;
    int err = bt_conn_get_info(conn, &amp;amp;info);
    if (err &amp;lt; 0)
    {
        LOG_ERR(&amp;quot;Failed to get connection info: %d&amp;quot;, err); // this line does not print!
    }
    else
    {
        LOG_INF(&amp;quot;Connection params: interval %d*1.25ms, latency %d, timeout %d*10ms, security: %d&amp;quot;,
                info.le.interval, info.le.latency, info.le.timeout,
                info.security.level);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/6165.log.png" /&gt;&lt;/p&gt;
&lt;p&gt;As in the green annotation line, `current_conn` is available with the printed security level at level 1.&lt;/p&gt;
&lt;p&gt;`current_conn` is only established and referenced by `bt_conn_ref()` in `on_connected()` event. And `bt_conn_unref()` in `on_disconnected()` event&lt;/p&gt;
&lt;p&gt;(Please refer to my original post for how I used it)&lt;/p&gt;
&lt;p&gt;I can confirm that while&amp;nbsp;in this error state, no other BLE scanner can &amp;quot;see&amp;quot; it (my device only accepts 1 connection).&lt;/p&gt;
&lt;p&gt;When connection is made, the BLE stack should have been transitioned its security level from 1 to 4 without any interactions from the app. But in this error state, nothing happened after connection is established between the iPhone Central and my device (acting as a Peripheral).&lt;/p&gt;
&lt;p&gt;What could have happened?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/thread/550201?ContentTypeID=1</link><pubDate>Tue, 30 Sep 2025 13:34:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:782b2b71-d51f-4cae-9ef6-9f78653d4b1e</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user=""] It sticks to level 1 forever until the system crashes (causing reboot).[/quote]
&lt;p&gt;Could you provide the log?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/thread/550111?ContentTypeID=1</link><pubDate>Tue, 30 Sep 2025 08:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:506b9f57-becb-4d12-a2d5-e1b744908777</guid><dc:creator>quan1328</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Of course, we did have those settings turned on to get the pairing feature work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SETTINGS=y
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After it had paired with a Central (an iPhone or ESP32S3), it worked for a few hours (power-resetting the board still gets the Central reconnected successfully). Just &lt;strong&gt;sometimes&lt;/strong&gt;, the connection is stuck at level 1, the Central is not populated with connected event (such as in iOS, Bluetooth Settings, the device is shown as &lt;strong&gt;Not Connected&lt;/strong&gt;). In this error state, if I print out the connection info, application crash as I had mentioned above.&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just a reminder: since we do use Accept list feature, there is no other device can connect to it, except for the paired Central (my device only accepts 1 pair:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;`CONFIG_BT_MAX_PAIRED=1`&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection security level is stuck at level 1 after it had successfully paired (with confirmed connection security level 4) with an iPhone.</title><link>https://devzone.nordicsemi.com/thread/550035?ContentTypeID=1</link><pubDate>Mon, 29 Sep 2025 13:23:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fa3ee4d-7bc5-4bf4-8b27-51ea46b4a8b7</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you a&lt;span&gt;dd setting support in your application to store data in flash? If not, please add it. Check out this DevAcademy course:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-5-bluetooth-le-security-fundamentals/topic/blefund-lesson-5-exercise-2/"&gt;https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-5-bluetooth-le-security-fundamentals/topic/blefund-lesson-5-exercise-2/&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>