<?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>Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54830/multirole-connection-can-we-send-a-broadcast-ini-advertising-mode-while-in-ble-connection-mode-at-the-same-time</link><description>Hi, 
 
 I have 3 Devices that constantly broadcast their position to each other so the other can adjust the position each other. they act like master and slave but ther are no connection between them. 
 now i want to connect one of those 3 to a smartphone</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jan 2020 10:26:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54830/multirole-connection-can-we-send-a-broadcast-ini-advertising-mode-while-in-ble-connection-mode-at-the-same-time" /><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/230033?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2020 10:26:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e1ce7ac-9a10-4877-bd52-23ae1ee495da</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;An Observer scans devices but never sends a connection request packet. This is achieved in the multi-role example by setting&amp;nbsp;&lt;span&gt;init_scan&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;connect_if_match&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;to false. Advertising is started after scanning is started in&amp;nbsp;&lt;/span&gt;&lt;/span&gt;adv_scan_start(). Again, I strongly recommend that you go through our tutorials on BLE and use some time for understanding the basics behind the Bluetooth Low Energy protocol.&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/229699?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 17:51:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25a83677-2c60-421d-ac21-91ceeeb621f7</guid><dc:creator>Andhika</dc:creator><description>&lt;p&gt;Hello Jared,&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/54830/multirole-connection-can-we-send-a-broadcast-ini-advertising-mode-while-in-ble-connection-mode-at-the-same-time/222574"]You could achieve step 1 and 2 if each device scans without sending a connection request ( Observer role) and at the same time advertises. You don&amp;#39;t need to implement the broadcast role i.e if the other devices don&amp;#39;t send a connection request. The devices can advertise as connectable, which would make it possible for the smartphone to connect.[/quote]
