<?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>Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112968/intermittent-ble-connection</link><description>I am working with nRF Connect SDK 2.6.1 on a Central and a Peripheral and I am running the BAP similar to the nRF Audio Example. I am using out of band pairing over UART for the initial secure connection. The OOB pairing works fine. 
 After connection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Sep 2024 14:42:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112968/intermittent-ble-connection" /><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/503430?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 14:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4816e33-bb69-4641-ab8b-53ab010d2a59</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;We are no longer having the issue since changing our antenna layout.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/495426?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2024 13:11:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:525acfd1-0f86-4c44-9195-d1f1aaac6f74</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Thank you for the update!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/495194?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 12:06:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebd28583-d6fd-4b3c-b74e-4f1e4cd8c87e</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;Hello Maria. We have recently discovered an antenna layout issue so its possible this is a legitimate failure to exchange data during the connection process. Once I am given a device with a corrected layout I will attempt to duplicate this failure and post the logs as requested or close the issue. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/495193?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 12:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77d1e4b5-6712-452d-a791-290d7e202c81</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The connection fails with 0x3D (&lt;span&gt;&lt;span dir="ltr"&gt;BTLE_CONN_TERMINATED_DUE_TO_MIC_FAILURE) which indicates incorrect encryption keys. Please do a new test with CONFIG_BT_LOG_SNIFFER_INFO=y and share the sniffer log for a successful and an unsuccessful connection. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Maria&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/495069?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2024 15:11:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c32b41c9-2923-47ca-9912-6a597359c02e</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;I have caught up on the previous posts here and have found that I need to forward this issue internally. Thank you again for your patience, and I will update you again by Thursday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/494856?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2024 15:39:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbaa82c1-dfe0-4d74-9e37-3d11ae4b7643</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am following up with this case while Hieu is away. Unfortunately I have not had the time to look into the issue this week due to the aforementioned high workload.&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll hear from me again on Monday. Thank you for your patience.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493987?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 19:08:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d9d5394-89a8-4139-99ac-9ef1eb10840f</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;Above is the log for turning on the HCI core debug logging.&lt;br /&gt;Also, on the peripheral, that bt_conn_set_state occurs every time there is a disconnection. But on the Central it only occurs when there is a failure.&lt;/p&gt;
&lt;p&gt;I was unable to set a breakpoint at that location on the peripheral. I think because its a delayed work queue. The breakpoint just advances to the next function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My suspicion&amp;#39;s regarding the connection handle was based on a previous post I had seen regarding not waiting for the disconnect callback before attempting another connection but I was unable to find that issue in my logs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493986?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 19:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:634c26e4-f0f1-4798-9c26-044f7d5f955c</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-- [00:08:27.978,240] &amp;lt;inf&amp;gt; ble_supv: Advertising to CB:80:08:52:DA:8D (random) started

