<?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 connection stuck</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95188/ble-connection-stuck</link><description>Hi, I&amp;#39;ve experienced an error in which a peripheral connects but can not send any data. I have these logs: [1672131059] &amp;lt;err&amp;gt; bt_ctlr_hci: Tx Buffer Overflow [1672131059] &amp;lt;wrn&amp;gt; bt_hci_core: Data buffer overflow (link type 0x01) [1672131059] &amp;lt;err&amp;gt; bt_conn</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Dec 2022 09:02:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95188/ble-connection-stuck" /><item><title>RE: ble connection stuck</title><link>https://devzone.nordicsemi.com/thread/402375?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2022 09:02:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29890b34-a6a6-4151-aa93-17f770e57494</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;If bt_gatt_notify returns 0 then it successfully got a free TX buffer locked to be sent. It does not seem to me that your app is doing anything wrong apart from the suspicion of either a stack memory corruption or a bug in the BLE controller.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection stuck</title><link>https://devzone.nordicsemi.com/thread/402353?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2022 07:54:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2736ab5-743f-40a5-969b-dff3b10ec126</guid><dc:creator>Dor Sadeh</dc:creator><description>&lt;p&gt;thanks! I will try it all of that.&lt;br /&gt;is there a way to know in &lt;strong&gt;the app level&lt;/strong&gt; if &amp;quot;tx buffer overflow&amp;quot; has occurred so I can reset the MCU?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I check return code from bt_gatt_notify(), but it returns 0&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection stuck</title><link>https://devzone.nordicsemi.com/thread/402350?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2022 07:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74938ce1-9e74-498d-95dd-92c6ca0c0259</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;For checking if this is a stack overflow try adding these to the proj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_NAME=y
CONFIG_STACK_SENTINEL=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also try to increase the tx buffer depth and size&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_CTLR_TX_BUFFERS=6
CONFIG_BT_CTLR_TX_BUFFER_SIZE=251
CONFIG_BT_L2CAP_TX_BUF_COUNT=6&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This seems to match the description of &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/30378"&gt;this&lt;/a&gt; issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you check if you have the same issue if you are using zephyr controller by adding this in your config&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_LL_SW_SPLIT=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection stuck</title><link>https://devzone.nordicsemi.com/thread/402246?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2022 10:45:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06ec217f-545c-4727-b86f-5fa28ffd86f0</guid><dc:creator>Dor Sadeh</dc:creator><description>&lt;p&gt;some more details:&lt;br /&gt;- using zephyr, ncs 1.9.2&lt;br /&gt;- device is nrf52840&lt;br /&gt;- the error occurs after the peripheral has connected and tries to send a packet.&lt;br /&gt;-&amp;nbsp;the application is not stuck&lt;/p&gt;
&lt;p&gt;- ble connection interval is 7.5[msec], connection latency is 0, and timeout is 4[sec]&lt;/p&gt;
&lt;p&gt;regarding stack size - how can I check if I am closed to limitations?&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have access to the call stack frame because this bug happens very rarely and randomly, but it is a fatal&amp;nbsp;bug which practically causes bricking of the device because it loses its ability to communicate.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- some configs that might be relevant&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_HCI_TX_STACK_SIZE&lt;/span&gt;&lt;span&gt;=640&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_RX_STACK_SIZE&lt;/span&gt;&lt;span&gt;=2200&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_BUF_ACL_TX_SIZE&lt;/span&gt;&lt;span&gt;=251&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_BUF_ACL_TX_COUNT&lt;/span&gt;&lt;span&gt;=3&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_BUF_CMD_TX_SIZE&lt;/span&gt;&lt;span&gt;=65&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_BUF_CMD_TX_COUNT&lt;/span&gt;&lt;span&gt;=2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_HCI_TX_PRIO&lt;/span&gt;&lt;span&gt;=7&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_CONN_TX_MAX&lt;/span&gt;&lt;span&gt;=3&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_L2CAP_TX_BUF_COUNT&lt;/span&gt;&lt;span&gt;=3&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_L2CAP_TX_FRAG_COUNT&lt;/span&gt;&lt;span&gt;=2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_L2CAP_TX_MTU&lt;/span&gt;&lt;span&gt;=252&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_RTT_TX_RETRY_CNT&lt;/span&gt;&lt;span&gt;=2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_RTT_TX_RETRY_DELAY_MS&lt;/span&gt;&lt;span&gt;=2&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble connection stuck</title><link>https://devzone.nordicsemi.com/thread/402242?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2022 10:27:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f703b3cc-6ec7-4ccf-b689-ba561f0921db</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Can you please give me a bit more info on the context of this error?&lt;/p&gt;
&lt;p&gt;What was the state of the application before this error happened? Which SDK version?&lt;br /&gt;Can you show the call stack frame? Do you suspect any stack overflows?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>