<?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 change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96126/how-to-change-libuarte-rx-buffer-at-any-time</link><description>After initialization.Set the libuarte rx buffer to 244 when connected to Android and 185 when connected to ios. Can it be done? 
 
 nRF5_SDK_17.1.0 nrf52832 libuarte+nus.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Feb 2023 11:19:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96126/how-to-change-libuarte-rx-buffer-at-any-time" /><item><title>RE: How to change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/thread/407741?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 11:19:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e3f387c-223f-4fe3-a038-c132fb6d2138</guid><dc:creator>snail_2</dc:creator><description>&lt;ul&gt;
&lt;li&gt;
&lt;p class="src grammarSection highlight" data-group="1-1"&gt;Thanks, problem solved&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/thread/407717?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 09:40:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9c73fa1-46cd-4b90-b1b8-5f153b086ad7</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you explain what you mean by the&amp;nbsp;&lt;span&gt;nrf_libuarte_async_rx_free() not working properly? It is intentional that the buffer is only freed on the buffer boundary. It will not work correctly if you don&amp;#39;t provide the correct lengths to the rx_free function. If you want to set the buffer sizes after a connection is done, I think you need to uninit and reinitialize the libuarte with this new buffer size. However I don&amp;#39;t think it will be necessary if you just set it to 255 bytes, then the iOS devices will be able to use that buffer size as well. If you set the buffer size to 255 bytes and read 184 bytes, the second transfer should be split into two buffers, one of 71 bytes, and the next in 113 bytes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/thread/407454?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2023 03:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb17dd5a-055f-45a1-ba72-e2921086d20d</guid><dc:creator>snail_2</dc:creator><description>&lt;p&gt;&lt;img style="max-height:200px;max-width:542px;" height="200" src="https://devzone.nordicsemi.com/resized-image/__size/1084x400/__key/communityserver-discussions-components-files/4/pastedimage1675221397718v1.png" width="542" alt=" " /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p class="src grammarSection" data-group="1-1"&gt;nrf_libuarte_async_rx_free（） is not working properly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/thread/407347?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2023 13:27:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48ecb43d-680f-44e5-bd64-4bc4876ac2c9</guid><dc:creator>snail_2</dc:creator><description>&lt;p&gt;&lt;span&gt;How to change the libuarte rx buffer to the MTU size set in the connection after a connection.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/thread/407221?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2023 08:04:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9ea6cbe-106c-4397-b368-02f1e551df02</guid><dc:creator>snail_2</dc:creator><description>&lt;p&gt;Sorry, I wrote it wrong.How to change the buffer to the MTU size set in the connection after a connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/thread/407213?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2023 07:17:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab707260-114e-4108-814e-8c06a392c32e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Same rules/answer applies for the TX buffer as for the RX buffer.&amp;nbsp;&lt;span&gt;The peripheral application won&amp;#39;t have a clue if it connects to an Android device or an iOS device, but I guess you can change the buffer after a connection is made to whatever the MTU size is set to in the connection to get the same buffer size as what the central device supports. However, it should also be fine to just set the TX buffer to 244 during init, and then leave it like that when connecting to iOS devices as well.&lt;/span&gt;&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: How to change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/thread/407125?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2023 13:50:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2b25f18-512d-4c5e-93b7-974b59b05c65</guid><dc:creator>snail_2</dc:creator><description>&lt;ul&gt;
&lt;li&gt;
&lt;p class="src grammarSection highlight" data-group="1-1"&gt;Can I change the tx buffer after initialization&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change libuarte rx buffer at any time</title><link>https://devzone.nordicsemi.com/thread/407112?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2023 13:25:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b715b94e-bb55-44b5-b219-5279d5da37a8</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The peripheral application won&amp;#39;t have a clue if it connects to an Android device or an iOS device, but I guess you can change the buffer after a connection is made to whatever the MTU size is set to in the connection to get the same buffer size as what the central device supports. However, it should also be fine to just set the RX buffer to 244 during init, and then leave it like that when connecting to iOS devices as well.&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>