<?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>How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71366/how-to-send-a-big-data-array-to-slave-in-host-mode</link><description>a data array, length is 2048,use function &amp;quot;sd_ble_gattc_write&amp;quot;, a error occurred, length less than 240, no error. 
 
 do {。。 err_code = write_configure(m_center_handle,14,(uint8_t *)UART_RX_BUF,UART_RX_STA,0); //printf(&amp;quot;err:\r\n0x%x\r\n&amp;quot;,err_code); if</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Feb 2021 08:52:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71366/how-to-send-a-big-data-array-to-slave-in-host-mode" /><item><title>RE: How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/thread/294321?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 08:52:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a344587-0781-40c5-9669-14cc10fb3ace</guid><dc:creator>Edvin</dc:creator><description>[quote user="Edvin Holmseth"]What device receives the NRF_ERROR_INVALID_STATE? And what function returns that?[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/thread/294259?ContentTypeID=1</link><pubDate>Sat, 13 Feb 2021 04:46:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43da6ff2-8666-4796-a558-bf84b1fbce07</guid><dc:creator>Nordfield</dc:creator><description>&lt;p&gt;I Changed the uart irq &amp;nbsp;from APP_IRQ_PRIORITY_LOW_MID to APP_IRQ_PRIORITY_LOWEST,the functional is OK, I will test&amp;nbsp;&lt;span&gt;continue，maybe the irq cause the reset.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/thread/294257?ContentTypeID=1</link><pubDate>Sat, 13 Feb 2021 02:46:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59fb2223-7a7b-49a0-a62c-c0e6cfa831ae</guid><dc:creator>Nordfield</dc:creator><description>&lt;p&gt;&lt;span&gt;have two NRF52832,the host nrf52832 reset. my device via uart send data to host 52832, host 52832 send the data to slave, when host sent success to slave, host 52832 reply &amp;quot;SEND OK&amp;quot;&amp;nbsp; to my device, my device send next packet data.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/thread/294213?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 15:30:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:302bbffe-a7e7-44e8-bcd5-2921a887e8de</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Now I am really confused as of what device that randomly resets, what device that isn&amp;#39;t able to send the packet and all that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you use 2 or 3 nRFs? There are only two, right? One master and one slave? What device receives the NRF_ERROR_INVALID_STATE? And what function returns that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/thread/294174?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 13:46:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca1f536f-0279-487c-9a83-cf6c5b4471eb</guid><dc:creator>Nordfield</dc:creator><description>&lt;p&gt;My device via UART send data to NRF52832，NRF52832&amp;nbsp;&lt;span&gt;relay the data to slave, the packet size is 20 bytes, send&amp;nbsp;continuous。device via UART send to 52832, the 52832 relay the data to slave success, then replay &amp;quot;SEND OK&amp;quot; via UART to device, then device send next packet, but sometimes ,the 53832 restart, no error&amp;nbsp;watched , use RTT Viewer, not&amp;nbsp;watching any error.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m use a&amp;nbsp; watchdog , use hardware timer to feed dog, when 52832 restart , the stack look likes not scheduling, so the dog not feed.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/thread/294126?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 10:51:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e97a0efb-da20-498d-bab8-b8487072e7ac</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Does that only occur when you increase the packet length? This typically means that the connection is not fully completed yet.&lt;/p&gt;
&lt;p&gt;What do you mean by:&lt;/p&gt;
[quote user="Nordfield"]&lt;p&gt;ble_nus_data_send&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;sd_ble_gattc_write&lt;/p&gt;[/quote]
&lt;p&gt;&amp;nbsp;ble_nus_data_send() doesn&amp;#39;t use sd_ble_gattc_write. sd_ble_gattc_write() is for centrals/masters, and ble_nus_data_send() is for peripherals/slaves.&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: How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/thread/294024?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 15:28:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbb2f901-e23a-4994-9fa2-221888595a6c</guid><dc:creator>Nordfield</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;A another question, when send data to host or slave ,a error code is 8,NRF_ERROR_INVALID_STATE&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;ble_nus_data_send&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;sd_ble_gattc_write&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send a big data array to slave in host mode?</title><link>https://devzone.nordicsemi.com/thread/293334?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 13:02:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84345d0f-def8-4079-86f7-53b945972fb1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So, what error did you encounter? Did it print anything in the log before you commented out the printf() calls?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My guess is that you saw the NRF_ERROR_INVALID_PARAM or&amp;nbsp;NRF_ERROR_DATA_SIZE? You need to keep the length shorter than the MTU of the connection. If the array that you need to send is larger than this, you should split it into several packets that are small enough for you to send, and then put it back together on the other side.&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>