&lt;p&gt;where can i configure it? is it has something to do with ble_gap_adv_type? because previously we used ble_gap_adv_type_nonconnectable_noscanneble_undirected to configue our device as broadcaster&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/227619?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2020 09:51:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:930d72e5-1475-45f9-8d2e-5c24f4a1b4f4</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
[quote user="andprasetyo"]really? it&amp;#39;s a great answer but do you have any example or suggestion that i can learn from?[/quote]
&lt;p&gt;&amp;nbsp;This is the multirole example without sending a connection request.&lt;/p&gt;
[quote user="andprasetyo"]honestly no, the packet is different, from smartphone to the first device we send a command such as move forward etc, and then after the first device doesn&amp;#39;t move anymore it&amp;#39;s send its position to another 2 devices as broadcaster role so there is no connection between them[/quote]
&lt;p&gt;&amp;nbsp;I don&amp;#39;t think you understood it correctly, I did not suggest that the devices are to connect to each other, but was wondering if you are going to advertise the same packet to smartphone and devices. I think most of your questions would be answered if you read the BLE documentation on roles properly.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/222627?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 13:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56e91083-f257-41bd-94d1-103cda0c7e2d</guid><dc:creator>Andhika</dc:creator><description>&lt;p&gt;thanks for your suggetion :)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so after the connection with smartphone established (peripheral role) and it act as central to another devices, it can still act as obeserver and broadcaster role?&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/54830/multirole-connection-can-we-send-a-broadcast-ini-advertising-mode-while-in-ble-connection-mode-at-the-same-time/222574"]You could achieve step 1 and 2 if each device scans without sending a connection request ( Observer role) and at the same time advertises. You don&amp;#39;t need to implement the broadcast role i.e if the other devices don&amp;#39;t send a connection request.[/quote]
&lt;p&gt;really? it&amp;#39;s a great answer but do you have any example or suggestion that i can learn from?&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/54830/multirole-connection-can-we-send-a-broadcast-ini-advertising-mode-while-in-ble-connection-mode-at-the-same-time/222574"]I assume that you want to advertise the same packet to both smartphone and the devices.&amp;nbsp;[/quote]
&lt;p&gt;honestly no, the packet is different, from smartphone to the first device we send a command such as move forward etc, and then after the first device doesn&amp;#39;t move anymore it&amp;#39;s send its position to another 2 devices as broadcaster role so there is no connection between them&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/54830/multirole-connection-can-we-send-a-broadcast-ini-advertising-mode-while-in-ble-connection-mode-at-the-same-time/222574"]I&amp;#39;m not sure what you mean with equal role, could you elaborate?[/quote]
&lt;p&gt;so there is no master and slave. there is no connection between them just broadcaster and observer. because from what i understood we use multirole so the first device could be the peripheral(slave) to the phone and central(master) to another devices.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for your help:)&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Andhika&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/222574?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 10:14:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1715885-9135-457a-acd1-25d2edf7df5e</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;My understanding is that you have 3 requirement&amp;nbsp;for each device:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It should scan the advertising packet of the other devices without sending a connection request (Observer role)&lt;/li&gt;
&lt;li&gt;It should advertise to the other devices devices without accepting a connection request from them ( Broadcaster role). This requirement might be omitted, see explanation further down.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;It should accept a connection request from the smartphone ( Peripheral role)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I assume that you want to advertise the same packet to both smartphone and the devices.&amp;nbsp;&lt;/p&gt;
[quote user="andprasetyo"]at first i also thought about multi-role but after i discussed it with my supervisor, we want to maintain the broadcaster role, we want to&amp;nbsp;maintain their equal role (broadcaster and observer)[/quote]
&lt;p&gt;I&amp;#39;m not sure what you mean with equal role, could you elaborate?&lt;/p&gt;
&lt;p&gt;You could achieve step 1 and 2 if each device scans without sending a connection request ( Observer role) and at the same time advertises. You don&amp;#39;t need to implement the broadcast role i.e if the other devices don&amp;#39;t send a connection request. The devices can advertise as connectable, which would make it possible for the smartphone to connect.&lt;/p&gt;
&lt;p&gt;I still think multi-role is the way to go. Maybe the forum has a better suggestion ;)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/222407?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 14:55:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3f161cb-0bfd-4d79-b41a-8782dcfa048f</guid><dc:creator>Andhika</dc:creator><description>&lt;p&gt;Hi Jared,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for gettiing back to me,&lt;/p&gt;
&lt;p&gt;at first i also thought about multi-role but after i discussed it with my supervisor, we want to maintain the broadcaster role, we want to&amp;nbsp;maintain their equal role (broadcaster and observer). because what i understood, if i use multi-role than the role between 3 devices changes to master and slave with one central.&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/54830/multirole-connection-can-we-send-a-broadcast-ini-advertising-mode-while-in-ble-connection-mode-at-the-same-time/222399"]and then scan the other peripherals when they act as a central without sending a connection request.[/quote]
&lt;p&gt;so after the connection with the phone established the central role can&amp;#39;t broadcast the message? or i missunderstood?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/222399?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 14:37:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80b2ff5c-63ce-42cc-9ef5-250d258124cd</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The peripherals shouldn&amp;#39;t automatically send a connection request because they&amp;#39;ve scanned the advertising peripheral. I don&amp;#39;t see any issues with using multi-role.&amp;nbsp; The peripherals can advertise in connectable mode, and then scan the other peripherals when they act as a central without sending a connection request.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/222149?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 14:59:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db360e52-720b-41b0-b83b-24960c6efc4b</guid><dc:creator>Andhika</dc:creator><description>&lt;p&gt;Hi Jared,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for your respond, now i don&amp;#39;t want to use multirole because i don&amp;#39;t want establish a connection between those 3 devices so there are no master and slave,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so i already wrote a code for non-connectable advertisiment (the device as broadcaster) and before that i established the connection between the device and the phone but it return an error for function&amp;nbsp;nrf_sdh_enable_request,&amp;nbsp;ble_radio_notification_init,&amp;nbsp;nrf_sdh_ble_enable,&amp;nbsp;sd_ble_gap_adv_set_configure all retuns an invalid_state error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole Connection: can we send a broadcast ini advertising mode while in ble connection mode at the same time?</title><link>https://devzone.nordicsemi.com/thread/222145?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 14:43:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc87def1-6939-4e96-9346-58e7c3625f55</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]is multirole still the most suitable solution to this problem?[/quote]
&lt;p&gt;&amp;nbsp;Yes ;)&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>