<?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_NUS_C_EVT_NUS_TX_EVT event received twice when the central connect peripheral second times</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71157/ble_nus_c_evt_nus_tx_evt-event-received-twice-when-the-central-connect-peripheral-second-times</link><description>Hi, 
 I&amp;#39;m using two boards with nrf52832 and sdk 15.3.0. One alter the ble_app_mult_uart__c example as ble center ，the othe alter the ble_app_uart example as ble peripheral .Two boards connect well . 
 But the problem is that when the peripheral disconnect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Feb 2021 03:00:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71157/ble_nus_c_evt_nus_tx_evt-event-received-twice-when-the-central-connect-peripheral-second-times" /><item><title>RE: BLE_NUS_C_EVT_NUS_TX_EVT event received twice when the central connect peripheral second times</title><link>https://devzone.nordicsemi.com/thread/292593?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 03:00:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb911ae6-52bd-4e46-a8da-88d580bacef8</guid><dc:creator>CSZ_110</dc:creator><description>&lt;p&gt;&amp;nbsp;Thank you for your reply.Yes,you&amp;#39;re right.I add a filter in&amp;nbsp;ble_nus_c_on_ble_evt().When the connection handles didn&amp;#39;t match ,make it return.By the way,I download the latest SDK 17.02 ,I found that the issue has already solved.I r&lt;span&gt;evised my code in the&amp;nbsp;ble_nus_c_on_ble_evt() function :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;if ( (p_ble_nus_c-&amp;gt;conn_handle == BLE_CONN_HANDLE_INVALID)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ||(p_ble_nus_c-&amp;gt;conn_handle != p_ble_evt-&amp;gt;evt.gap_evt.conn_handle)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; instead of the original code&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; if ( (p_ble_nus_c-&amp;gt;conn_handle != BLE_CONN_HANDLE_INVALID)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp;(p_ble_nus_c-&amp;gt;conn_handle != p_ble_evt-&amp;gt;evt.gap_evt.conn_handle)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;span class="" id="w_34"&gt;Thanks&amp;nbsp;&lt;/span&gt;&lt;span class="" id="w_35"&gt;again&amp;nbsp;&lt;/span&gt;&lt;span class="" id="w_36"&gt;for&amp;nbsp;&lt;/span&gt;&lt;span class="" id="w_37"&gt;you&amp;nbsp;&lt;/span&gt;&lt;span id="w_38"&gt;kind&amp;nbsp;&lt;/span&gt;&lt;span class="" id="w_39"&gt;help&lt;/span&gt;&lt;span class="" id="w_40"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_NUS_C_EVT_NUS_TX_EVT event received twice when the central connect peripheral second times</title><link>https://devzone.nordicsemi.com/thread/292228?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2021 13:00:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f65f201-a495-4381-9367-df7872d18b05</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It sounds like you are experencing the same as described in this post: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/70651/double-notifications-on-multilink-example-with-custom-service"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/70651/double-notifications-on-multilink-example-with-custom-service?&amp;nbsp;&lt;/a&gt; The solution I suggested there was to ignore the event whenever the connection handles didn&amp;#39;t match.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>