<?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>Multi-host Channel Allocation Problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110273/multi-host-channel-allocation-problem</link><description>hi，I am using the NRF52840, softdevice: s140, 
 If a Bluetooth host simultaneously connects to multiple Bluetooth peripherals, and the peripherals transmit data to the host via notifications. 
 However, different peripherals transmit data to the host</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Apr 2024 03:39:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110273/multi-host-channel-allocation-problem" /><item><title>RE: Multi-host Channel Allocation Problem</title><link>https://devzone.nordicsemi.com/thread/480562?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 03:39:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a18b736-5e0c-48bc-a0c6-8600d399c8cb</guid><dc:creator>zjj</dc:creator><description>&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi-host Channel Allocation Problem</title><link>https://devzone.nordicsemi.com/thread/480154?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 09:27:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:248bb3d1-ec4a-4c47-b668-42d40a5672f1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;An NRF_ERROR_RESOURCES from the sd_ble_gatts_hvx() function points to too many notifications being queued, and you should wait for a&amp;nbsp;BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry. This is mentioned in the ble_gatts.h file for the SoftDevice used.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi-host Channel Allocation Problem</title><link>https://devzone.nordicsemi.com/thread/479937?ContentTypeID=1</link><pubDate>Mon, 22 Apr 2024 09:50:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec0a2337-c69a-4302-aaca-bc1efd2f83e7</guid><dc:creator>zjj</dc:creator><description>[quote userid="75734" url="~/f/nordic-q-a/110273/multi-host-channel-allocation-problem/479212"]What SDK version are you working on? [/quote]
&lt;p&gt;&lt;span&gt;I&amp;#39;m working on nRF5_SDK_17.1.0_ddde560 with s140。&lt;/span&gt;&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/110273/multi-host-channel-allocation-problem/479212"]What function is it that returns NRF_ERROR_RESOURCES exactly?[/quote]
&lt;div&gt;
&lt;div&gt;&lt;span&gt;sd_ble_gatts_hvx()&amp;nbsp;returns NRF_ERROR_RESOURCES;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1713778283056v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;For example, multiple peripherals are concurrently connected to a host and sending data packets to it, each identified by an ID as shown in the diagram. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;When the peripherals send fewer data packets, &lt;code&gt;sd_ble_gatts_hvx&lt;/code&gt; does not return the &lt;code&gt;NRF_ERROR_RESOURCES&lt;/code&gt; error, meaning the number of data packets attempted to be sent by the peripherals equals the number successfully sent; thus, the gray and orange quantities in the diagram are equal.&lt;/div&gt;
&lt;div&gt;However, when the peripherals send more data packets, &lt;code&gt;sd_ble_gatts_hvx&lt;/code&gt; returns the &lt;code&gt;NRF_ERROR_RESOURCES&lt;/code&gt; error, indicating that the number of data packets attempted to be sent exceeds the number successfully sent; hence, the gray quantity exceeds the orange quantity.&lt;/div&gt;
&lt;div&gt;Is this related to the host&amp;#39;s throughput limitation and the fact that the amount of data packets attempted to be sent by the peripherals exceeds the throughput the host can handle within the allocated connection time for the peripherals?&lt;/div&gt;
&lt;div&gt;If I want to allocate more connection time for peripherals that need to send more data packets, how should I proceed?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thank you in advance.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi-host Channel Allocation Problem</title><link>https://devzone.nordicsemi.com/thread/479212?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 12:26:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e52f4a47-fe99-4081-b8ae-2af58ef4bce7</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What SDK version are you working on? What function is it that returns NRF_ERROR_RESOURCES exactly? That should give us an idea as to what is claiming there are insufficient resources. My guess is that it would be a buffer of the data being sent that is exceeding its size and causes this to return. And how much data are we talking on these larger transmissions?&lt;/p&gt;
&lt;p&gt;If the issue is indeed with channels and the time on air for each peripherals, timeslots might be an option. Please check out the Timeslot API in the SoftDevice specification &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/multilink_scheduling/timeslot_api_timing.html"&gt;here&lt;/a&gt;&amp;nbsp;for details.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>