-- [00:08:31.791,351] &amp;lt;dbg&amp;gt; bt_hci_core: bt_recv: buf 0x20023f5c len 33
-- [00:08:31.791,381] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: Getting net_buf from queue
-- [00:08:31.791,381] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: buf 0x20023f5c type 1 len 33
-- [00:08:31.791,381] &amp;lt;dbg&amp;gt; bt_hci_core: hci_event: event 0x3e
-- [00:08:31.791,412] &amp;lt;dbg&amp;gt; bt_hci_core: hci_le_meta_event: subevent 0x0a
-- [00:08:31.791,534] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_le_enh_conn_complete: status 0x00 handle 119                                                                                                 role 1 peer CB:80:08:52:DA:8D (random) peer RPA 00:00:00:00:00:00
-- [00:08:31.791,595] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_le_enh_conn_complete: local RPA 00:00:00:00:0                                                                                                0:00
-- [00:08:31.791,595] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 0 ref 1 -&amp;gt; 2
-- [00:08:31.791,625] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 0 ref 2 -&amp;gt; 1
-- [00:08:31.791,625] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 0 ref 1 -&amp;gt; 2
-- [00:08:31.791,656] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_set_state: connecting-adv -&amp;gt; connected
-- [00:08:31.791,687] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_accept: conn 0x20005778 handle 119
-- [00:08:31.791,687] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_connected: chan 0x200066d4 cid 0x0006
-- [00:08:31.792,022] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_create: opcode 0x2016 param_len 2
-- [00:08:31.792,053] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_create: buf 0x200252e8
-- [00:08:31.792,053] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_send_sync: buf 0x200252e8 opcode 0x2016 l                                                                                                en 5
-- [00:08:31.792,083] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: count 2
-- [00:08:31.792,083] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 4
-- [00:08:31.792,114] &amp;lt;dbg&amp;gt; bt_hci_core: send_cmd: calling net_buf_get
-- [00:08:31.792,114] &amp;lt;dbg&amp;gt; bt_hci_core: send_cmd: calling sem_take_wait
-- [00:08:31.792,114] &amp;lt;dbg&amp;gt; bt_hci_core: send_cmd: Sending command 0x2016 (buf 0x200252e8) to                                                                                                 driver
-- [00:08:31.792,114] &amp;lt;dbg&amp;gt; bt_hci_core: bt_send: buf 0x200252e8 len 5 type 0
-- [00:08:31.792,144] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 1
-- [00:08:31.792,175] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:
-- [00:08:31.792,175] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: Adding conn 0x20005778 to poll list
-- [00:08:31.792,175] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: wait on host fifo
-- [00:08:31.792,205] &amp;lt;dbg&amp;gt; bt_hci_core: hci_tx_thread: Calling k_poll with 3 events
-- [00:08:31.792,236] &amp;lt;dbg&amp;gt; bt_hci_core: bt_recv: buf 0x20023f7c len 8
-- [00:08:31.792,327] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Conn evnt
-- [00:08:31.792,327] &amp;lt;inf&amp;gt; oob: Push:20
-- [00:08:31.792,419] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Bonds:Conn Evnt
-- [00:08:31.792,419] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: No phy conn
-- [00:08:31.792,449] &amp;lt;inf&amp;gt; oob: MSG 20
-- [00:08:31.792,449] &amp;lt;inf&amp;gt; oob: OOB msgq during BLE
-- [00:08:31.792,572] &amp;lt;dbg&amp;gt; bt_hci_core: bt_recv: buf 0x200252e8 len 6
-- [00:08:31.792,572] &amp;lt;dbg&amp;gt; bt_hci_core: hci_cmd_status: opcode 0x2016
-- [00:08:31.792,572] &amp;lt;dbg&amp;gt; bt_hci_core: hci_cmd_done: opcode 0x2016 status 0x00 buf 0x200252                                                                                                e8
-- [00:08:31.792,602] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_send_sync: rsp 0x200252e8 opcode 0x2016 l                                                                                                en 0
-- [00:08:31.792,633] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 119 ref 2 -&amp;gt; 1
-- [00:08:31.792,633] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: Getting net_buf from queue
-- [00:08:31.792,663] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: buf 0x20023f7c type 1 len 8
-- [00:08:31.792,663] &amp;lt;dbg&amp;gt; bt_hci_core: hci_event: event 0x3e
-- [00:08:31.792,663] &amp;lt;dbg&amp;gt; bt_hci_core: hci_le_meta_event: subevent 0x12
-- [00:08:31.792,694] &amp;lt;dbg&amp;gt; bt_adv: bt_hci_le_adv_set_terminated: status 0x00 adv_handle 0 co                                                                                                nn_handle 0x77 num 0
-- [00:08:31.792,694] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 119 ref 1 -&amp;gt; 2
-- [00:08:31.792,694] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 119 ref 2 -&amp;gt; 1
-- [00:08:31.842,376] &amp;lt;dbg&amp;gt; bt_hci_core: bt_recv: buf 0x200246cc len 11
-- [00:08:31.842,407] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: Getting net_buf from queue
-- [00:08:31.842,407] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: buf 0x200246cc type 3 len 11
-- [00:08:31.842,437] &amp;lt;dbg&amp;gt; bt_hci_core: hci_acl: buf 0x200246cc
-- [00:08:31.842,437] &amp;lt;dbg&amp;gt; bt_hci_core: hci_acl: handle 119 len 7 flags 2
-- [00:08:31.842,437] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 119 ref 1 -&amp;gt; 2
-- [00:08:31.842,468] &amp;lt;dbg&amp;gt; bt_conn: tx_notify: conn 0x20005778
-- [00:08:31.842,468] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_recv: handle 119 len 7 flags 02
-- [00:08:31.842,468] &amp;lt;dbg&amp;gt; bt_conn: bt_acl_recv: First, len 7 final 3
-- [00:08:31.842,468] &amp;lt;dbg&amp;gt; bt_conn: bt_acl_recv: Successfully parsed 7 byte L2CAP packet
-- [00:08:31.842,498] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_send_cb: conn handle 119 buf len 7 cb 0x59169 us                                                                                                er_data 0x20014954
-- [00:08:31.842,529] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 119 ref 2 -&amp;gt; 3
-- [00:08:31.842,529] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 119 ref 3 -&amp;gt; 2
-- [00:08:31.842,529] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_host_num_completed_packets: Reporting complet                                                                                                ed packet for handle 119
-- [00:08:31.842,559] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_create: opcode 0x0c35 param_len 5
-- [00:08:31.842,559] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_create: buf 0x200252e8
-- [00:08:31.842,559] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_send: opcode 0x0c35 len 8
-- [00:08:31.842,590] &amp;lt;dbg&amp;gt; bt_hci_core: bt_send: buf 0x200252e8 len 8 type 0
-- [00:08:31.842,620] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 119 ref 2 -&amp;gt; 1
-- [00:08:31.842,651] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: count 3
-- [00:08:31.842,651] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 0
-- [00:08:31.842,651] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 0
-- [00:08:31.842,651] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 4
-- [00:08:31.842,681] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_process_tx: conn 0x20005778
-- [00:08:31.842,681] &amp;lt;dbg&amp;gt; bt_conn: send_buf: conn 0x20005778 buf 0x20025820 len 7
-- [00:08:31.842,681] &amp;lt;dbg&amp;gt; bt_conn: send_buf: send single
-- [00:08:31.842,681] &amp;lt;dbg&amp;gt; bt_conn: do_send_frag: conn 0x20005778 buf 0x20025820 len 7 flags                                                                                                 0x02
-- [00:08:31.842,712] &amp;lt;dbg&amp;gt; bt_hci_core: bt_send: buf 0x20025820 len 11 type 2
-- [00:08:31.842,742] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:
-- [00:08:31.842,742] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: Adding conn 0x20005778 to poll list
-- [00:08:31.842,773] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: wait on host fifo
-- [00:08:31.842,773] &amp;lt;dbg&amp;gt; bt_hci_core: hci_tx_thread: Calling k_poll with 3 events
-- [00:08:31.992,156] &amp;lt;dbg&amp;gt; bt_hci_core: bt_recv: buf 0x200248a8 len 7
-- [00:08:31.992,156] &amp;lt;dbg&amp;gt; bt_hci_core: hci_num_completed_packets: num_handles 1
-- [00:08:31.992,156] &amp;lt;dbg&amp;gt; bt_hci_core: hci_num_completed_packets: handle 119 count 1
-- [00:08:31.992,187] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 119 ref 1 -&amp;gt; 2
-- [00:08:31.992,218] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 119 ref 2 -&amp;gt; 1
-- [00:08:31.992,218] &amp;lt;dbg&amp;gt; bt_conn: tx_complete_work: conn 0x20005778
-- [00:08:31.992,248] &amp;lt;dbg&amp;gt; bt_conn: tx_notify: conn 0x20005778
-- [00:08:31.992,248] &amp;lt;dbg&amp;gt; bt_conn: tx_notify: tx 0x20014588 cb 0x59169 user_data 0x20014954
-- [00:08:31.992,584] &amp;lt;dbg&amp;gt; bt_hci_core: bt_recv: buf 0x20023f7c len 15
-- [00:08:31.992,614] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: Getting net_buf from queue
-- [00:08:31.992,614] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: buf 0x20023f7c type 1 len 15
-- [00:08:31.992,645] &amp;lt;dbg&amp;gt; bt_hci_core: hci_event: event 0x3e
-- [00:08:31.992,645] &amp;lt;dbg&amp;gt; bt_hci_core: hci_le_meta_event: subevent 0x05
-- [00:08:31.992,645] &amp;lt;dbg&amp;gt; bt_hci_core: le_ltk_request: handle 119
-- [00:08:31.992,675] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 119 ref 1 -&amp;gt; 2
-- [00:08:31.992,675] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_create: opcode 0x201a param_len 18
-- [00:08:31.992,675] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_create: buf 0x200252e8
-- [00:08:31.992,706] &amp;lt;dbg&amp;gt; bt_hci_core: bt_hci_cmd_send: opcode 0x201a len 21
-- [00:08:31.992,706] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 119 ref 2 -&amp;gt; 1
-- [00:08:31.992,736] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: count 3
-- [00:08:31.992,736] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 4
-- [00:08:31.992,767] &amp;lt;dbg&amp;gt; bt_hci_core: send_cmd: calling net_buf_get
-- [00:08:31.992,767] &amp;lt;dbg&amp;gt; bt_hci_core: send_cmd: calling sem_take_wait
-- [00:08:31.992,767] &amp;lt;dbg&amp;gt; bt_hci_core: send_cmd: Sending command 0x201a (buf 0x200252e8) to                                                                                                 driver
-- [00:08:31.992,797] &amp;lt;dbg&amp;gt; bt_hci_core: bt_send: buf 0x200252e8 len 21 type 0
-- [00:08:31.992,797] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 0
-- [00:08:31.992,828] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 0
-- [00:08:31.992,828] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:
-- [00:08:31.992,828] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: Adding conn 0x20005778 to poll list
-- [00:08:31.992,858] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: wait on host fifo
-- [00:08:31.992,858] &amp;lt;dbg&amp;gt; bt_hci_core: hci_tx_thread: Calling k_poll with 3 events
-- [00:08:31.993,438] &amp;lt;dbg&amp;gt; bt_hci_core: bt_recv: buf 0x200252e8 len 8
-- [00:08:31.993,438] &amp;lt;dbg&amp;gt; bt_hci_core: hci_cmd_complete: opcode 0x201a
-- [00:08:31.993,438] &amp;lt;dbg&amp;gt; bt_hci_core: hci_cmd_done: opcode 0x201a status 0x00 buf 0x200252                                                                                                e8
-- [00:08:32.192,291] &amp;lt;dbg&amp;gt; bt_hci_core: bt_recv: buf 0x20023f7c len 6
-- [00:08:32.192,291] &amp;lt;dbg&amp;gt; bt_hci_core: hci_disconn_complete_prio: status 0x00 handle 119 re                                                                                                ason 0x3d
-- [00:08:32.192,291] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 119 ref 1 -&amp;gt; 2
-- [00:08:32.192,321] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_set_state: connected -&amp;gt; disconnect-complete
-- [00:08:32.192,321] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 119 ref 2 -&amp;gt; 1
-- [00:08:32.192,352] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: Getting net_buf from queue
-- [00:08:32.192,352] &amp;lt;dbg&amp;gt; bt_hci_core: rx_work_handler: buf 0x20023f7c type 1 len 6
-- [00:08:32.192,382] &amp;lt;dbg&amp;gt; bt_hci_core: hci_event: event 0x05
-- [00:08:32.192,382] &amp;lt;dbg&amp;gt; bt_hci_core: hci_disconn_complete: status 0x00 handle 119 reason                                                                                                 0x3d
-- [00:08:32.192,382] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 119 ref 1 -&amp;gt; 2
-- [00:08:32.192,413] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_set_state: disconnect-complete -&amp;gt; disconnected
-- [00:08:32.192,413] &amp;lt;dbg&amp;gt; bt_conn: tx_notify: conn 0x20005778
-- [00:08:32.192,443] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 119 ref 2 -&amp;gt; 1
-- [00:08:32.192,474] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: count 3
-- [00:08:32.192,474] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 0
-- [00:08:32.192,474] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 1
-- [00:08:32.192,474] &amp;lt;dbg&amp;gt; bt_hci_core: process_events: ev-&amp;gt;state 0
-- [00:08:32.192,504] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:
-- [00:08:32.192,535] &amp;lt;dbg&amp;gt; bt_hci_core: hci_tx_thread: Calling k_poll with 2 events
-- [00:08:32.192,565] &amp;lt;dbg&amp;gt; bt_conn: deferred_work: conn 0x20005778
-- [00:08:32.192,565] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_disconnected: chan 0x200066d4 cid 0x0006
-- [00:08:32.192,565] &amp;lt;dbg&amp;gt; bt_smp: smp_pairing_complete: got status 0x8
-- [00:08:32.192,596] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_encrypt_change: chan 0x200066d4 conn 0x20005778 ha                                                                                                ndle 119 encrypt 0x00 hci status 0x1f
-- [00:08:32.192,596] &amp;lt;wrn&amp;gt; ble_supv: Security failed: level 1 err 9
-- [00:08:32.192,596] &amp;lt;wrn&amp;gt; ble_supv: Failed to disconnect -128
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493978?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 17:39:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5d4deb9-0eb4-4c90-a2e4-6ad3e10bb844</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;Regarding the v2.7.0 change, I&amp;nbsp;don&amp;#39;t know what exactly is going on in the BLE stack during the connection procedure, but I was speculating if the Central tried to connect a 2nd time to the Peripheral in the middle of the connection process, it could cause a disconnection from the 1st attempt or possibly a failed 2nd connection attempt because its now already connected. I think this would be a question for someone more familiar with whoever addressed this &amp;quot;issue&amp;quot; that was resolved in 2.7.0. Etc-were other people seeing similar issues that I&amp;#39;m seeing?&lt;br /&gt;&lt;br /&gt;I will follow up with the responses to the remainder of your questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493977?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 17:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f7a0ca5-7d52-4d73-b3e4-cb8f48f4ae24</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Could you please share how the v2.7.0 change item could result in the issue? I don&amp;#39;t quite follow.&lt;/p&gt;
&lt;p&gt;One thing stands out in the Peripheral log to me:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;dbg&amp;gt; bt_conn: bt_conn_set_state: connected -&amp;gt; disconnect-complete&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is odd because this log can only be produced&amp;nbsp;here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1/subsys/bluetooth/host/conn.c#L800"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1/subsys/bluetooth/host/conn.c#L800&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does&amp;nbsp;this consistently appear before a failure?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you please set a breakpoint there and use debug mode to get the call stack leading up to that?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;While doing that, could you please also enable&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/kconfig/index.html#CONFIG_BT_HCI_CORE_LOG_LEVEL_DBG"&gt;CONFIG_BT_HCI_CORE_LOG_LEVEL_DBG&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Also, regarding&amp;nbsp;the initial suspicion that the connection handle is somehow being reused and mixed up, do you see this being the case in the full log? The log so far is only for the&amp;nbsp;attempt where the issue happens, so I don&amp;#39;t see what the connection handle is before that.&lt;/p&gt;
&lt;p&gt;Another thing is, if you want to upload large amount of log text, you might want to use the Insert &amp;gt; Code function:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1721064625084v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, I am out of office tomorrow. Another engineer will follow-up with you.&amp;nbsp;We are all facing abnormally high loading, so please excuse us if there is any delay in following up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493960?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 15:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3dc2943-b0b0-401e-ba77-0d656b8846f3</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;I noticed in the latest SDK release, an issue was fixed in the nRF5340. Is this a symptom of this issue? Is it trying to connect again during the connection process?&lt;br /&gt;&lt;img style="max-height:232px;max-width:445px;" height="232" src="https://devzone.nordicsemi.com/resized-image/__size/890x464/__key/communityserver-discussions-components-files/4/pastedimage1721056161192v1.png" width="445" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493900?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 12:23:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77cfa21d-cda8-44ac-911e-4df9042382df</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;I was able to get a log file from the Central when the failure occurred as well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:284px;max-width:393px;" height="284" src="https://devzone.nordicsemi.com/resized-image/__size/786x568/__key/communityserver-discussions-components-files/4/pastedimage1721046223174v1.png" width="393" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493894?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 12:03:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eec55fa-cccc-4752-839e-a167f09f1af9</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;As a reference, heres the log from a successful connection:&lt;br /&gt;&lt;img style="max-height:276px;max-width:491px;" height="276" src="https://devzone.nordicsemi.com/resized-image/__size/982x552/__key/communityserver-discussions-components-files/4/pastedimage1721045005911v1.png" width="491" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493877?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 11:09:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61b63d8e-1a22-4f17-920e-c49eb3382acb</guid><dc:creator>adunk</dc:creator><description>&lt;p&gt;Yes, ble_supv is the module where I receive the BLE callbacks. I then push an event into the event_supv and perform the functionality.&lt;/p&gt;
&lt;p&gt;I turned the debug logging on the peripheral on those 2 modules and duplicated the failure process.&amp;nbsp; Here&amp;#39;s the output from Wireshark during the failure:&lt;br /&gt;&lt;img style="max-height:280px;max-width:533px;" height="280" src="https://devzone.nordicsemi.com/resized-image/__size/1066x560/__key/communityserver-discussions-components-files/4/pastedimage1721041225585v1.png" width="533" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the debug output from the connection callback to a little after the disconnection occurs. You can see it restarting the advertising at the end of 9:06 and then reconnect at 9:11:&lt;br /&gt;-- [00:09:06.095,275] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Bonds:Conn Evnt&lt;br /&gt;-- [00:09:06.095,275] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: No phy conn&lt;br /&gt;-- [00:09:06.095,520] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.095,550] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 137 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.095,550] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.145,233] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 137 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.145,263] &amp;lt;dbg&amp;gt; bt_conn: tx_notify: conn 0x20004080&lt;br /&gt;-- [00:09:06.145,263] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_recv: handle 137 len 7 flags 02&lt;br /&gt;-- [00:09:06.145,263] &amp;lt;dbg&amp;gt; bt_conn: bt_acl_recv: First, len 7 final 3&lt;br /&gt;-- [00:09:06.145,263] &amp;lt;dbg&amp;gt; bt_conn: bt_acl_recv: Successfully parsed 7 byte L2CAP packet&lt;br /&gt;-- [00:09:06.145,294] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_send_cb: conn handle 137 buf len 7 cb 0x55d5d us er_data 0x20013314&lt;br /&gt;-- [00:09:06.145,324] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 137 ref 2 -&amp;gt; 3&lt;br /&gt;-- [00:09:06.145,324] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 3 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.145,385] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.145,385] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_process_tx: conn 0x20004080&lt;br /&gt;-- [00:09:06.145,416] &amp;lt;dbg&amp;gt; bt_conn: send_buf: conn 0x20004080 buf 0x20024558 len 7&lt;br /&gt;-- [00:09:06.145,416] &amp;lt;dbg&amp;gt; bt_conn: send_buf: send single&lt;br /&gt;-- [00:09:06.145,416] &amp;lt;dbg&amp;gt; bt_conn: do_send_frag: conn 0x20004080 buf 0x20024558 len 7 flags 0x02&lt;br /&gt;-- [00:09:06.145,446] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.145,477] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: Adding conn 0x20004080 to poll list&lt;br /&gt;-- [00:09:06.145,477] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: wait on host fifo&lt;br /&gt;-- [00:09:06.195,648] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 137 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.195,648] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.245,330] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 137 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.245,361] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.245,391] &amp;lt;dbg&amp;gt; bt_conn: tx_complete_work: conn 0x20004080&lt;br /&gt;-- [00:09:06.245,391] &amp;lt;dbg&amp;gt; bt_conn: tx_notify: conn 0x20004080&lt;br /&gt;-- [00:09:06.245,391] &amp;lt;dbg&amp;gt; bt_conn: tx_notify: tx 0x20012e8c cb 0x55d5d user_data 0x20013314&lt;br /&gt;-- [00:09:06.295,593] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 137 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.295,623] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.295,684] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.295,684] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: Adding conn 0x20004080 to poll list&lt;br /&gt;-- [00:09:06.295,715] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: wait on host fifo&lt;br /&gt;-- [00:09:06.645,233] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 137 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.645,233] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_set_state: connected -&amp;gt; disconnect-complete&lt;br /&gt;-- [00:09:06.645,263] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.645,294] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 137 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.645,324] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_set_state: disconnect-complete -&amp;gt; disconnected&lt;br /&gt;-- [00:09:06.645,324] &amp;lt;dbg&amp;gt; bt_conn: tx_notify: conn 0x20004080&lt;br /&gt;-- [00:09:06.645,324] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.645,385] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.645,416] &amp;lt;dbg&amp;gt; bt_conn: deferred_work: conn 0x20004080&lt;br /&gt;-- [00:09:06.645,416] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_disconnected: chan 0x20004fdc cid 0x0006&lt;br /&gt;-- [00:09:06.645,446] &amp;lt;dbg&amp;gt; bt_smp: smp_pairing_complete: got status 0x8&lt;br /&gt;-- [00:09:06.645,446] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_encrypt_change: chan 0x20004fdc conn 0x20004080 ha ndle 137 encrypt 0x00 hci status 0x1f&lt;br /&gt;-- [00:09:06.645,477] &amp;lt;wrn&amp;gt; ble_supv: Security failed: level 1 err 9&lt;br /&gt;-- [00:09:06.645,477] &amp;lt;wrn&amp;gt; ble_supv: Failed to disconnect -128&lt;br /&gt;-- [00:09:06.645,660] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 137 ref 1 -&amp;gt; 0&lt;br /&gt;-- [00:09:06.645,721] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Disc Evnt&lt;br /&gt;-- [00:09:06.702,270] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.702,606] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.702,972] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.703,369] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.703,704] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.704,101] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.704,406] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_set_state: disconnected -&amp;gt; connecting-adv&lt;br /&gt;-- [00:09:06.704,437] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 0 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:06.704,498] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:06.704,925] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 0 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:06.705,017] &amp;lt;inf&amp;gt; ble_supv: Advertising to D0:1F:FC:25:40:22 (random) started&lt;br /&gt;-- [00:09:11.997,802] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 0 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:11.997,833] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 0 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:11.997,833] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 0 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:11.997,863] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_set_state: connecting-adv -&amp;gt; connected&lt;br /&gt;-- [00:09:11.997,894] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_accept: conn 0x20004080 handle 146&lt;br /&gt;-- [00:09:11.997,894] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_connected: chan 0x20004fdc cid 0x0006&lt;br /&gt;-- [00:09:11.998,443] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:11.998,474] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: Adding conn 0x20004080 to poll list&lt;br /&gt;-- [00:09:11.998,474] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: wait on host fifo&lt;br /&gt;-- [00:09:11.998,596] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Conn evnt&lt;br /&gt;-- [00:09:11.998,596] &amp;lt;inf&amp;gt; oob: Push:20&lt;br /&gt;-- [00:09:11.998,687] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Bonds:Conn Evnt&lt;br /&gt;-- [00:09:11.998,687] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: No phy conn&lt;br /&gt;-- [00:09:11.998,931] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 146 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:11.998,962] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 146 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:11.998,962] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 146 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:12.199,035] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 146 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:12.199,096] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_unref: handle 146 ref 2 -&amp;gt; 1&lt;br /&gt;-- [00:09:12.199,127] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_prepare_events:&lt;br /&gt;-- [00:09:12.199,157] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: Adding conn 0x20004080 to poll list&lt;br /&gt;-- [00:09:12.199,157] &amp;lt;dbg&amp;gt; bt_conn: conn_prepare_events: wait on host fifo&lt;br /&gt;-- [00:09:12.498,992] &amp;lt;dbg&amp;gt; bt_conn: bt_conn_ref: handle 146 ref 1 -&amp;gt; 2&lt;br /&gt;-- [00:09:12.498,992] &amp;lt;dbg&amp;gt; bt_smp: bt_smp_encrypt_change: chan 0x20004fdc conn 0x20004080 ha ndle 146 encrypt 0x01 hci status 0x00&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I could also do the same for the Central. But its a little more challenging to get access to that debug UART. But I could if necessary to debug this issue.&lt;/p&gt;
&lt;p&gt;As for the shutdown issue, we plan on fixing the shutdown procedure in the Central to wait for the disconnect callback so the peripheral doesn&amp;#39;t need to timeout, but that doesn&amp;#39;t seem to be the problem in this case because the peripheral is advertising and definitely not connected in this case.&amp;nbsp; Unless of course its not recovering properly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Intermittent BLE connection</title><link>https://devzone.nordicsemi.com/thread/493717?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2024 20:02:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6eb053c-f26f-42b7-bc32-48e7b5fd6570</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi adunk,&lt;/p&gt;
[quote user=""]After connection is established and bonds are saved, the peripheral basically always advertises if bonds exist. The central device is turned on and off and scans when it turns on. I know this is a little different than traditionally, but the Basic Audio Profile forced which devices are the Central and the Peripheral.[/quote]
&lt;p&gt;I am not familiar with what BAP requires here, but this sound pretty much the same as how a pair of Central and Peripheral would work since Bluetooth 4.x, no? Could I perhaps miss something here?&lt;/p&gt;
&lt;p&gt;But if dwelling in the reasons of the setup is not directly related to the issue, we can skip this part.&lt;/p&gt;
[quote user=""]I am wondering about the procedure when the Central device is powered down and disconnects. I&amp;#39;m basically just calling the functions to stop streaming and disconnect and then powering down. The peripheral does seem to take a couple of seconds to recognize the disconnection and receive the &amp;quot;disconnect&amp;quot; callback.[/quote]
&lt;p&gt;This sound like the Central powering down happen too quick that the&amp;nbsp;call to disconnect didn&amp;#39;t actually work on the Central yet. The Peripheral would then just keep waiting for Central packets that&amp;nbsp;stop coming and eventually&amp;nbsp;time out.&lt;/p&gt;
&lt;p&gt;Since you already have a sniffer setup, can you check if that is&amp;nbsp;the case? You could temporarily disable&amp;nbsp;encryption just for this test too.&lt;/p&gt;
&lt;p&gt;Also, how does this power cycle happen? Power cycle usually mean a physical power cut and restore. However, you mentioned the central ending the stream and disconnect, that sounds like software is involved.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]Is there still something hanging up in the peripheral device from the connection that is occuring due to my procedure for the disconnection?[/quote]
&lt;p&gt;From what you have described here, that can seem to be the case, but&amp;nbsp;there shouldn&amp;#39;t be anything like that...&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s also look at these logs:&lt;/p&gt;
[quote user=""]&lt;p&gt;-- [00:04:21.230,010] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Conn evnt&lt;br /&gt;-- [00:04:21.580,444] &amp;lt;wrn&amp;gt; ble_supv: Security failed: level 1 err 9&lt;br /&gt;-- [00:04:21.580,474] &amp;lt;wrn&amp;gt; ble_supv: Failed to disconnect -128&lt;br /&gt;-- [00:04:21.580,718] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Disc Evnt&lt;br /&gt;-- [00:04:21.640,258] &amp;lt;inf&amp;gt; ble_supv: Advertising to xx:xx:xx:xx:xx:xx (random) started&lt;/p&gt;
&lt;p&gt;-- [00:04:25.829,498] &amp;lt;dbg&amp;gt; event: thread_status_event_supv: Conn evnt&lt;/p&gt;[/quote]
&lt;p&gt;I assume ble_supv is&amp;nbsp;one of your code module, and the code is based on one of the sample code. In that case, &amp;quot;Failed to disconnect -128&amp;quot; comes from bt_conn_disconnect(), and&amp;nbsp;error 128 means there wasn&amp;#39;t a connection.&lt;/p&gt;
&lt;p&gt;This is quite odd.&amp;nbsp;The two modules of the Bluetooth stack involved here are SMP and CONN. Could you please enable these configs to get more logs?&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/kconfig/index.html#CONFIG_BT_SMP_LOG_LEVEL_DBG"&gt;CONFIG_BT_SMP_LOG_LEVEL_DBG&lt;br /&gt;&lt;/a&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/kconfig/index.html#CONFIG_BT_CONN_LOG_LEVEL_DBG"&gt;CONFIG_BT_CONN_LOG_LEVEL_DBG&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There could be a significant increase in amount of log, so you might also need to configure&amp;nbsp;more buffers for the log module. Please also make sure&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/kconfig/index.html#CONFIG_LOG_MODE_DEFERRED"&gt;CONFIG_LOG_MODE_DEFERRED&lt;/a&gt;&amp;nbsp;is enabled&amp;nbsp;to minimize the impact of logging to the Bluetooth stack&amp;#39;s operations.&lt;/p&gt;
[quote user=""]What should the procedure be to properly stop streaming and disconnect from a peripheral? Is it possible its somehow using the &amp;quot;conn&amp;quot; handle from the previous connection?[/quote]
&lt;p&gt;It would be best to&amp;nbsp;wait for a&amp;nbsp;callback confirming the&amp;nbsp;success of an operation before moving on to the next step.&lt;/p&gt;
[quote user=""]&lt;p&gt;The current BLE disconnection procedure when the central is shut down. There is a little more error checking, but basically if we&amp;#39;re streaming, stop the streaming and then disconnect:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;!&lt;/span&gt;&lt;span&gt;bt_content_ctlr_media_state_playing&lt;/span&gt;&lt;span&gt;()){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt; // we are already paused&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;bt_content_ctrl_stop&lt;/span&gt;&lt;span&gt;(default_conn);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;bt_conn_disconnect&lt;/span&gt;&lt;span&gt;(default_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Its also possible the disconnection procedure has nothing to do with this failure.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;Right, so this looks like there is no&amp;nbsp;wait&amp;nbsp;for any procedures to complete at all.&amp;nbsp;Still, in an ideal world, the peripheral should be robust enough that it&amp;nbsp;isn&amp;#39;t impacted&amp;nbsp;by what the central does.&lt;/p&gt;
[quote user=""]I&amp;#39;m using whitelisting on the peripheral so it only connects to the bonded device. But I am just using regular advertising rather than directed advertising. I didn&amp;#39;t see the need for directed advertising since we&amp;#39;re using out of band pairing.&amp;nbsp;[/quote]
&lt;p&gt;Noted.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>