<?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>Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76012/client-unable-to-receive-notification-after-0x3002-from-softdevice</link><description>Hi, 
 I am having a problem where the client is unable to receive notification from a peripheral after the softdevice in the peripheral returns 0x3002 after a disconnect. The peripheral is running a modified &amp;quot;ble_app_uart&amp;quot; example with the following modifications</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Jun 2021 13:43:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76012/client-unable-to-receive-notification-after-0x3002-from-softdevice" /><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/315651?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 13:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb2208ed-4f06-4dc8-8e18-fb06cc44998d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Great to hear, I will let the team know.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/315633?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 13:17:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:531e9843-e54f-4be6-9112-bbb2c494c7a1</guid><dc:creator>aghogho obi</dc:creator><description>&lt;p&gt;Wow, that is indeed the case. Big thanks to you and the team for getting to the bottom of this. As it turns out, the ble_gatts_hvx_params_t::p_len parameter was indeed set to 0 by the SD. But we never change its value before calling the &amp;quot;ble_nus_data_send()&amp;quot; function. As such, I updated our FW as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nus_data_length = SIZE_OF_DATAPACKET;
err_code = ble_nus_data_send(&amp;amp;m_nus, (uint8_t*)ble_queue[0], &amp;amp;nus_data_length, m_conn_handle);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now, the ble_gatts_hvx_params_t::p_len parameter will be set everytime before call &amp;quot;ble_nus_data_send()&amp;quot;. The system is able to recover from the disconnect event and still keep on streaming the data afterwards. Thank you once again!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/315601?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 12:27:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6faa1809-4283-458f-8936-d954fde49af4</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;In addition to my previous reply, the team have a working theory:&lt;/p&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;the attribute is variable sized&lt;/li&gt;
&lt;li&gt;on disconnect sd_ble_gatts_hvx returns error code and thus ble_gatts_hvx_params_t::p_len is set to 0 by SD&lt;/li&gt;
&lt;li&gt;on the next iteration application does not update value of ble_gatts_hvx_params_t::p_len so attribute size is set to 0 in the attribute database&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Can you check if that is the case?&lt;br /&gt;Kenneth&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/315550?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 09:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b8f5a79-5174-4c3a-863e-cdcb40eef170</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Thanks for the log, I will check internally and let you know.&lt;/p&gt;
&lt;p&gt;Some questions from the team:&lt;/p&gt;
&lt;p&gt;When you declared the characteristric, did you set variable attribute lenght?&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.2.0/structble__gatts__attr__md__t.html#a921e414734cd784e0c3b7309d3a14f39"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.2.0/structble__gatts__attr__md__t.html#a921e414734cd784e0c3b7309d3a14f39&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;Our best guess that something happened with attribute database on disconnect so the attribute in question becomes zero length. Note that the length you provide in sd_ble_gatts_hvx is not necessary the length of value sent on air. For fixed size attribute length will be taken from attribute database. App can check &lt;a title="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.2.0/structble__gatts__hvx__params__t.html#a8b0b2dadb3128b0838c71235661f8174" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.2.0/structble__gatts__hvx__params__t.html#a8b0b2dadb3128b0838c71235661f8174" rel="noopener noreferrer" target="_blank"&gt;ble_gatts_hvx_params_t::p_len&lt;/a&gt; on return from sd_ble_gatts_hvx to see how many bytes were actually written. For more info see p_hvx_params parameter description here &lt;a title="https://infocenter.nordicsemi.com/index.jsp?topic=%2fcom.nordic.infocenter.s140.api.v7.2.0%2fstructble__gatts__hvx__params__t.html&amp;amp;anchor=a8b0b2dadb3128b0838c71235661f8174" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.2.0%2Fstructble__gatts__hvx__params__t.html&amp;amp;anchor=a8b0b2dadb3128b0838c71235661f8174" rel="noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.2.0%2Fstructble__gatts__hvx__params__t.html&amp;amp;anchor=a8b0b2dadb3128b0838c71235661f8174&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/315496?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 02:07:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad34d8d7-292b-46bd-8fd2-bd9fa4cddf05</guid><dc:creator>aghogho obi</dc:creator><description>&lt;p&gt;I was able to get some logs from the use of the nRF sniffer. I acquired logs before/after the occurrence of the 0x3002 error. The file before the error is&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/no_5F00_err_5F00_code1_5F00_sniffer.pcapng"&gt;devzone.nordicsemi.com/.../no_5F00_err_5F00_code1_5F00_sniffer.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;while the logs after the error is&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/err_5F00_code1_5F00_sniffer.pcapng"&gt;devzone.nordicsemi.com/.../err_5F00_code1_5F00_sniffer.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Our use case involves advertising, connection and then initiating notification on the RX characteristic. I did notice that the logs after the error indicate that the RX characteristic is smaller in size when compared to a case with no 0x3002 error. Do let me know if the files reveal other information about the state of the BLE link after the 0x3002 error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/314599?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 06:25:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13837a36-e3e1-4412-b259-133e9db8b41a</guid><dc:creator>Kenneth</dc:creator><description>[quote user="aghogho obi"]&lt;p&gt;When the softdevice returns error 0x3002, is there some clean/re-initialization of a sub-system that needs to happen?&lt;/p&gt;
&lt;p&gt;I will report back with info on the use of the on-air sniffer.&lt;/p&gt;[/quote]
&lt;p&gt;There shouldn&amp;#39;t be, so hopefully that on-air sniffer log will provide some more information.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/314575?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 00:38:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff048be2-1d89-4630-bfc0-30607573f75d</guid><dc:creator>aghogho obi</dc:creator><description>&lt;p&gt;I will try to do an on-air sniffer log as suggested. To clarify some more, we observed the same behavior when using our custom app, our modified &amp;quot;ble_app_uart_c&amp;quot; on a PCA10040, the nrfConnect App on a phone or desktop with PCA10040. Once the peripheral returns the 0x3002 error during our disconnection/re-connection testing, no notifications can be received from the peripheral using any type of central device. Any central device can still connect and send commands using the RX characteristic, but notifications associated with the TX characteristic cannot be received on the central device.&lt;/p&gt;
&lt;p&gt;From the snippet of code I sent above with our usage of the &amp;quot;ble_nus_data_send()&amp;quot; function, we trap error codes not equal to &amp;quot;NRF_SUCCESS&amp;quot;. Also, we have an &amp;quot;NRG_LOG()&amp;quot; in our &amp;quot;nus_data_handler()&amp;quot; to log the &amp;quot;BLE_NUS_EVT_TX_RDY&amp;quot; events. The logs indicate that the &amp;quot;ble_nus_data_send()&amp;quot; function returns &amp;quot;NRF_SUCCESS&amp;quot; and triggers the &amp;quot;BLE_NUS_EVT_TX_RDY&amp;quot; event as well. I can even use the nrfConnect app to disable the notification of the TX characteristic in which case the &amp;quot;ble_nus_data_send()&amp;quot; function now returns an error.&lt;/p&gt;
&lt;p&gt;When the softdevice returns error 0x3002, is there some clean/re-initialization of a sub-system that needs to happen?&lt;/p&gt;
&lt;p&gt;I will report back with info on the use of the on-air sniffer.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/314356?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 07:28:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:262311f4-614e-4e65-9cb4-3f53b32ecbf8</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Re-reading the case we found this sentence that stands out a bit:&lt;/p&gt;
[quote user=""]Also, the &amp;quot;ble_nus_data_send()&amp;quot; function returns &amp;quot;NRF_SUCCESS&amp;quot; and the &amp;quot;BLE_NUS_EVT_TX_RDY&amp;quot; event is also triggered.[/quote]
&lt;p&gt;This sentence may indicate a different theory of the problem you experience, either:&lt;/p&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;There is some problem in the app, and the quoted statement is not the case. For example, interpreting the missed log as NRF_SUCCESS while data_send was not called at all.&lt;/li&gt;
&lt;li&gt;HVNs are sent, and the problem is on receiving side. Sniffer log can clarify it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Do you have the possibility to do an on-air sniffer log (e.g. nRF sniffer)?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/314198?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 12:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:954e3f81-fca4-42c7-a714-6c01dc570fa1</guid><dc:creator>aghogho obi</dc:creator><description>&lt;p&gt;Below shows our implementation of the connected/disconnected BLE stack events. As seen, the disconnection event is used to reset our flag variables.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            NRF_LOG_INFO(&amp;quot;Connected&amp;quot;);
            err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
            APP_ERROR_CHECK(err_code);
            m_conn_handle = p_ble_evt-&amp;gt;evt.gap_evt.conn_handle;
            err_code = nrf_ble_qwr_conn_handle_assign(&amp;amp;m_qwr, m_conn_handle);
            APP_ERROR_CHECK(err_code);

            ble_gap_phys_t const phys =
			{
				.rx_phys = BLE_GAP_PHY_2MBPS,
				.tx_phys = BLE_GAP_PHY_2MBPS,
			};

            err_code = sd_ble_gap_phy_update(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, &amp;amp;phys);
            APP_ERROR_CHECK(err_code);

            NRF_LOG_INFO(&amp;quot;Connection handle = %u&amp;quot;, m_conn_handle);

            break;

        case BLE_GAP_EVT_DISCONNECTED:
            NRF_LOG_INFO(&amp;quot;Disconnected&amp;quot;);
            // LED indication will be changed when advertising starts.
            m_conn_handle = BLE_CONN_HANDLE_INVALID;
            ble_conn_flag = 0;
            ble_conn_intvl = 0;

            
            NRF_LOG_INFO(&amp;quot;Connection handle = %u&amp;quot;, m_conn_handle);
            nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(0,19), 1);

            break;
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/314191?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 11:48:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d39e28a3-d5f6-4482-89a0-4d18fd83ac1c</guid><dc:creator>aghogho obi</dc:creator><description>&lt;p&gt;I have added the NRF_LOG()s as suggested. But first, let me give more context about our FW. Below is a snippet of code for sending the packets to the client.&lt;pre class="ui-code" data-mode="c_cpp"&gt;if(ble_conn_flag == 1)
        {
            if(ble_conn_intvl == 1)
            {
                do
                {
                    if(m_conn_handle != BLE_CONN_HANDLE_INVALID)
                      err_code = ble_nus_data_send(&amp;amp;m_nus, (uint8_t*)ble_queue[blerdptr], &amp;amp;nus_data_length, m_conn_handle);
                    else
                      err_code = 0x20;

                } while (err_code == NRF_ERROR_RESOURCES);

                if(err_code != NRF_SUCCESS)
                {
                    //err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0);
                    //NRF_LOG_INFO(&amp;quot;BLE_ERROR_GATTS_SYS_ATTR_MISSING_LOOP&amp;quot;);

                    NRF_LOG_INFO(&amp;quot;ERROR_CODE IS %u&amp;quot;, err_code);
                    if(err_code == 0x3002)
                    {
                      /* Reset device */
                      //nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_RESET);
                    };
                };

                if(m_conn_handle == BLE_CONN_HANDLE_INVALID)
                    nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(0,19), 1);
                else
                    nrf_gpio_pin_toggle(NRF_GPIO_PIN_MAP(0,19));
            };                        
        };&lt;/pre&gt;&amp;quot;ble_conn_flag&amp;quot; is set when we receive a command from the client side through &amp;quot;BLE_NUS_EVT_RX_DATA&amp;quot;. &amp;quot;ble_conn_interval&amp;quot; is set after responding to the &amp;quot;BLE_GAP_EVT_CONN_PARAM_UPDATE&amp;quot; or &amp;quot;BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST&amp;quot; events from the BLE stack. We also check for the connection handle before calling the function :ble_nus_data_send()&amp;quot;.&amp;nbsp; From my NRF_LOG()s, when connected the connection handle is 0. On disconnect, the connection handle is 0xFFFF.&lt;/p&gt;
