<?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>Multiperipheral UART Example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33096/multiperipheral-uart-example</link><description>I am using 3 nrf52 DKs with S132 and SDK14 / and SDK15 to try and implement a combination of the multilink and UART examples. I started with the ble_app_uart_c example and added the relevant code from the ble_app_multilink_central example to connect to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Apr 2018 14:34:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33096/multiperipheral-uart-example" /><item><title>RE: Multiperipheral UART Example</title><link>https://devzone.nordicsemi.com/thread/127658?ContentTypeID=1</link><pubDate>Tue, 10 Apr 2018 14:34:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb64e6d5-3a0f-43d1-875b-e277538be3c2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Until this is fixed I don&amp;#39;t see much workaround other than ignore the additional duplicate events that occur for the same channel. Maybe it&amp;#39;s possible to somehow uninit() and init() the module again after service discovery, but not sure if that is a better idea either.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiperipheral UART Example</title><link>https://devzone.nordicsemi.com/thread/127540?ContentTypeID=1</link><pubDate>Tue, 10 Apr 2018 07:43:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42bedf70-6070-4140-bc35-4f4be2e64351</guid><dc:creator>Roethlin</dc:creator><description>&lt;p&gt;Hi, thanks for the hint. I made the proposed changes but it does not help. The&amp;nbsp;&lt;em&gt;ble_nus_c_on_db_disc_evt() is called in the db_disc_handler. I see the db_disc_handler seems for me to have a problem.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;After the 4 Line: Connected to target: handle 0 I call the ble_db_discovery_start(). This calls several time the db_disc_handler() with event 1 (=&amp;nbsp;BLE_DB_DISCOVERY_ERROR). After I while the&amp;nbsp;db_disc_handler() with event&amp;nbsp;0 (=&amp;nbsp;BLE_DB_DISCOVERY_COMPLETE) is called 7 times. Each time in the db_disc_handler() the&amp;nbsp;ble_nus_c_on_db_disc_evt() is called.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/NRF_5F00_Log_5F00_Info_5F00_p2.JPG" /&gt;&lt;/p&gt;
&lt;div id="doc-content"&gt;
&lt;div class="contents"&gt;
&lt;div class="memitem"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiperipheral UART Example</title><link>https://devzone.nordicsemi.com/thread/127491?ContentTypeID=1</link><pubDate>Mon, 09 Apr 2018 16:01:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:806ad3ce-cd44-4e4b-8a26-8cefefa987de</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I think the problem here is that&amp;nbsp;&lt;em&gt;BLE_NUS_C_EVT_DISCOVERY_COMPLETE&lt;/em&gt; is&amp;nbsp;not cleared after reported to the application, thereby it is reported multiple times while doing a service discovery on the second connection. I will report this internally as a bug, I assume the fix will be in &lt;em&gt;ble_nus_c_on_db_disc_evt()&lt;/em&gt;, where after calling&amp;nbsp;&lt;em&gt;p_ble_nus_c-&amp;gt;evt_handler(p_ble_nus_c, &amp;amp;nus_c_evt);&lt;/em&gt; you need to for instance&amp;nbsp;set&amp;nbsp;&lt;em&gt;nus_c_evt.evt_type&amp;nbsp; &amp;nbsp; =&amp;nbsp;NULL;&lt;/em&gt; or similar.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiperipheral UART Example</title><link>https://devzone.nordicsemi.com/thread/127147?ContentTypeID=1</link><pubDate>Fri, 06 Apr 2018 07:02:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed68f4b6-ac73-4438-b598-07f75d54d529</guid><dc:creator>Roethlin</dc:creator><description>&lt;p&gt;I call now the scan_start() in the BLE_NUS_C_EVT_DISCOVERY_COMPLETE (only the first time) instead in the BLE_GAP_EVT_CONNECTED event.&lt;/p&gt;
&lt;p&gt;The second device is powered on after the first telegram from the first event is received.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/NRF_5F00_Log_5F00_Info_5F00_p1.JPG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiperipheral UART Example</title><link>https://devzone.nordicsemi.com/thread/127116?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 16:42:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbd0faa1-30ce-4468-aa3a-1608dacc71a5</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;For debugging can you try to connect one peripheral first,&amp;nbsp; wait for discovery complete, before you start scanning/connecting for the next peripheral?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiperipheral UART Example</title><link>https://devzone.nordicsemi.com/thread/127054?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 12:55:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a17f54aa-e2d1-46d2-9577-8e0677504712</guid><dc:creator>Roethlin</dc:creator><description>&lt;p&gt;Hi, thanks for the information:&lt;/p&gt;
&lt;p&gt;in the sdk_config.h file I changed only the&amp;nbsp;NRF_SDH_BLE_TOTAL_LINK_COUNT,&amp;nbsp; but the&amp;nbsp;NRF_SDH_BLE_CENTRAL_LINK_COUNT remaind on the default value. After changing this definition I can connect the several peripherals.&lt;/p&gt;
&lt;p&gt;But the &amp;quot;problem&amp;quot; that connection&amp;nbsp;0 is calling the&amp;nbsp;le_nus_c_evt_handler() with event&amp;nbsp;BLE_NUS_C_EVT_DISCOVERY_COMPLETE remains. see the screenshot from the NRF_LOG INFOS.&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/NRF_5F00_Log_5F00_Info.JPG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiperipheral UART Example</title><link>https://devzone.nordicsemi.com/thread/127017?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 11:57:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0baef22a-c070-4aae-8219-968b47debf5c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi, I guess there may be several things here, but a few for a starter:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;1. How many central links have you configured the stack to support?&lt;/p&gt;
&lt;p&gt;This is typically configured in&amp;nbsp;nrf_sdh_ble_default_cfg_set():&lt;br /&gt;ble_cfg.gap_cfg.role_count_cfg.central_role_count = &lt;strong&gt;?&lt;/strong&gt;;&lt;br /&gt;sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &amp;amp;ble_cfg, *p_ram_start);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;2. After calling&amp;nbsp;scan_start() the softdevice will be scanning for devices, and thereby the softdevice will typically generate&amp;nbsp;BLE_GAP_EVT_ADV_REPORT events. Depending on the advertisement data, the application may then decide to connect to the peripheral by calling&amp;nbsp;sd_ble_gap_connect(). What are the parameters used to connect?&lt;/p&gt;
&lt;p&gt;It is for instance a good idea to have a reasonable timeout for&amp;nbsp;SCAN_TIMEOUT (instead of 0 infinite timeout), such that if no peripheral connects within a few seconds (for instance 2 seconds), then the application will receive a&amp;nbsp;BLE_GAP_EVT_TIMEOUT,&amp;nbsp;and then the application can&amp;nbsp;call scan_start() waiting for next advertisment report.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>