<?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>Can two masters connect two slaves at the same time ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6411/can-two-masters-connect-two-slaves-at-the-same-time</link><description>I have a question.
Two slaves connect one Master.
At that time, Can another Master automatically connect the two slaves ?
I know softdevice110_v7 has connection state and advertizing state, but I don&amp;#39;t know for sure.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 20 Oct 2018 08:38:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6411/can-two-masters-connect-two-slaves-at-the-same-time" /><item><title>RE: Can two masters connect two slaves at the same time ?</title><link>https://devzone.nordicsemi.com/thread/153705?ContentTypeID=1</link><pubDate>Sat, 20 Oct 2018 08:38:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dcec52e-a777-450a-bd2f-9fb7dfae0269</guid><dc:creator>liyang</dc:creator><description>&lt;pre&gt;&lt;code&gt;uint8_t rssi_value;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;adjust to &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;int8_t rssi_value;&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can two masters connect two slaves at the same time ?</title><link>https://devzone.nordicsemi.com/thread/22358?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2016 11:29:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02abb10b-72ec-416d-9c96-789c9c8d55fd</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Phones generally use private resolvable address. This means that the address of a central device changes and you need to resolve it with using IRK. IRK is distributed during bonding, so you need to bond.  There is a function for IRK resolution in nRF5 SDK 11.0.0, im_address_resolve&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can two masters connect two slaves at the same time ?</title><link>https://devzone.nordicsemi.com/thread/22357?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2016 16:44:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7379433e-087d-443d-a4cc-f170c9ff3c4f</guid><dc:creator>nirmal@nordic</dc:creator><description>&lt;p&gt;I tried what is explained here ...and looks working fine...
But my peer address in the received SCAN_REQ_REPORT and device bluetooth address do not match...&lt;/p&gt;
&lt;p&gt;I run the code with the changes above and in my android device run NRF master control panel and hit scan button ...and with the breakpoint in the code, stops there ...to see the peer_adddress...but they do not match ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can two masters connect two slaves at the same time ?</title><link>https://devzone.nordicsemi.com/thread/22356?ContentTypeID=1</link><pubDate>Fri, 10 Apr 2015 09:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bc37879-4baa-4236-a989-7c34fcad1544</guid><dc:creator>t-kanda</dc:creator><description>&lt;p&gt;Thanks to reply. I understand that with S110 8, peripheral  don&amp;#39;t have two masters simultaneously. But, with S110 8,　peripheral can switch connection central 1 to central 2, and vice versa. Is switching between  central 1 and central 2 easy ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can two masters connect two slaves at the same time ?</title><link>https://devzone.nordicsemi.com/thread/22355?ContentTypeID=1</link><pubDate>Thu, 09 Apr 2015 09:49:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c280ded-2412-4b52-a5cb-ed0748f96440</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, you are correct, S110 7 (BLE peripheral/slave softdevice) can be in a connection and advertise in a non-connectable state simultaneously. But a BLE peripheral can not be in a connection with two centrals/masters simultaneously.&lt;/p&gt;
&lt;p&gt;However, with S110 8, a nRF51 peripheral/slave can be in a connection and adverstise in scannable mode and receive RSSI signals from any centrals/masters in vicinity, therefore knowing of their presence. With that strategy, the peripheral could disconnect from master 1 and establish connection with master 2, or periodically alter connection between central 1 and central 2 and virtually have 2 connections to 2 centrals.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 14.4.2015&lt;/strong&gt;
Letting a S110 peripheral switch between two devices should not be too hard. You advertise in a scannable mode and configure the softdevice to send the application scan request reports. The following example is set up to receive scan request reports. It is made for nRF51 SDK 8.0.0 and softdevice 8.0.0. It is based on the heart rate example in SDK 8.0.0.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_hrs_5F00_with_5F00_scan_5F00_req_5F00_report.zip"&gt;ble_app_hrs_with_scan_req_report.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The setup in the example is the following:&lt;/p&gt;
&lt;p&gt;Configure the softdevice to send the application scan request reports in the main function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t opt_id = BLE_GAP_OPT_SCAN_REQ_REPORT;
ble_opt_t ble_options;
ble_options.gap_opt.scan_req_report.enable = 1;
ble_stack_init();
err_code = sd_ble_opt_set(opt_id, &amp;amp;ble_options);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then create a switch case to receive the scan request reports in on_ble_evt:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint8_t rssi_value;
ble_gap_addr_t peer_address;
switch (p_ble_evt-&amp;gt;header.evt_id)
{
    case BLE_GAP_EVT_SCAN_REQ_REPORT:
        peer_address = p_ble_evt-&amp;gt;evt.gap_evt.params.scan_req_report.peer_addr;
        rssi_value = p_ble_evt-&amp;gt;evt.gap_evt.params.scan_req_report.rssi;
        break;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you need two scanners that performs active scanning, i.e. sends scan requests when advertising packets are received. You should be able to test the above example with the Master Control Panel or IOS device. They should normally send scan requests. Then set a breakpoint in the BLE_GAP_EVT_SCAN_REQ_REPORT case to see if the scan request report is received.&lt;/p&gt;
&lt;p&gt;To analyse how to set up and configure a nRF51 central device application that performs scan requests and connects to your device, I recommend to look at the &lt;a href="https://github.com/NordicSemiconductor/ble_app_uart_c_S120"&gt;ble_app_uart_c_120 example on Nordic&amp;#39;s Github&lt;/a&gt; which is analyzed &lt;a href="https://devzone.nordicsemi.com/question/33806/heart-rate-collector-with-custom-service/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>