<?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>Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101987/connection-issues-between-peripheral-and-central-with-nus-to-uart-service-in-ble</link><description>Good morning, 
 I have a custom board with nRF52840 that sends strings via UART on NUS as a peripheral, and I can see it properly using the NRF Toolbox on my smartphone. I programmed a 52840DK with the sample provided by Zephyr/Nordic called &amp;quot;Nordic UART</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Jul 2023 07:32:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101987/connection-issues-between-peripheral-and-central-with-nus-to-uart-service-in-ble" /><item><title>RE: Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/thread/438679?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2023 07:32:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:422e9903-b8cd-406b-a415-744b45a0fd72</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Glad to hear you were able to figure it out Silvio, no problem at all!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/thread/438304?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 13:31:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb23edb2-a7a5-4462-88f3-1c542dbc4599</guid><dc:creator>babos</dc:creator><description>&lt;p&gt;Hi Simon,&lt;br /&gt;unfortunately, I discovered that the 2.5GHz filter was installed incorrectly, so the antenna signal was short-circuited to ground; taking the filter off and bypassing it or it connects.&lt;br /&gt;Im very sorry.&lt;/p&gt;
&lt;p&gt;Silvio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/thread/438118?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2023 15:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d20d42a-7c51-4485-8eed-6cbc29f97f50</guid><dc:creator>babos</dc:creator><description>&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_5467.PNG" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_5468.PNG" /&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_5469.PNG" /&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_5470.PNG" /&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_5472.PNG" /&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;I&amp;#39;m sorry, Simon, It&amp;#39;s highly likely that I won&amp;#39;t be able to explain myself well in the language. So I&amp;#39;ll send you some screenshots and try to explain myself again. My custom board uses Bluetooth as set up on the Thingy91, and I more or less use the same firmware for that section. As you can see from the screenshots, with standard applications, including nrfToolBox, the peripheral sends both the device name and the UUID related to Uart-NUS. In fact, I connect well with all standard applications, and you will see that in the photo of my specific application, I filter by device name to only have &amp;#39;BT310:HOS&amp;#39; devices in the list, and I have no problems. The problem only arises when I program a (for example) 52840DK as a central device, as it fails to find the peripheral by UUID. Do you think it could be configuration settings regarding advertising times or something else? The system, as per the smartphone, should work like this:&lt;/div&gt;
&lt;ul class="flex flex-col gap-2 list-disc pl-5 text-th-primary-dark text-th-primary-dark"&gt;
&lt;li class="text-th-primary-dark"&gt;The peripheral board activates advertising.&lt;/li&gt;
&lt;li class="text-th-primary-dark"&gt;The central device, upon finding the UUID or device name, connects without any data security or encryption. Simply put, it receives the strings sent by the peripheral.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;Thank you.&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_5466_5F00_own.jpg" alt=" " /&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;&lt;/div&gt;
&lt;div class="whitespace-pre-wrap text-th-primary-dark break-words "&gt;Silvio&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/thread/438075?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2023 12:48:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fec7050-684c-4348-917b-1487929d3e08</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;And is the UUID advertised in the advertising packet of your project? Or do you just advertise this device name. I&amp;#39;m a bit confused by your last sentence. Does that mean you have it working as expected, or is that how&amp;nbsp;&lt;strong&gt;you want it&lt;/strong&gt; to work in the end?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/thread/437752?ContentTypeID=1</link><pubDate>Sat, 22 Jul 2023 13:15:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1d7e55e-ef7c-404f-93bf-e260f93d082e</guid><dc:creator>babos</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;the peripheral is pretty much defined as thingy91 defines it:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# BLE
CONFIG_BT=y
CONFIG_BT_DEVICE_NAME=&amp;quot;BT310:HOST&amp;quot;
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=16
CONFIG_BT_PERIPHERAL_PREF_LATENCY=0
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400
CONFIG_BT_BONDABLE=n
CONFIG_BT_LL_SOFTDEVICE=y
CONFIG_BT_MAX_CONN=1
CONFIG_BT_AUTO_PHY_UPDATE=y
CONFIG_BT_DATA_LEN_UPDATE=y
CONFIG_BT_HCI_ACL_FLOW_CONTROL=y
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_NUS=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_SMP=y
CONFIG_BT_CTLR=y
CONFIG_BT_CTLR_RX_BUFFERS=10
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;while the UUID is &amp;quot;BT_UUID_NUS_SERVICE&amp;quot;&lt;/p&gt;
&lt;p&gt;to me, it would only serve that when it recognizes the device name &amp;quot;BT310:HOST&amp;quot;, it connects immediately, without pairing or anything else.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Silvio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/thread/437670?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 12:47:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f08aab20-f4bf-4070-b982-165d7e1e69a6</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;What changes have you made to the peripheral project then? Does it also advertise the NUS UUID or just its device name? As the UART central only scans for the UUID specifically it won&amp;#39;t connect to devices that don&amp;#39;t advertise this UUID either.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/thread/437269?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 13:24:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:946d93c3-0a48-41de-9326-dd39d4eb16cf</guid><dc:creator>babos</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;the peripheral I&amp;#39;m using uses only UUID Nordic Uart /NUS in fact nrfToolBox recognizes it from a smartphone as such and connects easily.&lt;br /&gt;On the central no. Now I&amp;#39;ll try to disable the filters then I&amp;#39;ll let you know.&lt;br /&gt;Thanks Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection issues between peripheral and central with NUS to UART service in BLE</title><link>https://devzone.nordicsemi.com/thread/437261?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 13:10:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2940963-84a0-4b59-be26-473824edab32</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The central_uart sample in NCS scans specifically for the Nordic UART service UUID, and will only try to connect to peripherals with the NUS service. You can see in the scan_init() function where this scan filter is added. you need to change the filter to only look for and connect to your device name or just disable the filter altogether.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static int scan_init(void)
{
	int err;
	struct bt_scan_init_param scan_init = {
		.connect_if_match = 1,
	};

	bt_scan_init(&amp;amp;scan_init);
	bt_scan_cb_register(&amp;amp;scan_cb);

	err = bt_scan_filter_add(BT_SCAN_FILTER_TYPE_UUID, BT_UUID_NUS_SERVICE);
	if (err) {
		LOG_ERR(&amp;quot;Scanning filters cannot be set (err %d)&amp;quot;, err);
		return err;
	}

	err = bt_scan_filter_enable(BT_SCAN_UUID_FILTER, false);
	if (err) {
		LOG_ERR(&amp;quot;Filters cannot be turned on (err %d)&amp;quot;, err);
		return err;
	}

	LOG_INF(&amp;quot;Scan module initialized&amp;quot;);
	return err;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>