<?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>NUS bt_nus_send() returns -ENOTCONN (-128) after pairing with nRF Toolbox — client never subscribes to TX notifications (NCS v3.2.4)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128018/nus-bt_nus_send-returns--enotconn--128-after-pairing-with-nrf-toolbox-client-never-subscribes-to-tx-notifications-ncs-v3-2-4</link><description>Hi, 
 I am using the Nordic UART Service (NUS) on an nRF52840 with NCS. Without pairing enabled, NUS works perfectly with the nRF Toolbox UART service — both sending and receiving data works as expected. After adding pairing/bonding (Just Works) (CONFIG_BT_NUS_SECURITY_ENABLED</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 May 2026 07:20:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128018/nus-bt_nus_send-returns--enotconn--128-after-pairing-with-nrf-toolbox-client-never-subscribes-to-tx-notifications-ncs-v3-2-4" /><item><title>RE: NUS bt_nus_send() returns -ENOTCONN (-128) after pairing with nRF Toolbox — client never subscribes to TX notifications (NCS v3.2.4)</title><link>https://devzone.nordicsemi.com/thread/566007?ContentTypeID=1</link><pubDate>Thu, 07 May 2026 07:20:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b598f49-7462-4364-a6e1-4f3cbfecb656</guid><dc:creator>Julian1999</dc:creator><description>&lt;p data-start="216" data-end="228"&gt;Hello Edvin,&lt;/p&gt;
&lt;p data-start="230" data-end="257"&gt;Thank you for your message.&lt;/p&gt;
&lt;p data-start="259" data-end="378"&gt;I&amp;rsquo;m already in contact with Aleksander from the mobile team via the GitHub issue on the Android-nRF-Toolbox repository.&lt;/p&gt;
&lt;p data-start="380" data-end="562"&gt;Hopefully this can be addressed in a future update, as it would be very useful to test Nordic UART Service (NUS) functionality with security enabled directly through the Toolbox app.&lt;/p&gt;
&lt;p data-start="564" data-end="586"&gt;Best regards,&lt;br data-start="577" data-end="580" /&gt; Julian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS bt_nus_send() returns -ENOTCONN (-128) after pairing with nRF Toolbox — client never subscribes to TX notifications (NCS v3.2.4)</title><link>https://devzone.nordicsemi.com/thread/565989?ContentTypeID=1</link><pubDate>Wed, 06 May 2026 20:53:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:624f2304-e820-48c0-8ecf-3776e6d22741</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I believe you found the source of the issue. I do also believe this application hasn&amp;#39;t been changed since the nRF5 SDK (the NUS part at least). I see that there are commits coming from 10 months ago, but those are mainly migration of libraries, and not functional changes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Back in the nRF5 SDK, the NUS sample didn&amp;#39;t have security, and this is probably why it is not taken into consideration in the nRF Toolbox app.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have read access to the issues for this repository, but I will let the mobile application group know about your issue report.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As a workaround, you could use the nRF Connect for Android (/iOS). It doesn&amp;#39;t have a specific UI for the NUS Service, but it supports reading and writing for all services.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS bt_nus_send() returns -ENOTCONN (-128) after pairing with nRF Toolbox — client never subscribes to TX notifications (NCS v3.2.4)</title><link>https://devzone.nordicsemi.com/thread/565859?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 06:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcb1c890-0657-4c33-a805-c78415b34469</guid><dc:creator>Julian1999</dc:creator><description>&lt;p&gt;Update&lt;/p&gt;
&lt;p&gt;Further investigation confirms that the issue originates from the nRF Toolbox app, not the peripheral firmware.&lt;/p&gt;
&lt;p&gt;Diagnostic step&lt;/p&gt;
&lt;p&gt;A send_enabled callback was added to the peripheral&amp;rsquo;s NUS service to detect when a client writes to the NUS TX CCCD:&lt;/p&gt;
&lt;p&gt;static void on_send_enabled(enum bt_nus_send_status status)&lt;br /&gt;{&lt;br /&gt; if (status == BT_NUS_SEND_STATUS_ENABLED) {&lt;br /&gt; LOG_INF(&amp;quot;NUS TX notifications ENABLED by client&amp;quot;);&lt;br /&gt; } else {&lt;br /&gt; LOG_INF(&amp;quot;NUS TX notifications DISABLED by client&amp;quot;);&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Result&lt;/p&gt;
&lt;p&gt;After a successful connection, pairing, and bonding sequence, the send_enabled callback is never triggered&amp;mdash;even after waiting more than 5 minutes. This indicates that nRF Toolbox (v4.2.0) does not subscribe to NUS TX notifications after pairing.&lt;/p&gt;
&lt;p&gt;Root cause (nRF Toolbox source: UARTManager.kt)&lt;/p&gt;
&lt;p&gt;The app calls .subscribe() on the NUS TX characteristic immediately after service discovery:&lt;/p&gt;
&lt;p&gt;remoteService.characteristics&lt;br /&gt; .firstOrNull { it.uuid == UART_TX_CHARACTERISTIC_UUID.toKotlinUuid() }&lt;br /&gt; ?.subscribe()&lt;/p&gt;
&lt;p&gt;With CONFIG_BT_NUS_SECURITY_ENABLED=y, CCCD writes require an encrypted link. If .subscribe() is executed before the security procedure completes, the CCCD write fails silently and is not retried.&lt;/p&gt;
&lt;p&gt;Action taken&lt;/p&gt;
&lt;p&gt;A GitHub issue has been opened in the nordicsemi/Android-nRF-Toolbox repository, including details and a proposed fix:&lt;/p&gt;
&lt;p&gt;Defer subscription until security is established, or&lt;br /&gt;Retry on CCCD write failure&lt;br /&gt;&lt;br /&gt;GitHub ticket:&amp;nbsp;&lt;a href="https://github.com/nordicsemi/Android-nRF-Toolbox/issues/184"&gt;NUS TX notifications not subscribed after pairing when CONFIG_BT_NUS_SECURITY_ENABLED=y on peripheral &amp;middot; Issue #184 &amp;middot; nordicsemi/Android-nRF-Toolbox&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I&amp;rsquo;d appreciate any clarification, and hope this can be resolved in a future update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>