<?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>nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54880/nrf_mesh_serial_tx-returns-nrf_error_no_mem</link><description>Hi, 
 I&amp;#39;m developing an application to monitor the current application and network context, by extending upon the existing Light Switch example in nRF5 for Mesh SDK v3.2.0 (using Nordic SDK 15.3 as underlying SDK). The Light Switch client &amp;amp; server are</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Dec 2019 17:05:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54880/nrf_mesh_serial_tx-returns-nrf_error_no_mem" /><item><title>RE: nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/thread/223416?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 17:05:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63ea7006-6dcb-4838-a2ea-f828c7207c06</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Build code is B0, that corresponds to Bx0 (where x is 0), i.e. revision 1. I realize that the mapping is not obvious, you need to look into the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fordering_info.html&amp;amp;anchor=concept_vng_xls_2q"&gt;ordering information&lt;/a&gt; section of the product specification for it to fully make sense.&lt;/p&gt;
&lt;p&gt;In any case I am happy to hear you have found a new board where everything seems to be working. Feel free to open a new thread (or revive this one) when (if) you find some time and decide to look into it again.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/thread/223395?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 15:20:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4eafe4e-0aff-4639-b413-2e22c1e462b0</guid><dc:creator>Mathias</dc:creator><description>&lt;p&gt;Year seems to be 2016 and week number 26. The chip markings indicate N52832 QFAAB0 1606AA. I understand this means Packet Variant QFAA as indicated here &lt;a href="https://infocenter.nordicsemi.com/topic/comp_matrix_nrf52832/COMP/nrf52832/ic_revision_overview.html?cp=4_2_2_0"&gt;https://infocenter.nordicsemi.com/topic/comp_matrix_nrf52832/COMP/nrf52832/ic_revision_overview.html?cp=4_2_2_0,&lt;/a&gt; but I&amp;#39;m not sure what is the Build Code. &lt;/p&gt;
&lt;p&gt;The main issue seems to be the serial communication. But I&amp;#39;ll assess if the problem remains when performing UART without any BLE or BLE mesh radio communication going on as well. I&amp;#39;ll get back to it once I find some time :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/thread/223387?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 15:06:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fb1a6b6-7cf6-4ba1-af7b-b1b7dfc74b76</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the delayed answer from my side.&lt;/p&gt;
&lt;p&gt;The version and production date of the board should be printed on the programmer MCU, e.g.:&lt;/p&gt;
&lt;p&gt;PCA10040&lt;br /&gt;V1.0.0&lt;br /&gt;2016.32&lt;/p&gt;
&lt;p&gt;There, line number three is year (2016) and week number (32).&lt;/p&gt;
&lt;p&gt;I am a little puzzled that you get both of those issues on the old board, as I do not see an immediate connection between the two... Chip markings of the nRF52832 will reveal chip revision, it may be that if it is an engineering revision it requires errata workarounds that are not present in the latest SDKs.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/thread/222335?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 12:15:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67032d5c-37d3-4d2c-86fd-d2651c093a69</guid><dc:creator>Mathias</dc:creator><description>&lt;p&gt;I found the problem... It seems the serial communication capabilities of my DK are broken. I tested the communication on another DK and everything is working fine there, with serial communication occuring as it should and no NRF_ERROR_NO_MEM codes being returned.&lt;/p&gt;
&lt;p&gt;Not sure why the serial communication of my DK suddenly failed. I think its ~ 2 years old.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/thread/222312?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 10:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:830194c1-6b7f-4702-a38d-261959086602</guid><dc:creator>Mathias</dc:creator><description>&lt;p&gt;Hmm, it seems something stranger is going on.. Serial communication is not printed on any reader or when using the Interactive Python Application Controller Interface Python script. I even tried to just test the loopback, by calling d[0].send(cmd.Echo(&amp;quot;hello world&amp;quot;)), but it also times out.&lt;/p&gt;
&lt;p&gt;I do call &lt;em&gt;nrf_mesh_serial_init(serial_interface_cb)&lt;/em&gt;&amp;nbsp;upon initialization of the provisioner and it does return&amp;nbsp;NRF_SUCCESS. I am also sure that I&amp;#39;m using the correct COM port to read out serial. So not sure what&amp;#39;s still missing...&lt;em&gt; &lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/thread/222176?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 17:33:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:439a8e43-f316-4665-8013-39e3227abf72</guid><dc:creator>Mathias</dc:creator><description>&lt;p&gt;I tried increasing the buffer size, but the problem remained the same. What essentially happens is that its initially working fine, but then NRF_ERROR_NO_MEM starts getting returned and it doesn&amp;#39;t go back from that until I reset the board... &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/thread/222173?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 16:53:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a10867b6-bf95-4ee5-b82a-1e425ba779db</guid><dc:creator>Mathias</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the comprehensive answer!&lt;/p&gt;
&lt;p&gt;With retry mechanism, do you mean repeating the method until it doesn&amp;#39;t return NRF_ERROR_NO_MEM anymore but instead returns NRF_SUCCESS, meaning it succeeded? Because I tried putting it in a while - loop but it kept returning NRF_ERROR_NO_MEM, blocking the application entirely...&lt;/p&gt;
&lt;p&gt;The client model&amp;#39;s publication timer on the provisioner is set on 10 seconds, which means that every 10 seconds it sends a GET message to all nodes, hoping to receive STATUS messages back from them. Right now, I reduced the network to only one node, meaning it will only get one STATUS message back or thus meaning it will only call &lt;em&gt;nrf_mesh_serial_tx&lt;/em&gt; once every ~ 10 seconds.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll see if increasing the tx buffer size helps, but as you say, that could possibly not help at all.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Mathias&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_mesh_serial_tx returns NRF_ERROR_NO_MEM</title><link>https://devzone.nordicsemi.com/thread/222101?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 13:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdec52b8-aa2e-47b2-9d28-9fad5174f2d8</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;According to &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v3.2.0%2Fgroup__NRF__MESH__SERIAL.html&amp;amp;anchor=ga1fc56121ac117963e4fa2aa06be974fc"&gt;nrf_mesh_serial_tx() documentation&lt;/a&gt;, NRF_ERROR_NO_MEM means &amp;quot;The serial TX queue was full, and the packet couldn&amp;#39;t be scheduled for transmission.&amp;quot;&lt;/p&gt;
&lt;p&gt;It does not have to do with available flash space. Rather, it has to do with the amount of RAM to use for buffers used for storing outgoing serial messages. Serial buffer TX queue size is hard coded in serial_bearer.c to be two times the maximum possible packet size:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define TX_BUFFER_SIZE (2 * ALIGN_VAL(sizeof(serial_packet_t) + sizeof(packet_buffer_packet_t), WORD_SIZE))&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can either increase the tx buffer size (at the expense of using more RAM), or implement a retry mechanism.&lt;/p&gt;
&lt;p&gt;Note that if over time you queue transmissions faster than they get sent, then increasing the buffer size will not work. This is because the number of elements in the queue will then steadily rise until you reach queue capacity.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>