<?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>Central which can connect and communicate with all kinds peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84678/central-which-can-connect-and-communicate-with-all-kinds-peripheral</link><description>Hi 
 I want to use nrf52840 to develop a central like figure below，the central can connect and communicate with all kinds of peripheral. Is there a reference example？</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 Feb 2022 03:22:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84678/central-which-can-connect-and-communicate-with-all-kinds-peripheral" /><item><title>RE: Central which can connect and communicate with all kinds peripheral</title><link>https://devzone.nordicsemi.com/thread/353495?ContentTypeID=1</link><pubDate>Thu, 17 Feb 2022 03:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55dfde49-1c27-4b1f-8add-9325d7b12cf4</guid><dc:creator>helen</dc:creator><description>&lt;p&gt;Ok,Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central which can connect and communicate with all kinds peripheral</title><link>https://devzone.nordicsemi.com/thread/353095?ContentTypeID=1</link><pubDate>Tue, 15 Feb 2022 12:34:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4234841-bd40-40d2-9f37-52d4d98c9b25</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;nRF Connect for Desktop uses (a slightly modified version) of the example found in nRF5_SDK\examples\connectivity\ble_connectivity).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is basically a serialized softdevice application, meaning that all the softdevice calls that would normally be triggered from the application on the nRF52 and handled by the softdevice is instead triggered by UART from a connected device (computer), and handled by the softdevice. The replies are then reported back over UART.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nRF Connect for Desktop is built on top of something called &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;pc-ble-driver&lt;/a&gt;, which is a c++ based SDK running on a computer, triggering the softdevice via serial.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, nRF Connect for Desktop -&amp;gt; Bluetooth Low Energy is not open source, so I don&amp;#39;t have anything I can share with you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to decide whether you want to start with pc-ble-driver, or if you would like to write your own UART protocol. If you want to write your own uart protocol, you need to find a way to extract arguments from the UART messages (used to decide what peripheral to connect to, enable/disable notifications, etc.). Unfortunately, we don&amp;#39;t have any guides on how to do this.&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: Central which can connect and communicate with all kinds peripheral</title><link>https://devzone.nordicsemi.com/thread/352998?ContentTypeID=1</link><pubDate>Tue, 15 Feb 2022 03:55:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:257e6e68-28f2-4802-a872-80e6ee70c291</guid><dc:creator>helen</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1644892531165v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The central can receive&amp;nbsp;&lt;span&gt;advertisements like nrf connect desktop and connect to a peripheral which the user need like nrf connect desktop.The central connect to peripheral by&amp;nbsp;one to one like nrf connect desktop.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1644893437340v2.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The central is&amp;nbsp;a standalone device that receive command through&lt;/span&gt;&lt;span&gt;&amp;nbsp;uart to control the central to scan,connect，disconnect，read，write a peripheral like nrf connect desktop&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1644895763537v3.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes,I also use commands which from uart to get the central connect or disconnect to the peripheral I want and to get the central to read,write and enable the&amp;nbsp;&lt;/span&gt;&lt;span&gt;characteristics in the server of&amp;nbsp;&lt;/span&gt;&lt;span&gt;the peripheral like nrf connect desktop.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you list apis about these operation？Or Could you share the source code which is downloaded&amp;nbsp; to nrf52840 by the Bluetooth Low Energy app in the nRF Connect Desktop？&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central which can connect and communicate with all kinds peripheral</title><link>https://devzone.nordicsemi.com/thread/352927?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 14:18:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:860911ed-61f9-4328-8b73-bbbec3ee9362</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I think I understand, but the issue is that in your case, you would just connect to the first device you would receive an advertisement from then, right?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you intend to run this from a computer, like nRF Connect for Desktop does in your screenshot, or is this a standalone device?&lt;/p&gt;
[quote user="helen"]&lt;span&gt;&lt;span&gt;various p&lt;/span&gt;&lt;/span&gt;eripherals have different servers inside.The central which I want to realize can connect and communicate with&amp;nbsp;&lt;span&gt;&lt;span&gt;various p&lt;/span&gt;&lt;/span&gt;eripherals[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you look at one of our central examples, like the central_uart sample found in NCS\nrf\samples\bluetooth\central_uart, you can see how it calls&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;bt_gatt_dm_start() in gatt_discover() in main.c.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;If you look at the &lt;strong&gt;declaration&lt;/strong&gt; from gatt_dm.h, you can see that the 2nd input parameter can either be the UUID of the target service, or NULL if any service should be discovered. Perhaps that is what you are looking for?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;[quote user="helen"]&lt;p&gt;&lt;strong&gt;&lt;span&gt;Is there a reference example？&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;Sorry, we do not have any reference examples that connects to any peripheral like you describe above. I am sorry.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central which can connect and communicate with all kinds peripheral</title><link>https://devzone.nordicsemi.com/thread/352792?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 03:16:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:115cccdb-5965-421b-8957-56ba20a88b51</guid><dc:creator>helen</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;strong&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1644807100389v1.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Sorry,Because &lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keywords-means"&gt;&lt;span class="keywords-mean highlight"&gt;various p&lt;/span&gt;&lt;/span&gt;eripherals have different servers inside.The central which I want to realize can connect and communicate with&amp;nbsp;&lt;span class="keywords-means"&gt;&lt;span class="keywords-mean highlight"&gt;various p&lt;/span&gt;&lt;/span&gt;eripherals，The central can discover any server in&amp;nbsp;any peripheral,It is similar to how nrf connect app conncts and communicates with a peripheral .&lt;/strong&gt;&lt;strong&gt;what I need is the implementation of code ，&lt;span&gt;Is there a reference example？&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/84678/central-which-can-connect-and-communicate-with-all-kinds-peripheral/352649#352649"]decisio[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Central which can connect and communicate with all kinds peripheral</title><link>https://devzone.nordicsemi.com/thread/352649?ContentTypeID=1</link><pubDate>Fri, 11 Feb 2022 13:51:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:875e25af-cccc-40a2-b755-d422f094c1c5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can scan to see what devices that are advertising nearby, and based on the advertisements, decide who you want to connect to. But how do you want to make this decision during runtime?&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></channel></rss>