<?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>Use Multi-NUS in one central device to get two peripheral&amp;#39;s data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120305/use-multi-nus-in-one-central-device-to-get-two-peripheral-s-data</link><description>Hi, 
 I have used the sample given in blog , however, my purpose is to get data from two device &amp;quot;IMU1&amp;quot; and &amp;quot;IMU2&amp;quot;, using callback &amp;quot; static uint8_t ble_data_received &amp;quot; to print out, I am using the coded_phy in NCS 2.91 with nRF21540 DK to be the central</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Mar 2025 13:09:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120305/use-multi-nus-in-one-central-device-to-get-two-peripheral-s-data" /><item><title>RE: Use Multi-NUS in one central device to get two peripheral's data</title><link>https://devzone.nordicsemi.com/thread/529812?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 13:09:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3918086f-6973-42dd-b50a-b01ad717e0cc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Zhou,&amp;nbsp;&lt;br /&gt;Have you make sure you handle each connection with correct bt_conn conn id ?&amp;nbsp;&lt;br /&gt;From what I can see here you are assigning them to the same pointer:&amp;nbsp;default_conn&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;err = bt_conn_le_create(device_info-&amp;gt;recv_info-&amp;gt;addr, conn_params,
  BT_LE_CONN_PARAM_DEFAULT,
  &amp;amp;default_conn);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Each connection should be assigned to a different &amp;quot;conn&amp;quot;, so that you can use them later on. Or you can compare them with the &amp;quot;conn&amp;quot; in each of the BLE event.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please try to test with one single peripheral and make sure it works fine before testing with 2 peripherals.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>