&lt;p&gt;When there is a disconnection/reconnection of the BLE link that is recoverable, a snippet of the NRF_LOG() is&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; &amp;lt;info&amp;gt; app: Disconnected
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: Connection handle = 65535
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: ERROR_CODE IS 32
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: Connected
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: Connection handle = 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The error code is the 0x20 from the &amp;quot;else&amp;quot; statement from the FW snippet above. This indicates that the trap caught the invalid handle before the call to &amp;quot;ble_nus_data_send()&amp;quot;.&lt;/p&gt;
&lt;p&gt;Now, when we have a disconnection/reconnection of the BLE link that is not recoverable, theNRF_LOG()s show&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; &amp;lt;info&amp;gt; app: Disconnected
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: Connection handle = 65535
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: ERROR_CODE IS 12290
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: Connected
00&amp;gt; 
00&amp;gt; &amp;lt;info&amp;gt; app: Connection handle = 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am assuming that BLE stack events have higher priority than my code, and if a disconnect event happens that a change in the connection handle will occur before the &amp;quot;ble_nus_data_send()&amp;quot; is called. There is clearly a race condition happening but it is not clear where/how is it manifesting. As you can see, i trapped the call to &amp;quot;ble_nus_data_send()&amp;quot;. Also, I do not call &amp;quot;ble_nus_data_send()&amp;quot; until the BLE link is establish and we receive events from the BLE stack and commands from the client.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/314027?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 18:11:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1a122c8-9c51-4711-b76a-31f34ad11a16</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I suggest to add some NRF_LOG() output every time you connect, disconnect and ble_nus_data_send(), to log the connection handle. I suspect that your handle is incorrect, for instance that you may have some race condition in your code where the handle is somehow set wrong between connects and disconnects.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/313917?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 12:18:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15826189-0e87-4990-8fdb-1df2670308a5</guid><dc:creator>aghogho obi</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestion. In our current implementation, we do have a global flag that we use to make sure we have a valid connection. That test is right above the call to &amp;quot;&lt;span&gt;ble_nus_data_send()&amp;quot; in the &amp;quot;do&amp;quot; loop but this is not shown in the code snippet above.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We still get the same behavior with or without the test for a valid connection. Most of the time, we are able to recover because the err_code is 0x0005. But in a few times, we get the 0x3002 err_code. Only when this happens that we have problems getting notifications after a reconnect&amp;nbsp;and no errors are generated by the Softdevice.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Client unable to receive notification after 0x3002 from SoftDevice</title><link>https://devzone.nordicsemi.com/thread/313907?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 12:05:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e654afa8-cb8b-4ca6-ad13-c4bbc31321b3</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I assume 0x3002 means&amp;nbsp;BLE_ERROR_INVALID_CONN_HANDLE.&lt;/p&gt;
&lt;p&gt;That seem to indicate that m_conn_handle has changed between the two connections, which it may do. Can you make sure that m_conn_handle is updated/correct before calling&amp;nbsp;ble_nus_data_send()?&lt;/p&gt;
&lt;p&gt;Typically you want to have a global flag of some sort, that make sure you don&amp;#39;t call&amp;nbsp;&lt;span&gt;ble_nus_data_send() unless you are in a connection (with a valid m_conn_handle).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>