<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Fix for slow telnet on 4.1 ( Windows ) in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Fix-for-slow-telnet-on-4-1-Windows/m-p/270216#M8220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A while ago I did very much the same thing, but I made it an option rather than hard-coding it off. I added this to user_config.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13942127206028893 jive_macro_code" jivemacro_uid="_13942127206028893"&gt;
&lt;P&gt;#define TELNETDCFG_NO_NAGLE_ALGORITHM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in telnsrv.c, in TELNETSRV_task() at the beginning where the options are being set up, I added:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13942130338321184 jive_macro_code" jivemacro_uid="_13942130338321184"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; option = TELNETDCFG_NO_NAGLE_ALGORITHM;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; error = setsockopt(telnetsrv_context.LISTENSOCK, SOL_TCP, OPT_NO_NAGLE_ALGORITHM, &amp;amp;option, sizeof(option));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if (error) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCS_task_exit(creator, error);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To provide a default, add the following to rtcscfg.h:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13942132338474902" jivemacro_uid="_13942132338474902"&gt;
&lt;P&gt;/*&lt;/P&gt;
&lt;P&gt;** MGCT: &amp;lt;option type="bool"/&amp;gt;&lt;/P&gt;
&lt;P&gt;*/&lt;/P&gt;
&lt;P&gt;#ifndef TELNETDCFG_NO_NAGLE_ALGORITHM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; #define TELNETDCFG_NO_NAGLE_ALGORITHM 0&lt;/P&gt;
&lt;P&gt;#endif&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that also has the effect of making the option show up in the GUI editor for user_config.h on the RTCS tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Mar 2014 17:30:43 GMT</pubDate>
    <dc:creator>matthewkendall</dc:creator>
    <dc:date>2014-03-07T17:30:43Z</dc:date>
    <item>
      <title>Fix for slow telnet on 4.1 ( Windows )</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Fix-for-slow-telnet-on-4-1-Windows/m-p/270215#M8219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This subject has been discussed several times for earlier releases of MQX, but I never saw a clear-cut fix. My 4.1 app supports a telnet interface but was painfully slow. The fix was to modify the rtcs library slightly to disable the Nagle algorithm for the Telnet server. In the RTCS project, under apps, edit the file telnsrv.c. Around line 280 add the code to change this option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; // Disable nagle algorithm for much faster performance with Windows clients&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; option = 1;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; error = setsockopt(telnetsrv_context.LISTENSOCK, SOL_TCP, OPT_NO_NAGLE_ALGORITHM, &amp;amp;option, sizeof(option));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if (error) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCS_task_exit(creator, error);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 00:39:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Fix-for-slow-telnet-on-4-1-Windows/m-p/270215#M8219</guid>
      <dc:creator>gpontis</dc:creator>
      <dc:date>2014-03-03T00:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fix for slow telnet on 4.1 ( Windows )</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Fix-for-slow-telnet-on-4-1-Windows/m-p/270216#M8220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A while ago I did very much the same thing, but I made it an option rather than hard-coding it off. I added this to user_config.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13942127206028893 jive_macro_code" jivemacro_uid="_13942127206028893"&gt;
&lt;P&gt;#define TELNETDCFG_NO_NAGLE_ALGORITHM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in telnsrv.c, in TELNETSRV_task() at the beginning where the options are being set up, I added:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13942130338321184 jive_macro_code" jivemacro_uid="_13942130338321184"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; option = TELNETDCFG_NO_NAGLE_ALGORITHM;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; error = setsockopt(telnetsrv_context.LISTENSOCK, SOL_TCP, OPT_NO_NAGLE_ALGORITHM, &amp;amp;option, sizeof(option));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if (error) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCS_task_exit(creator, error);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To provide a default, add the following to rtcscfg.h:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13942132338474902" jivemacro_uid="_13942132338474902"&gt;
&lt;P&gt;/*&lt;/P&gt;
&lt;P&gt;** MGCT: &amp;lt;option type="bool"/&amp;gt;&lt;/P&gt;
&lt;P&gt;*/&lt;/P&gt;
&lt;P&gt;#ifndef TELNETDCFG_NO_NAGLE_ALGORITHM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; #define TELNETDCFG_NO_NAGLE_ALGORITHM 0&lt;/P&gt;
&lt;P&gt;#endif&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that also has the effect of making the option show up in the GUI editor for user_config.h on the RTCS tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 17:30:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Fix-for-slow-telnet-on-4-1-Windows/m-p/270216#M8220</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-03-07T17:30:43Z</dc:date>
    </item>
  </channel>
</rss>

