<?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>Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87057/transfer-exisiting-application-nrf52840-sd-6-1-1-from-peripheral-to-central-and-peripheral-mode</link><description>We do have standalone applications developed in nrf52840, SD 6.1.1 Peripheral and Central individually, and working perfect. 
 Now we want to merge both applications based on our requirements. Let say based on one event My primary peripheral application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Apr 2022 14:26:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87057/transfer-exisiting-application-nrf52840-sd-6-1-1-from-peripheral-to-central-and-peripheral-mode" /><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/364288?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 14:26:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a724dab7-9d1f-4c78-81ae-026a1704d62d</guid><dc:creator>Vipul2988</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;, Yes this task are triggered when we are in &amp;quot;Central Mode&amp;quot; through the button handler kind of thing.&amp;nbsp; It might be possible that I am spending too much time in other interrupt.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Here it seems like my application is stuck in central task and I am triggring the interrupt event for peripheral. Not sure.&lt;/p&gt;
&lt;p&gt;Let me check and get back to you.!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/364282?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 14:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e53ecde2-a02a-4685-8d79-42a5181156d1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;That probably won&amp;#39;t tell me much if I don&amp;#39;t know what your application looks like. What sort of tasks do you claim that it doesn&amp;#39;t perform when it is in &amp;quot;central mode&amp;quot;?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess that these tasks are triggered somewhere in your main.c file. Are they still being triggered when you are in &amp;quot;central mode&amp;quot;? If not, how are they usually triggered? Timer? Button handler? Other events? And why are they being blocked some times? Perhaps you are spending too much time in another interrupt with a higher (or equal) priority? Remember that interrupts can&amp;#39;t be triggered if your application is &amp;quot;stuck&amp;quot;/waiting in another interrupt with equal or higher priority.&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: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/364276?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 13:57:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:358ffadf-cff6-499f-b058-11c338e42af6</guid><dc:creator>Vipul2988</dc:creator><description>&lt;p&gt;Do you want me to share snippets of debug terminal?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/364267?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 13:42:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1907c0c3-4f06-4efa-aedd-226011c9ab13</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What exactly are these tasks? Are the peripheral tasks that are not being done in a connection, or is it advertising is it disconnecting from an existing connection? If it is in a connection, what is it supposed to to? Perhaps you have some snippets you can show?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/364261?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 13:34:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6783209a-0b14-4a28-8d7c-02f5bc4df9a8</guid><dc:creator>Vipul2988</dc:creator><description>&lt;p&gt;The reason I am asking this because in my application when it is performing central task (reading value from peripherals periodically let say every 15 seconds), it is not doing other task of (Peripheral) inbetween.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/364253?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 13:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70d8aafb-659a-4868-a250-14df9c48f888</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;The peer manager is used to store bonding data with different devices. Bonding data are the encryption keys that are negotiated in the first connection, and they are stored and re-used the next time they connect, so that they do not have to generate new keys. It is also commonly used together with whitelisting, to allow only known devices to connect to the device. (like a wireless keyboard that will only accept connections from already known devices, unless you tell it specifically to look for new unknown connections).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It will not affect the connection (communication speed/priority) after the connection is initiated.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/364196?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 11:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f4e6d64-31a2-479c-8063-9398dd84000f</guid><dc:creator>Vipul2988</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One question in my peripheral application we have used peer manager and in central application we did not used peer manager function. will it effect while it is communicating with central and peripheral both?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/363977?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 13:57:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b19c166-1fcb-4cdf-9f02-cabba0a7b5ec</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Without having confirmed this by testing, I guess that the conn_handle that you are checking is not a valid conn_handle, meaning it is not in a connection at all. The conn_handle is populated when you enter a connection, and then it is unpopulated in the disconnected event.&amp;nbsp;&lt;/p&gt;
[quote user="Vipul2988"]Let me try some troubleshoots over here and get back to you[/quote]
&lt;p&gt;I&amp;#39;ll leave this one open, so just pop back if you have more related questions.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/363959?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 13:22:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6169a5e4-df07-493b-819e-b1be217384b7</guid><dc:creator>Vipul2988</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thank you for detail answer. That covers lot my confusion here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding priority if our softdevice is handling not to collide with communication between central and peripheral than I don&amp;#39;t need to worry about it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I see in the hrs_rscs_relay example most of the time it is remain in the&amp;nbsp;BLE_GAP_ROLE_INVALID mode when not commnicating with other devices. that clears my doubt.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let me try some troubleshoots over here and get back to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transfer exisiting application nrf52840 SD 6.1.1 from Peripheral to Central and Peripheral Mode.</title><link>https://devzone.nordicsemi.com/thread/363750?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 06:51:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccd20184-76c0-4946-bfa4-ffd8a323fa88</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;As you mention, you can look at the examples in ble_central_and_peripheral for examples on how to set up a device that supports both the peripheral and central role. I think the hrs_rscs_relay is a place to start perhaps. I see that you are very concerned with the&amp;nbsp;&lt;strong&gt;roles&lt;/strong&gt;, peripheral and central, but in reality, there isn&amp;#39;t really a switch saying whether you are currently a central or a peripheral. If you are advertising, then you are doing that as a peripheral, and if you are scanning, you are doing that as a central. You can start and stop the scanning from any events in your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you are in a connection, the difference between central and peripheral will be smaller. The difference is what device that typically &amp;quot;owns&amp;quot; the services and characteristics, and hence, if you want to send a message to the other device, you need to know whether to send a notification or a write request (or something else).&amp;nbsp;&lt;/p&gt;
[quote user=""]How ble_conn_state_role(conn_handle) is switching the role in these examples? . It is not clear by tracing it down.[/quote]
&lt;p&gt;This function will tell you whether you are a peripheral or central in that specific connection (the connection that this conn_handle belongs to).&lt;/p&gt;
[quote user=""]&lt;ul&gt;&lt;li&gt;What will be the major key function need to address when we are switching between the roles.?&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;[/quote]
&lt;p&gt;You don&amp;#39;t really need to switch roles actively. You can start and stop advertising/scanning.&lt;/p&gt;
[quote user=""]How we can assign the priority of our central and peripheral roles? I mean to say my priority here is let say peripheral role should be more important than central and when both called simultaneously than I want to perform my peripheral activity first.[/quote]
&lt;p&gt;What activities do you mean? You can handle both connections at the same time. Since the connections are time slotted, they will (most of the times) not collide. If they do collide, however, the Softdevice will handle scheduling dynamically, to maintain both connections. But I suspect this is not the type of priorities that you are talking about. Can you please elaborate?&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>