<?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>how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84020/how-to-manually-choose-device-to-connect-with-same-service-uuid</link><description>Hi all, 
 I am now using nrf52840DK and llpm example in nrf connect sdk 1.7.1. 
 Now I have three nrf52840DK, one as master ,and the others are slaves, they both use Latency Service UUID. 
 So, by this function&amp;quot; bt_scan_filter_add() &amp;quot; in scanning module</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Feb 2022 15:40:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84020/how-to-manually-choose-device-to-connect-with-same-service-uuid" /><item><title>RE: how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/thread/352401?ContentTypeID=1</link><pubDate>Thu, 10 Feb 2022 15:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31ecdccc-fb74-4c0c-b0a3-1421d76f6379</guid><dc:creator>HaoHuang</dc:creator><description>&lt;p&gt;&lt;span&gt;thanks a lot !!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/thread/350039?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 16:03:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9eddbcb6-457e-4fb8-a06c-968f7d60ec6d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;UART is the physical transport layer you see in PUTTY. I suggest to play around with the various examples to get a better understanding.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/thread/350010?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 14:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a66c0f3-da0e-49c8-b0f2-5158a8722304</guid><dc:creator>HaoHuang</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi,&amp;nbsp;Kenneth&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you give me more details about what part of the &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/83791/question-about-uart-configurations-for-nrf52832-and-nrf52840/348449#348449"&gt;answer&lt;/a&gt;&amp;nbsp;you mentioned above should I use?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I don&amp;#39;t understand why I have to use UART in my implementation, thanks!!!!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hao&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/thread/349941?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 11:15:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd7fbf7d-c462-4baa-9e2c-ecaeaaec23eb</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Likely you will need to make a buffer/array to put the device names into, and only print to the user when a new device name is found.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/thread/349880?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 08:37:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e11fa71b-f4f4-4030-817d-4c443cf641db</guid><dc:creator>HaoHuang</dc:creator><description>&lt;p&gt;Got it ,really thanks for your help.&lt;/p&gt;
&lt;p&gt;Now,I complete using bt_data_parse() in&amp;nbsp;&amp;nbsp;scan_filter_match() to print out device names with same uuid,&lt;/p&gt;
&lt;p&gt;I originally want to add bt_conn_le_creat() to connect specific device, but this approach can&amp;#39;t work because scan_filter_match() keep looping, could you give me some way to do this?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1643272660095v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Hao&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/thread/349748?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2022 12:19:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c95d7ac-945b-49fa-96c9-886a40ad3148</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Feel free to modify this as you best see fit, my previous reply should provide some guideance on where you can find code that you can use for reference.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/thread/349618?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 16:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d174758-358d-4389-8e54-9c3add8f1d72</guid><dc:creator>HaoHuang</dc:creator><description>&lt;p&gt;thanks a lot, do you mean using other UART approach to connect to broad ?&lt;/p&gt;
&lt;p&gt;Currently I use serial port to connect to broad, can I add&amp;nbsp; &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__bt__conn.html#ga8d66f3e0262a51279e9fa8b3139252e6"&gt;bt_conn_le_create()&lt;/a&gt;&lt;span class="n"&gt;&amp;nbsp; in scan_filter_match part after I set &lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;&lt;span&gt;.connect_if_match =&amp;nbsp;false&lt;/span&gt;?&amp;nbsp;&lt;/span&gt;&lt;span class="n"&gt;(In other&amp;#39;s post, I see this approach which seems easier for me as beginner)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;What I am going to do is &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;1.using uuid filter to list all the devices with the same uuid and different device name&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;2.list all the devices&amp;#39; name on putty&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;3.let user input device name and connect to that device&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;If I can do by this approach, plz give me some hint using&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__bt__conn.html#ga8d66f3e0262a51279e9fa8b3139252e6"&gt;bt_conn_le_create()&lt;/a&gt;&amp;nbsp;,thanks a lot!!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;I will also try the approach you suggest me.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="n"&gt;Hao&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to manually choose device to connect with same service UUID?</title><link>https://devzone.nordicsemi.com/thread/349586?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 14:47:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29cf19d9-48cc-46ba-a396-345290e69883</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Looking at&amp;nbsp;scan_init() I can find that the example by default&amp;nbsp;&lt;span&gt;.connect_if_match = &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;, so that needs to be set to false.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then in&amp;nbsp;&lt;/span&gt;scan_filter_match() you can likely print the information you are looking for to the user.&lt;/p&gt;
&lt;p&gt;Then you need to add UART handling in uart_cb()&amp;nbsp;from the user by for instance looking at this answer:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/83791/question-about-uart-configurations-for-nrf52832-and-nrf52840/348449#348449"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/83791/question-about-uart-configurations-for-nrf52832-and-nrf52840/348449#348449&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can find in scan.c example on how to connect to a peer by looking at the implementation of&amp;nbsp;scan_connect_with_target(). This then needs to be added to the uart_cb()&amp;nbsp;callback of the UART above.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>