<?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>nRF5340 Advertising stopped without any indication</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111461/nrf5340-advertising-stopped-without-any-indication</link><description>Hi, 
 We are using nRF5340 DK and the nRF Connect SDK Version 2.6.1. 
 We are developing a mesh network. Our requirement is the one device can connect to three other devices. Using one connection as a peripheral and up to two connections as a central</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 May 2024 11:35:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111461/nrf5340-advertising-stopped-without-any-indication" /><item><title>RE: nRF5340 Advertising stopped without any indication</title><link>https://devzone.nordicsemi.com/thread/486649?ContentTypeID=1</link><pubDate>Thu, 30 May 2024 11:35:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b038a171-d034-42de-86e8-fe37ad145878</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I suggest to compare with working examples, likely you are not handling bt_conn conn correctly.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Advertising stopped without any indication</title><link>https://devzone.nordicsemi.com/thread/486469?ContentTypeID=1</link><pubDate>Wed, 29 May 2024 13:15:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdf97ef3-c59f-4d09-80b0-531670d0f190</guid><dc:creator>AKV</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;After implementing the above changes, I&amp;#39;m&amp;nbsp;facing another issue:&lt;/p&gt;
&lt;p&gt;The master is unable to reconnect to the same device as described in the below link.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/111473/reconnect-failed-bt_conn_le_create-return-error--22"&gt;Reconnect failed : bt_conn_le_create return error -22&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;By reducing the reference count at the end of the connection method as in the sample, it can successfully reconnect to a device.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I have tried the solution mentioned in the link above, but it did not resolve the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Advertising stopped without any indication</title><link>https://devzone.nordicsemi.com/thread/486037?ContentTypeID=1</link><pubDate>Mon, 27 May 2024 13:19:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2545857-9643-424b-9426-7426aebb63ec</guid><dc:creator>AKV</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I was using the &lt;/span&gt;&lt;code&gt;bt_conn_unref(conn)&lt;/code&gt;&lt;span&gt; function in the disconnection handler, but I hadn&amp;#39;t used the &lt;/span&gt;&lt;code&gt;bt_conn_ref(conn)&lt;/code&gt;&lt;span&gt; function in the connection handler. After adding the &lt;/span&gt;&lt;code&gt;bt_conn_ref(conn)&lt;/code&gt;&lt;span&gt; function in the connection handler, the issue was resolved.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ll test further and let you know if any more issues arise.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Advertising stopped without any indication</title><link>https://devzone.nordicsemi.com/thread/486021?ContentTypeID=1</link><pubDate>Mon, 27 May 2024 12:26:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8add3484-ff1e-43cc-8e98-b8d0570212b8</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I can see that the peripheral count is 2, which means that it&amp;#39;s possible to have 2 peripheral role connections (e.g one advertising and one in a connection). Are you 100% sure you have full control over the &amp;quot;conn&amp;quot; object that you provide to the&amp;nbsp;&lt;span&gt;bt_conn_unref(), and that for instance you are not actually providing the wrong one (e.g. that you are by accident provding the advertiser reference and not the connection reference when calling bt_conn_unref).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Advertising stopped without any indication</title><link>https://devzone.nordicsemi.com/thread/485712?ContentTypeID=1</link><pubDate>Fri, 24 May 2024 04:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecd79750-41b5-4cd5-b156-422cc02f0132</guid><dc:creator>AKV</dc:creator><description>&lt;p&gt;Thanks for the response.&lt;/p&gt;
&lt;p&gt;As you mentioned, the disconnection is occurring internally, so there is no indication at the application layer. Consequently, I was unable to reconnect because advertising on the slave side has stopped.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This issue occurs every second time a connection is made. After the initial connection, the master node disconnects and attempts to reconnect, leading to this problem in slave side.&lt;/span&gt;&lt;/p&gt;
&lt;div class="flex flex-grow flex-col max-w-full"&gt;
&lt;div dir="auto" data-message-author-role="assistant" data-message-id="a47ff23f-03a8-469d-9877-2b1bcc942179"&gt;
&lt;div&gt;
&lt;div class="markdown prose w-full break-words dark:prose-invert dark"&gt;
&lt;p&gt;Attached are the connection count details for reference.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="mt-1 flex gap-3 empty:hidden juice:-ml-3"&gt;
&lt;div class="items-center justify-start rounded-xl p-1 flex"&gt;
&lt;div class="flex items-center"&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_MAX_CONN&lt;/span&gt;&lt;span&gt;=4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_MAX_PAIRED&lt;/span&gt;&lt;span&gt;=4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT&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;p&gt;Could you please check why advertising has stopped on the slave side?&lt;/p&gt;
&lt;p&gt;Is there any way to verify if the current advertising is active or not?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Update:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The connection error occurred on the slave side, and advertising stopped because of the &lt;/span&gt;&lt;code&gt;bt_conn_unref(conn)&lt;/code&gt;&lt;span&gt; function. After removing this function from the disconnection handler, the connection issue was resolved.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you please check why disconnections are occurring internally and why advertising has stopped on the slave side when we use the &lt;/span&gt;&lt;code&gt;bt_conn_unref(conn)&lt;/code&gt;&lt;span&gt; function in the disconnection handler?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Advertising stopped without any indication</title><link>https://devzone.nordicsemi.com/thread/485645?ContentTypeID=1</link><pubDate>Thu, 23 May 2024 13:06:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2b76c44-d5fa-4b47-8fc0-7657e8461652</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;If you on the central device experience the following disconnect reason: &lt;br /&gt;19 -&amp;gt; 0x13 -&amp;gt;&amp;nbsp;BT_HCI_ERR_REMOTE_USER_TERM_CONN.&lt;/p&gt;
&lt;p&gt;Then that means the peripheral is disconnecting intentionally by calling&amp;nbsp;&lt;span&gt;bt_conn_disconnect() with the&amp;nbsp;&lt;/span&gt;BT_HCI_ERR_REMOTE_USER_TERM_CONN disconnect reason. I would have looked at where that may be happening.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>